简体   繁体   English

postgis拓扑中CreateTopology()中的SRID

[英]SRID in CreateTopology () in postgis topology

I am trying to createTopology() and find intersection information. 我正在尝试创建topology()并找到路口信息。 But CreateTopology () has a SRID parameter. 但是CreateTopology()具有SRID参数。 I am new to GIS so I really don't know what this means. 我是GIS的新手,所以我真的不知道这意味着什么。 The documentation says it is spatial reference identified as defined in spatial_ref_sys table for that topology. 该文档说,它是按空间拓扑参考在space_ref_sys表中定义的空间参考。 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 ********** 错误:AddGeometryColumn()-无效的SRID上下文:SQL语句“ SELECT AddGeometryColumn(”,$ 1,$ 2,$ 3,$ 4,$ 5,$ 6,$ 7)“ PL / pgSQL函数addgeometrycolumn(字符变化,字符变化,字符变化,整数) ,字符变化,整数,布尔值)SQL语句SQL语句“ SELECT AddGeometryColumn('ri_topo','face','mbr','17698','POLYGON',2)的第5行” PL / pgSQL函数createtopology(字符变化,整数,双精度,布尔)EXECUTE语句的第33行**********错误**********

An SRID is an identifier that says what a particular set of coordinates means. SRID是表示特定坐标集意味着什么的标识符。 If you have coordinates of, say, "45,50", is that latitude and longitude, meters north and south of some reference point or what? 如果您的坐标为“ 45,50”,那么该纬度和经度是某个参考点南北之间的距离还是什么? 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. SRID告诉系统如何解释这些坐标,并允许转换坐标系,如果要合并要分析的不同坐标系中的输入数据,这将很有用。

In this case 17698 was specified for the SRID of your data, and that SRID is probably not in your spatial_ref_sys table. 在这种情况下,为数据的SRID指定了17698,并且该SRID可能不在您的space_ref_sys表中。 It's not in mine. 不是我的 You will need to know what coordinate system your data is in and pick the right SRID. 您将需要知道数据所在的坐标系,然后选择正确的SRID。 SRID 4326 is common as it is the WGS84 longitude/latitude system. SRID 4326很常见,因为它是WGS84经度/纬度系统。 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. 如果数据完全是虚构的,以米为单位,则可以选择一些UTM网格并假装从那里来的数据。 If it's fictitious and lat/lon, just use 4326. 如果是虚构的纬度/经度,请使用4326。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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