kekscom / osmbuildings

OSM Buildings Classic 2.5D
http://osmbuildings.org
BSD 2-Clause "Simplified" License
505 stars 140 forks source link

What projection to use? #35

Closed bennlich closed 11 years ago

bennlich commented 11 years ago

Hey, Jan. I've been converting some .shp files to geoJSON with ogr2ogr, and I'm wondering what projection to use. Originally I was converting to EPSG:4326, but then a friend pointed out that most tile servers use EPSG:900913 a.k.a. EPSG:3857.

Do you have any pointers here? How do your lat --> pixel conversions work?

kekscom commented 11 years ago

Hi Benny, I'm using EPSG:4326 as a base. Internally everything gets projected to world pixel coordinates then. Thats similar to EPSG:900913, but pixels instead of meters.

bennlich commented 11 years ago

Thanks for the quick reply, Jan! Should I add this to the docs?

kekscom commented 11 years ago

Yay, feel free to add it there!

-----Ursprüngliche Nachricht----- From: Benny Lichtner Sent: Friday, June 28, 2013 4:59 AM To: kekscom/osmbuildings Cc: Jan Marsch Subject: Re: [osmbuildings] What projection to use? (#35)

Thanks for the quick reply, Jan! Do you think this is something for the docs?

— Reply to this email directly or view it on GitHub.

mathiasmuller4sh commented 10 years ago

Hey there having an issue with leaflet map configured to use ESRI:54016. Why OSM not using the crs defined in Leaflet map ? After some investigation there is a fork with the working code. https://github.com/elb/osmbuildings/commit/3c5cf5d7ea440429fdaf878f7bef3d0685f8e027#diff-d3ad12fb8c2c908b09d1645dd46786d9R113 Will be nice to integrate as a pull request. thx.

kekscom commented 10 years ago

Hi @mathiasmuller4sh for simplicity, I keep the projection fixed as EPSG:4326 The mentioned fork would not be an acceptable solution as it entirely replaces projection methods. Ideally, projection is done either in Leaflet - but then how is it done in OpenLayers? Or its done externally in a flexible way by using proj4js. Eventually, you can do reprojection it in your data source anyway. If you need further help, please get in touch.