简体   繁体   中英

SRID in CreateTopology () in postgis topology

I am trying to createTopology() and find intersection information. But CreateTopology () has a SRID parameter. I am new to GIS so I really don't know what this means. The documentation says it is spatial reference identified as defined in spatial_ref_sys table for that topology. i don't understand. ERROR: AddGeometryColumn() - invalid SRID 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 SQL statement "SELECT AddGeometryColumn('ri_topo','face','mbr','17698','POLYGON',2)" PL/pgSQL function createtopology(character varying,integer,double precision,boolean) line 33 at EXECUTE statement ********** Error **********

An SRID is an identifier that says what a particular set of coordinates means. If you have coordinates of, say, "45,50", is that latitude and longitude, meters north and south of some reference point or what? The SRID tells the system how to interpret those coordinates, and allows coordinate systems to be converted, which is useful if you have input data in different coordinate systems that you want to combine for analysis.

In this case 17698 was specified for the SRID of your data, and that SRID is probably not in your spatial_ref_sys table. It's not in mine. You will need to know what coordinate system your data is in and pick the right SRID. SRID 4326 is common as it is the WGS84 longitude/latitude system. But it really depends on your data. If the data is entirely fictitious and in meters, you could pick some UTM grid and pretend it's data from there. If it's fictitious and lat/lon, just use 4326.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM