0

I installed PostGreSql 9.3 ( PgAdmin 3 GUI) and PostGIS 2.1.3 (http://www.enterprisedb.com/products-services-training/pgdownload#windows) for Windows 7 64 bit. After installing it, I downloaded the Sql files for country database (http://www.spatial.cs.umn.edu/Book/labs/vania/spatialQueries.html) and tried to execute the commands in Country.sql enter image description here

in the Sql Builder and stuck at the following error: enter image description here

NOTICE: SRID value -1 converted to the officially unknown SRID value 0 CONTEXT: SQL statement "SELECT AddGeometryColumn('',$1,$2,$3,$4,$5,$6,$7)" PL/pgSQL function addgeometrycolumn(character varying,character varying,character varying,integer,character varying,integer,boolean) line 5 at SQL statement ERROR: function geometryfromtext(unknown, integer) does not exist LINE 4: ...3000.0000','Dollar','USD','N','5','United States',GeometryFr... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. ********** Error **********

ERROR: function geometryfromtext(unknown, integer) does not exist SQL state: 42883 Hint: No function matches the given name and argument types. You might need to add explicit type casts. Character: 769

I can't get this error resolved. Please help me out.

sid
  • 31
  • 3
  • It looks like there is something wrong with you AddGeometryColumn statement, but it is hard to read from that screen shot. Can you edit the question with the actual sql you are trying to run? – John Powell Oct 06 '14 at 05:58
  • 1
    OK, there is an answer to your problem here, http://gis.stackexchange.com/questions/59924/cannot-insert-simple-geometry-data. Use ST_ in front of the spatial functions, ie, ST_GeomFromText and use 4326 (lat/lon) in place of -1 for the SRID. It looks like that tutorial could do with updating. – John Powell Oct 06 '14 at 06:10

0 Answers0