Generating location bounds info from shape file?

This may be a dumb question, because I do not know any GIS file formats (apart from *.osm). But, would it be possible to create the bounds information from a shape file that defines administrative boundaries? This would allow experimentation before importing hundreds of municipality boundaries (1000s of ways and 100s of relations) into OSM. Marko

Hi Marko, I am not sure about your goal. do you mean that you want to evaluate the data in the shape file by creating an *.img with it? Gerd
Date: Wed, 11 Jan 2012 23:22:03 +0200 From: marko.makela@iki.fi To: mkgmap-dev@lists.mkgmap.org.uk Subject: [mkgmap-dev] Generating location bounds info from shape file?
This may be a dumb question, because I do not know any GIS file formats (apart from *.osm). But, would it be possible to create the bounds information from a shape file that defines administrative boundaries? This would allow experimentation before importing hundreds of municipality boundaries (1000s of ways and 100s of relations) into OSM.
Marko _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On Thu, Jan 12, 2012 at 06:55:35PM +0100, Gerd Petermann wrote:
I am not sure about your goal. do you mean that you want to evaluate the data in the shape file by creating an *.img with it?
I would like to import the equivalent of boundary=administrative relations from shape file(s) to mkgmap, for generating the address search index with accurate city or region boundaries. The boundary=administrative data for Finland in OSM is incomplete, and it would be quite a bit of work to import the recently freed official data to OSM. I do not care that much if the boundaries are shown on the map. What I mostly care about is that streets will be associated with the correct region, city or suburb. In the long term, I think that the boundary data does belong to OSM. So, if importing the boundaries in a different format is too complicated, I guess we will have to bite the bullet and import them to OSM. Marko

Hi Marko, I also don't know the format of the shape files, but it sounds to me as if one should code a converter program, so that the data can be put into OSM without much manual work. Gerd Marko Mäkelä wrote
On Thu, Jan 12, 2012 at 06:55:35PM +0100, Gerd Petermann wrote:
I am not sure about your goal. do you mean that you want to evaluate the data in the shape file by creating an *.img with it?
I would like to import the equivalent of boundary=administrative relations from shape file(s) to mkgmap, for generating the address search index with accurate city or region boundaries. The boundary=administrative data for Finland in OSM is incomplete, and it would be quite a bit of work to import the recently freed official data to OSM.
I do not care that much if the boundaries are shown on the map. What I mostly care about is that streets will be associated with the correct region, city or suburb.
In the long term, I think that the boundary data does belong to OSM. So, if importing the boundaries in a different format is too complicated, I guess we will have to bite the bullet and import them to OSM.
Marko _______________________________________________ mkgmap-dev mailing list mkgmap-dev@.org http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- View this message in context: http://gis.638310.n2.nabble.com/Generating-location-bounds-info-from-shape-f... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi, this would be the best solution for all. If you are not able to write a converter ask others. There is so much knowledge in the community, that this shouldn't be a huge problem. Henning Am 12.01.2012 21:13, schrieb GerdP:
Hi Marko,
I also don't know the format of the shape files, but it sounds to me as if one should code a converter program, so that the data can be put into OSM without much manual work.
Gerd
Marko Mäkelä wrote
On Thu, Jan 12, 2012 at 06:55:35PM +0100, Gerd Petermann wrote:
I am not sure about your goal. do you mean that you want to evaluate the data in the shape file by creating an *.img with it? I would like to import the equivalent of boundary=administrative relations from shape file(s) to mkgmap, for generating the address search index with accurate city or region boundaries. The boundary=administrative data for Finland in OSM is incomplete, and it would be quite a bit of work to import the recently freed official data to OSM.
I do not care that much if the boundaries are shown on the map. What I mostly care about is that streets will be associated with the correct region, city or suburb.
In the long term, I think that the boundary data does belong to OSM. So, if importing the boundaries in a different format is too complicated, I guess we will have to bite the bullet and import them to OSM.

On Thu, Jan 12, 2012 at 06:55:35PM +0100, Gerd Petermann wrote:
I am not sure about your goal. do you mean that you want to evaluate the data in the shape file by creating an *.img with it?
I would like to import the equivalent of boundary=administrative relations from shape file(s) to mkgmap, for generating the address search index with accurate city or region boundaries. The boundary=administrative data for Finland in OSM is incomplete, and it would be quite a bit of work to import the recently freed official data to OSM.
I do not care that much if the boundaries are shown on the map. What I mostly care about is that streets will be associated with the correct region, city or suburb.
In the long term, I think that the boundary data does belong to OSM. So, if importing the boundaries in a different format is too complicated, I guess we will have to bite the bullet and import them to OSM.
Marko
Marko, that's quite easy. (from my point of view ;-))) You have to write your own BoundaryPreparer. All you have to do is 1. Load your data 2. For each boundary create a Boundary object. For a Boundary object you need: 1. The shape (as java.awt.geom.Area object) with Garmin coordinates 2. The OSM tags 3. Save each Boundary using the BoundarySaver.addBoundary method. 4. Call BoundarySaver.end() => That's it You receive extra points when you call BoundaryPreparer.workoutBoundaryRelations(boundsDirectory); after that :-) WanMil

On Thu, Jan 12, 2012 at 09:16:28PM +0100, WanMil wrote:
that's quite easy. (from my point of view ;-)))
Thanks for the recipe. It does not sound too difficult, provided that there exists Java code for handling shape files. The biggest challenge should be mapping the attributes to OSM tags, I guess. Marko

there is a couple programs already to convert shape files to osm format. a Java version is http://wiki.openstreetmap.org/wiki/Shp-to-osm.jar all you need is a table of attributes in the shape file and a corresponding list of osm tags. On Jan 12, 2012, at 12:09 PM, Marko Mäkelä wrote:
On Thu, Jan 12, 2012 at 06:55:35PM +0100, Gerd Petermann wrote:
I am not sure about your goal. do you mean that you want to evaluate the data in the shape file by creating an *.img with it?
I would like to import the equivalent of boundary=administrative relations from shape file(s) to mkgmap, for generating the address search index with accurate city or region boundaries. The boundary=administrative data for Finland in OSM is incomplete, and it would be quite a bit of work to import the recently freed official data to OSM.
I do not care that much if the boundaries are shown on the map. What I mostly care about is that streets will be associated with the correct region, city or suburb.
In the long term, I think that the boundary data does belong to OSM. So, if importing the boundaries in a different format is too complicated, I guess we will have to bite the bullet and import them to OSM.
Marko _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (6)
-
aighes
-
Apollinaris Schoell
-
Gerd Petermann
-
GerdP
-
Marko Mäkelä
-
WanMil