0

I am trying to extract OSM land use information for a given bounding box in PostGIS. Using this example I wrote my code:

SELECT *
FROM planet_osm_polygon 
WHERE 
  planet_osm_polygon.landuse && 
  ST_Transform(ST_MakeEnvelope(1.49464, 49.1963130, 1.628030, 49.287031, 4326), 32647);

Unfortunately it returns me an error:

ERROR: transform: couldn't project point (1.49464 49.1963 0): latitude or longitude exceeded limits (-14)

1
  • Are you sure your coordinates are stored in EPSG:32647? If you used osm2pgsql, they will be in EPSG:3857. Apart from that, EPSG:32647 does not cover 1.5E 49.2N
    – AndreJ
    Commented Mar 11, 2017 at 20:24

1 Answer 1

1

The problem was in a wrong column I should take planet_osm_polygon.way not planet_osm_polygon.landuse

SELECT  * FROM planet_osm_polygon 
WHERE planet_osm_polygon.way && 
ST_Transform(ST_MakeEnvelope( 2.3160604029813427 ,49.20365292898691, 2.317437943284213 ,49.204552967527086 , 4326), 900913)
3
  • Out of interest, does osm have comprehensive land use information? Commented Mar 13, 2017 at 8:49
  • What do you mean by 'comprehensive'? If you are refering to completeness it depends on the region of the map and provided by annotaters detalization.
    – Ivan T
    Commented Mar 13, 2017 at 16:15
  • OK, that's good enough. That fails my definition of comprehensive, which is more or less based on online dictionary:"including or dealing with all or nearly all elements or aspects of something. ". Back to satellite image processing it is :-) Commented Mar 13, 2017 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.