Search code examples
gissimulationshapefilesimulatoranylogic

Reference GIS Region from Shape File in Anylogic


I have a GIS Map in which I uploaded a shape file with the zipcodes of a given region. I want to generate random points inside these regions, but I haven't been able to get the region element with the zipcode String name. I tried using the searchRegionFirst and searchRegion functions with the region name loaded from the shape file but they end up finding other places not related to the zones I have. Is there a way to get the region by its custom name?

Thank you

enter image description here


Solution

  • I could solve it, I just leave the question in case someone runs into the same problem. So just go to the project panel and under the main->presentation->level->map you can find all the GISRegions created. Just select them all with shift and with the right click you can find the option to create a Collection of the GISRegions. Then just use this collection to iterate through the zones.