How to properly convert GIS shapefile to a road network? - gis

At the outset, let me just add that I am using Anylogic for the first time, please be understanding.
I have strange problem with conversion GIS .shp file to road network.
I follow the directions in the documentation (I'm trying to do exactly the same as in the documentation example):
https://anylogic.help/markup/converting-roads.html
My GIS map before conversion:
My GIS map after conversion:
As you can see, Anylogic generated a lot of road networks for me. It should all be in one road network. For this reason, there are no intersections and this is the biggest problem. It does not generate intersections at all, but joints these roads somehow artificially ...
Can anyone tell me what I am doing wrong? Why no intersections are generated and everything is thrown into separate road networks?
In the example from the documentation, the intersections have been generated.
I am using Anylogic Professional 30 days trial. Previously I was using the Personal Learning Edition version and there was exactly the same problem.

You are not doing anything wrong. It is caused by the shape file structure. AnyLogic can only interpret what it gets and if the data is not formatted correctly, i.e. road paths are not actually connected in the .shp file, it will create separate networks.
So either adjust the shape file or manually combine the networks, there is no other way, afaik.

Related

Easiest way to get a simple topologically valid network of motorways and trunk roads using OSM and QGIS?

I am trying to find a simple way in QGIS to create a simplified topology of important roads (OSM codes will be highway: [motorway and trunk]) in the bounds of any given polygon with a script or a graphical model;
I've been struggling to wrangle the data between OSM, GRASS (via v.clean) and native QGIS functions like split by lines; harder is probably dealing with the dual carraigeways and motorway access/link roads found in highway interchanges that just creates a mess for the topology.
Is there some straightforward way to do this? I suspect I've been overthinking how to solve this.

Suggestion about automatic map creation problem

I have two layers, first one is the ROAD layer and second one is the PARCEL layer as shown in Figure 1. I can get the data both in dxf and shp formats.
My task is to compute the area of intersection between ROAD and PARCEL layer, this is the easy part. I can compute intersection using QGIS or Geopandas easily. However, the difficult part is creating maps for each of the parcel. Sometimes, I have to create more then a hundred maps for each project. For mapping, there is a template that I have to use, which is similiar to Figure 2. Also, some attribute data should be included in the map, such as owner of the parcel.
These maps should be in both pdf and dxf format. Each map should be in A3 size. To be able to produce such maps, what libraries or programming languages should I use? I have experience in geopandas library but I am not sure if it is enough for this task.
Shoud I try QGIS plugin development or ArcPY? Could you please share your experiences and ideas about this problem?
I am looking forward to hearing from you,
Any help and suggestion is appreciated.
Thanks in advance

Land Cover Dataset

I'm interested in implementing some data visualizations as map layers. But I'm interested in generating data layers only above land area (land cover). A good example would be to plot population density over a coastal city. What is a good approach for this, when it comes to the data source and how to actually display layers with such detailed boundaries?
Technically, so far I'm using Leaflet.js and tiles based on OpenStreetMaps, but the question is not necessary technology specific. Also, I'm not interested in plotting this for the whole planet, but for areas of a few hundreds square kilometers (for e.g. a coastal city).
To better give an idea of what I'm interested in, this Koordinates map is something that is similar to what I'm interested in. However, I need something a bit more detailed on the borders.
Usually you need a desktop or server based GIS such coverage, but not JS to do the processing on the client side.
How you do the mapping (here: linking statistical data and land areas) depends on your data itself. You can load OSM based shape files into QGIS and do some python scripting or using the PostGIS commands to link your data and choose a map style.
Another idea would be http://geocommons.com that allow easy visualization if you upload CSV files.
Depending on your area of interest, you can obtain some highly detailed shapefiles from numerous sources. Especially if the local area provides GIS data to the public (many larger coastal cities do, e.g. New York, London). From there, you can create a GeoJSON text of the geometries (here's a free tool for that). Parsing the JSON is very simple and it's very easy to add it to leaflet maps. You can even get creative and add more keys to each geometry object with the data you want to visualize.

Contour Lines Extraction Based on Heat Map

I've been playing with Mapbox's blog post about converting heat maps to contour lines, and I'm stuck at the extraction part of this process.
I used the CSV plugin to create a vector layer of points, then a heat map raster layer based on that, but I can't seem to be able to see the contour lines based on that raster layer after that. When I looked at the properties and selected categorized, it didn't seem to have any symbols listed.
I'm guessing this is probably some kind of type error since I had to create the raster layer based off of map units and not meters, but I don't know how to correct it. What am I missing?
Okey dokey. After the holiday weekend I figured it out.
It was basically a type error with the CRS. Although it's not explicitly stated, I got in touch with MapBox and found out they were working in Google Mercator. It's also a perfectly acceptable CRS to use when you eventually have to import the .shp file into MapBox/Tile Mill.

2008 TIGER/LineĀ® Shapefiles from Census.gov -> Google Maps

How do I take shapefiles and extract lat/lng coords so I can plot polygons on Google Maps?
http://www2.census.gov/cgi-bin/shapefiles/national-files
I asked this question here:
http://groups.google.com/group/Google-Maps-API/browse_thread/thread/18763b4b0cb996c7
and they told me WHAT to do, but not HOW to do it =P
Thx!
It depends on how you need to accomplish this. If you just need a few shapes, you can look up the coordinates in those files yourself. You can use those coordinates to create a GPolygon in Google Maps.
If you need lots of shapes - you'll need to do it programmatically. I would suggest using your favorite language to parse the XML file and retrieve the coordinates for each shape.
I had a similar problem last year when I was developing a screensaver to render presidential polling data. I didn't really want to invest the time to parse the Shapefiles data on the census site (The spec is here if you missed it).
Not sure if I actually saved any time here, but I ended writing a python app to render the 50 states onscreen, trace the edges and then store the data in a simple text format. Not sure if my data is high res enough for your application, but you can grab the data I generated here:
http://www.cannonade.net/pnt.zip
N.B. The data I generate are not latitude/longitudes, but with some scaling you should be able to translate them.
Good luck.
I had better luck using the ARC files at http://www.census.gov/geo/www/cob/index.html
I can't find the webpage right now, but I did find one that had actual code. Google something like "arc to kml" and go from there.