0

I did accidently delete a table row - or well, in fact a whole subway station.

My attempt to solve the problem was this PostGIS function:

ST_GeomFromText('POINT(coordinates)')

But then PostgreSQL started to complain about some SRID connection with the spatial_ref_sys table. What did I do wrong? Is it possible to add this through QGIS instead?

Ivar
  • 165
  • 1
  • 8

2 Answers2

1

Try INSERT INTO and use SRID parameter for the geometry

INSERT INTO your_table
col-1-value,...,col-n-value, (SELECT ST_GeomFromText('POINT(coordinates)', SRID))

where SRID is an id of your spatial reference system (4326 for example).

Also it is possible to add needed points using QGIS. Check corresponding section of QGIS manual.

SS_Rebelious
  • 5,621
  • 3
  • 27
  • 62
1

Try using

ST_SetSRID(ST_GeomFromText('POINT(coordinates)'),4326)

instead. Replace 4326 with the correct code as necessary.

underdark
  • 84,148
  • 21
  • 231
  • 413