1

SQL error:

ERROR: function point(numeric) does not exist LINE 4: (ST_GeometryFromText(Point(53.34972 -6.26025)), 4326), 1000) ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.

In statement:

SELECT o.name
FROM osm_point o
WHERE ST_DWITHIN(o.way, 
(ST_GeometryFromText(Point(53.34972 -6.26025)), 4326), 1000)
2
  • Welcome to GIS.StackExchange! Please edit your question to include what software you are working with.
    – juturna
    May 6, 2015 at 17:58
  • using phppgadmin with postgresql, pgrouting and hstore
    – missmaths
    May 6, 2015 at 17:59

1 Answer 1

3

Shouldn't ST_GeometryFromText(Point(53.34972 -6.26025)), 4326) have quotes around the WKT since the function expects a text argument? So this instead -

ST_GeometryFromText('Point(53.34972 -6.26025)', 4326)

which also removes the extra right parentheses that you had after the WKT.

4
  • Tried that too: SELECT o.name FROM osm_point o WHERE ST_DWITHIN(o.way, (ST_GeomFromText('Point(53.34972 -6.26025)', 4326), 1000)
    – missmaths
    May 6, 2015 at 18:16
  • the 1000 stands for 1000 metres away
    – missmaths
    May 6, 2015 at 18:17
  • Did you get the same exact error? I would guess that your parentheses are not balanced. I don't see any reason for the left paren before the ST_GeomFromText function. So this - SELECT o.name FROM osm_point o WHERE ST_DWITHIN(o.way, ST_GeomFromText('Point(53.34972 -6.26025)', 4326), 1000)
    – MWrenn
    May 6, 2015 at 18:19
  • I still see the left paren before ST_GeomFromText which is unnecessary, I think.
    – MWrenn
    May 6, 2015 at 18:23

Your Answer

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

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