Hi, I have 'successfully' extracted the data from my planet.osm into my DB using Osmosis but have noticed that the lon/lat values have been altered. For example: -1.297504, 50.964552 has now become -15112163, 513073058. Am I just being stupid or does this seem a little wrong? Any help would be greatly appreciated. Many Thanks. asked 09 Apr '12, 23:24 stevethepenguin |
Hi, answered 10 Apr '12, 07:29 frabron Hi, I'm using a mySQL DB as my host doesn't provide PostgreSQL. The coordinates I have provided are for my local pub and have been obtained from the XAPI web service (and double checked with Google Maps). I used the following command/parameters for the import:
(10 Apr '12, 09:55)
stevethepenguin
osmosis --read-xml file=hampshire.osm --node-key-value keyValueList="railway.station,railway.subway_entrance,amenity.parking, amenity.bar,amenity.pub,amenity.fast_food,amenity.restaurant,amenity.atm,amenity.bank" --write-apidb authFile=auth.config The above code runs through without any errors and all information is inserted into the DB but the coordinates are heavily altered. Thanks.
(10 Apr '12, 09:55)
stevethepenguin
|
I don't know MySQL very well, but of what type is your geometry column? I believe there is a conversion error while inserting the coordinates from osmosis into the database ... answered 10 Apr '12, 11:08 frabron The mySQL DB doesn't use a single geometry column - it use two separate columns (one for lon, one for lat) with the double data type.
(10 Apr '12, 11:26)
stevethepenguin
|