NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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's gravatar image

stevethepenguin
1112
accept rate: 0%


Hi,
this definitely does not look right. Can you provide more information about your database projection and the command with parameters you used to import? How did you get those coordinate values? Did you use ST_AsText() on the geometry column?

permanent link

answered 10 Apr '12, 07:29

frabron's gravatar image

frabron
3611411
accept rate: 16%

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 ...

permanent link

answered 10 Apr '12, 11:08

frabron's gravatar image

frabron
3611411
accept rate: 16%

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

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×252
×79
×55
×45

question asked: 09 Apr '12, 23:24

question was seen: 10,208 times

last updated: 10 Apr '12, 11:26

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum