Skip to main content
added 81 characters in body
Source Link
Bas
  • 25
  • 4

In my table I have a column filled with text type lat/lon entries. I want to convert these entries to a point? Or something I can use with PostGIS functions

I am aware of SELECT ST_PointFromText('POINT(-71.064544 42.28787)', 4326);, but it does not work when I try to do SELECT ST_PointFromText('POINT('locdata.loc_geo')', 4326) from locdata

That just gets me this error: ERROR: syntax error at or near "locdata" LINE 1: SELECT ST_PointFromText('POINT('locdata.loc_geo')',.

Extra info: my locdata.loc_geo entries are text entries structured like this: 34.032601, 78.551298 (the order doesnt matter, i dont need an exact place, just get the math working)

In my table I have a column filled with text type lat/lon entries. I want to convert these entries to a point? Or something I can use with PostGIS functions

I am aware of SELECT ST_PointFromText('POINT(-71.064544 42.28787)', 4326);, but it does not work when I try to do SELECT ST_PointFromText('POINT('locdata.loc_geo')', 4326) from locdata

That just gets me this error: ERROR: syntax error at or near "locdata" LINE 1: SELECT ST_PointFromText('POINT('locdata.loc_geo')',.

Extra info: my locdata.loc_geo entries are text entries structured like this: 34.032601, 78.551298

In my table I have a column filled with text type lat/lon entries. I want to convert these entries to a point? Or something I can use with PostGIS functions

I am aware of SELECT ST_PointFromText('POINT(-71.064544 42.28787)', 4326);, but it does not work when I try to do SELECT ST_PointFromText('POINT('locdata.loc_geo')', 4326) from locdata

That just gets me this error: ERROR: syntax error at or near "locdata" LINE 1: SELECT ST_PointFromText('POINT('locdata.loc_geo')',.

Extra info: my locdata.loc_geo entries are text entries structured like this: 34.032601, 78.551298 (the order doesnt matter, i dont need an exact place, just get the math working)

I edited the title
Source Link
Kadir Şahbaz
  • 78k
  • 57
  • 257
  • 404

So inIn my table I have a column filled with text type lat/lon entries.

  I want to convert these entries to a point? Or something I can use with PostGIS functions

I am aware of SELECT ST_PointFromText('POINT(-71.064544 42.28787)', 4326);

 , but it does not work when I try to do SELECT ST_PointFromText('POINT('locdata.loc_geo')', 4326) from locdata

thatThat just gets me this error: ERROR: syntax error at or near "locdata" LINE 1: SELECT ST_PointFromText('POINT('locdata.loc_geo')',.

extraExtra info: my locdata.loc_geolocdata.loc_geo entries are text entries structured like this: 34.032601, 78.551298

So in my table I have a column filled with text type lat/lon entries.

  I want to convert these entries to a point? Or something I can use with PostGIS functions

I am aware of SELECT ST_PointFromText('POINT(-71.064544 42.28787)', 4326);

  but it does not work when I try to do SELECT ST_PointFromText('POINT('locdata.loc_geo')', 4326) from locdata

that just gets me this error ERROR: syntax error at or near "locdata" LINE 1: SELECT ST_PointFromText('POINT('locdata.loc_geo')',

extra info: my locdata.loc_geo entries are text entries structured like this: 34.032601, 78.551298

In my table I have a column filled with text type lat/lon entries. I want to convert these entries to a point? Or something I can use with PostGIS functions

I am aware of SELECT ST_PointFromText('POINT(-71.064544 42.28787)', 4326);, but it does not work when I try to do SELECT ST_PointFromText('POINT('locdata.loc_geo')', 4326) from locdata

That just gets me this error: ERROR: syntax error at or near "locdata" LINE 1: SELECT ST_PointFromText('POINT('locdata.loc_geo')',.

Extra info: my locdata.loc_geo entries are text entries structured like this: 34.032601, 78.551298

How do I convert Converting a text (lat/lon) to a point or geography

naming
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65
Loading
Source Link
Bas
  • 25
  • 4
Loading