Thanks Graham, I'll see if I can port your example to my case.
On Tue, Mar 6, 2012 at 3:24 PM, Graham Jones <[email protected]>wrote:
> Well, I use something like this in python:
> sqlstr = "select id,name,operator,amenity,shop,landuse,"\
> "ST_Y(centroid(way)),ST_X(centroid(way))"\
> "from planet_osm_point,planet_osm_nodes where id=osm_id
> and way
> && \
> SetSRID('BOX3D(%f %f,%f %f)'::box3d,900913)" % \
> (bbox.minx,bbox.miny,bbox.maxx,bbox.maxy)
>
> The relevant bounding box bit is: the Box3d bit.
>
> There may be better ways of doing this though - I remember having trouble
> with map projections to get it to work, which is what the SetSRID bit is
> doing.
>
> Graham.
>
> On 6 March 2012 20:09, Matthew Wechsler <[email protected]> wrote:
>
>> I have a full OSM planet database import that I use for rendering
>> Mapnik tiles. I would like to use a bounding box to extract a geographic
>> region from the database to be used in rendering on a different server.
>> Does anyone know the SQL statement I could use to extract the BB info from
>> all the tables into a different DB?
>>
>> I have tried to use osm2pgsql to go the other way and use the BB to
>> import data into another DB but have lately been running into memory issues
>> on the import (even though I'm using --slim mode). I am using Windows so I
>> am only able to use the old osm2pgsql binary that has been created a few
>> years ago.
>> Thanks,
>> Matt
>>
>> _______________________________________________
>> newbies mailing list
>> [email protected]
>> http://lists.openstreetmap.org/listinfo/newbies
>>
>>
>
>
> --
> Graham Jones
> Hartlepool, UK.
>
>
> _______________________________________________
> newbies mailing list
> [email protected]
> http://lists.openstreetmap.org/listinfo/newbies
>
>
_______________________________________________
newbies mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/newbies