Skip to content

Commit 9ae3eab

Browse files
authored
Replace function to retrieve geometry type (#71)
1 parent d24dfa0 commit 9ae3eab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

data/query_function.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ OR REPLACE FUNCTION postgisftw.osm_website_objects_around (
5050
osm_type,
5151
osm_id,
5252
tags,
53-
REPLACE(ST_GeometryType(geog::geometry), 'ST_', '') as geometry_type,
53+
GeometryType(geog::geometry) as geometry_type,
5454
-- only return geometry if it is in viewport
5555
CASE
5656
WHEN NOT ST_Covers (
@@ -84,7 +84,7 @@ OR REPLACE FUNCTION postgisftw.osm_website_objects_enclosing_small (
8484
osm_type,
8585
osm_id,
8686
tags,
87-
REPLACE(ST_GeometryType(geog::geometry), 'ST_', '') as geometry_type,
87+
GeometryType(geog::geometry) as geometry_type,
8888
-- only return geometry if it is in viewport
8989
CASE
9090
WHEN NOT ST_Covers (
@@ -124,7 +124,7 @@ OR REPLACE FUNCTION postgisftw.osm_website_objects_enclosing_large (
124124
WHEN p.osm_type = 'R' then r.tags
125125
ELSE NULL
126126
END as tags,
127-
REPLACE(ST_GeometryType(geom), 'ST_', '') as geometry_type,
127+
GeometryType(geog::geometry) as geometry_type,
128128
-- only return geometry if it is in viewport
129129
CASE
130130
WHEN NOT ST_Covers (

0 commit comments

Comments
 (0)