kekscom / osmbuildings

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

Second data source - postgresql database #10

Closed ramunasd closed 12 years ago

kekscom commented 12 years ago

I saw yiu changed the bounding box handling for pg. What exactly does this thing do: ST_Transform(SetSRID('BOX3D ... ) ?

ramunasd commented 12 years ago

makes epsg:900913 bbox from epsg:4326 coordinates

kekscom commented 12 years ago

Don't be surprised, I'm not a pro in PostGIS yet :-)

What I was wondering is how a BOX3D() comes into play. And conversion to spherical mercator might be correct, regarding the viewboxes/zoom levels we deal with it's probably overkill.

ramunasd commented 12 years ago

Doesn't matter, this function works well for 2D and 3D actions. https://github.com/mapnik/mapnik/wiki/OptimizeRenderingWithPostGIS

kekscom commented 12 years ago

"This type of query is not very efficient. Other than the check for a valid geometry, it will simply fetch each and every row from that table. When the results get to the rules, most of the rows will be filtered out and discarded."

I'm not convinced yet.

kekscom commented 12 years ago

Choice of data sources is now configurable.

I'd like you to have a look whether postrgres bounding box handling works fine. Lat/Lon order is according to the config setting.

Finally, a few words on Postgres set up in the README would be cool.

Thanks!

ramunasd commented 12 years ago

Its better to test using unit tests. I can start server instance with data from baltic states, but i don't have any running leaflet site.

ramunasd commented 12 years ago

http://buildings.ramuno.lt/?w=25.214&s=54.686&e=25.215&n=54.687&z=18

ramunasd commented 12 years ago

http://buildings.ramuno.lt/map.html

kekscom commented 12 years ago

Looks very nice to me :-)

ramunasd commented 12 years ago

Is hard to make 3d model? like this - http://latlon.org/buildings?zoom=17&lat=55.82096&lon=37.6122&layers=BT

ramunasd commented 12 years ago

Our tv tower - http://latlon.org/buildings?zoom=16&lat=54.68853&lon=25.21562&layers=BT

kekscom commented 12 years ago

The more detailed models are interesting. Unfortunately without WebGL we can't do most of the things. Also OSM data is far from complete. Event simple height attribute is largely missing.

For the TV towers, I've got the one from Berlin already working in a slightly different engine. There are some more nice things coming up :-)