diff --git a/tiles/jsontile.php b/tiles/jsontile.php index 398a3db..b9c5211 100644 --- a/tiles/jsontile.php +++ b/tiles/jsontile.php @@ -93,9 +93,9 @@ function beginsWith($str, $sub) { $intersect = " ST_Intersection( way, - ST_SetSRID('BOX3D($mllx $mlly, $murx $mury)'::box3d,900913) + ST_SetSRID('BOX3D($mllx $mlly, $murx $mury)'::box3d,3857) )"; -//transform( ST_GeomFromText('POLYGON(($llx $ury, $urx $ury, $urx $lly, $llx $lly, $llx $ury))', 4326 ), 900913 ) +//transform( ST_GeomFromText('POLYGON(($llx $ury, $urx $ury, $urx $lly, $llx $lly, $llx $ury))', 4326 ), 3857 ) $table = array( array('planet_osm_polygon','building IS NULL AND not exist(hstore(tags),\'building:part\') AND',$intersect), array('planet_osm_line','building IS NULL AND not exist(hstore(tags),\'building:part\') AND',$intersect) @@ -119,7 +119,7 @@ function beginsWith($str, $sub) { from ".$table[$i][0]." where ".$table[$i][1]." - ST_IsValid(way) AND way && ST_SetSRID('BOX3D($mllx $mlly, $murx $mury)'::box3d,900913); + ST_IsValid(way) AND way && ST_SetSRID('BOX3D($mllx $mlly, $murx $mury)'::box3d,3857); "; // debug @@ -208,13 +208,13 @@ function beginsWith($str, $sub) { select ST_AsGeoJSON( ST_Intersection( - ST_SetSRID(the_geom, 4326), + ST_SetSRID(geom, 4326), ST_SetSRID('BOX3D($llx $lly, $urx $ury)'::box3d, 4326) ) , 9 ) from ".$table[$i]." where - the_geom && ST_SetSRID('BOX3D($llx $lly, $urx $ury)'::box3d,4326); + geom && ST_SetSRID('BOX3D($llx $lly, $urx $ury)'::box3d,4326); "; // perform query