Thursday, 23 March 2017

postgresql - PostGis and datatypes WKT


I dont't have any experience with the geographics databases so I hope that you be patiente with me, the thing is: I know that the datatype geography is used if all you care about is measuring distances and lengths and you have data from all over the world and the datatype geometry is used is best if you are pretty comfortable with spatial reference systems or you are dealing with localized data where all your data fits in a single spatial reference system (SRID), or you need to do a lot of spatial processing (that's what I read in chapter 3 of the documentation of postgis) and I saw on the link https://www.tutorialspoint.com/postgresql/postgresql_data_types.htm the following datatypes: point, line, lseg, box, path, path, polygon and circle. And then I saw the documentation again of the postgis on the section 4.1.3 SQL-MM Part 3 about the following types with the extension well-know text: circularString, compoundCurve, curvePolygon, multiCurve, multiSurface. What I don't understand is: what is the difference between these datatypes?


EDIT: And what is the relation between the datatypes that I saw in the section 4.1.3 and the datatypes that I saw in https://www.tutorialspoint.com/postgresql/postgresql_data_types.htm



Answer



The types geometry and geography are PostGIS data types, whereas point, line, path, etc. are native PostgreSQL data types. The native types offer very little functionality compared to the PostGIS types, and have relatively poor support by client applications. On the other hand, the native storage types use less storage space and may be faster for the few operations that they support.


Unlike the native PostgreSQL types, the PostGIS geometry and geography types are not limited to holding a single shape. Any of the following shapes can be stored in a PostGIS geometry or geography:




  • Point

  • LineString

  • Polygon

  • MultiPoint

  • MultiLineString

  • MultiPolygon

  • GeometryCollection

  • CircularString

  • CompoundCurve


  • CurvePolygon

  • MultiCurvePolygon

  • MultiSurface

  • PolyhedralSurface

  • Triangle

  • TIN


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...