Question about importing OSM (openstreetmap) shapefile?

31 views
Skip to first unread message

Hieu Chu

unread,
Feb 25, 2019, 9:37:39 PM2/25/19
to GAMA
Hi, I have finished the road traffic tutorial here: https://gama-platform.github.io/wiki/RoadTrafficModel_step1. When I was following the tutorial, I imported the default shapefile that GAMA gives me. When I finishes it, I want to try doing it on some real map, so I follow this tutorial: https://gama-platform.github.io/wiki/ManipulateOSMDatas.
I successfully imported it with a portion of map cropped by me (on openstreetmap), but what is bugging me it's the size of it. Even when an agent has an aspect of circle with radius 2 meters cover the whole display... I tried to change the radius to like 0.05 meters, but it's so tiny so I have to zoom it in a lot to see what's happening, and I can't see the whole map on the display due to this. Is there any way to fix this annoying size of the imported shapefile?
Thanks for reading.

Patrick Taillandier

unread,
Feb 26, 2019, 2:50:42 AM2/26/19
to gama-p...@googlegroups.com
Hi,
The problem seems to come from the prj file. OSM data use as Coordinate Reference System, the World Geodetic System 1984 (WGS84), that needs to be projected. GAMA is able to manage the projection if you have all the information required, and first of all the files composing the shapefile (a shapefile is composed of several files: .shp that contains the geometries, .shx the shape index position, .dbf that contains the attributes of the objects, and .prj that is the projection description).

Do you have all these files in your folder?

Cheers,

Patrick

--
You received this message because you are subscribed to the Google Groups "GAMA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gama-platfor...@googlegroups.com.
To post to this group, send email to gama-p...@googlegroups.com.
Visit this group at https://groups.google.com/group/gama-platform.
For more options, visit https://groups.google.com/d/optout.

Hieu Chu

unread,
Feb 26, 2019, 3:47:28 AM2/26/19
to GAMA
Yes I have the road layer and intersection layer shapefiles when I exported from qgis tool (also contains attributes). As you said maybe its a problem from osm, so is there any other website or tool that I can create shapefile from the map?
Edit: I think I dont seem to find the prj file, only dbf shp and shx. So when I import the .shp file in GAMA file, does it also consider same filename with different extension (dbf, shx) too?

Hieu Chu

unread,
Feb 26, 2019, 3:47:28 AM2/26/19
to gama-p...@googlegroups.com
Yes I have the road layer and intersection layer shapefiles when I exported from qgis tool (also contains attributes). As you said maybe its a problem from osm, so is there any other website or tool that I can create shapefile from the map?

Patrick Taillandier

unread,
Feb 26, 2019, 3:51:40 AM2/26/19
to gama-p...@googlegroups.com
Hi,

If you do not have the prj file, the result you obtain is normal. You can test by adding the attached file to the folder where your shapefile is located (rename it with the same name as your shapefile).

Cheers,

Patrick

Le mar. 26 févr. 2019 à 09:47, Hieu Chu <aaaz...@gmail.com> a écrit :
Yes I have the road layer and intersection layer shapefiles when I exported from qgis tool (also contains attributes). As you said maybe its a problem from osm, so is there any other website or tool that I can create shapefile from the map?
Edit: I think I dont seem to find the prj file, only dbf shp and shx. So when I import the .shp file in GAMA file, does it also consider same filename with different extension (dbf, shx) too?

roads.prj
Reply all
Reply to author
Forward
0 new messages