fix projection

This commit is contained in:
abelvm
2016-08-30 05:55:34 -04:00
parent 72ee1a6d48
commit 37eb85350d
2 changed files with 6 additions and 2 deletions

View File

@@ -32,6 +32,7 @@ DECLARE
p geometry;
BEGIN
sqr := |/2;
polygon := ST_Transform(polygon, 3857);
-- grid #0 cell size
height := ST_YMax(polygon) - ST_YMin(polygon);
@@ -87,7 +88,7 @@ BEGIN
END LOOP;
RETURN ST_Centroid(best_c);
RETURN ST_transform(ST_Centroid(best_c), 4326);
END;
$$ language plpgsql IMMUTABLE;