Including all geometry information allows PostGIS to use EWKB as the format of recordĮWKB and EWKT are used for the "canonical forms" of PostGIS data objects.įor input, the canonical form for binary data is EWKB,Īnd for text data either EWKB or EWKT is accepted. They provide 3D (XYZ and XYM) and 4D (XYZM) coordinate support and include SRID information. The OGC SFA specification 1.2.1 (which aligns with the ISO 19125 standard)Īdds support for 3D (ZYZ) and measured (XYM and XYZM) coordinates,īut still does not include the SRID value.īecause of these limitations PostGIS defined extended EWKB and EWKT formats. OGC SFA specifications initially supported only 2D geometries,Īnd the geometry SRID is not included in the input/output representations. Of spatial data as binary data (arrays of bytes).Įxamples of the WKB representations of spatial objects are: Well-Known Binary (WKB) provides a portable, full-precision representation Geometry = ST_GeomFromText(text WKT, SRID) įor example, a statement to create and insert a spatial object from WKT and a SRID is: INSERT INTO geotable ( geom, name ) ST_AsText and ST_GeomFromText: text WKT = ST_AsText(geometry) Input and output of WKT is provided by the functions GEOMETRYCOLLECTION(POINT(2 3),LINESTRING(2 3,3 4)) This allows detecting and fixing them if needed. PostGIS also allows storing and manipulating invalid geometry values. With a hole lying outside the shell, but this makes no sense geometrically These rules ensure that geometry values represents realistic The OGC geometry model defines validity rules for each geometry type. The boundary is a geometry of dimension one less than that of the geometry itself. Geometries are topologically closed, so they always contain their boundary. The geometry model allows evaluating topological spatial relationships asĭescribed in Section 5.1.1, “Dimensionally Extended 9-Intersection Model”. It is an efficient way to represent a geometry'sĮxtent in coordinate space and to check whether two geometries interact. This is the 2 or 3-dimensional box which encloses the coordinates of a geometry. Point types have dimension 0, linear types have dimension 1,Ĭollections have the dimension of the maximum element dimension.Įmpty values contain no vertices (for atomic geometry types)Īn important property of geometry values is their spatial The geometry dimension is a property of geometry types. See Section 4.5, “Spatial Reference Systems”. SRID 0 represents an infinite Cartesian plane with no units assigned to its axes. In planar reference systems the X and Y coordinates typically The units of the X and Y axes are determined by the spatial reference system. The spatial reference system is identified by the geometry SRID number. Indicating the coordinate system in which it is embedded. If it has both Z and M the coordinate dimension is 4D. If a geometry has Z or M ordinates the coordinate dimension is 3D If Z or M values are present in a geometry value, they must be defined for each point in the geometry. The M ordinate contains a measure value, which may represent time or distance. The Z ordinate is often used to represent elevation. Shapes are constructed from points or line segments, with points specified by a single coordinate,Ĭoordinates may contain optional Z and M ordinate values. The size and location of shapes are specified by their coordinates.Įach coordinate has a X and Y ordinate value determining its location in the plane. The PolyhedralSurface, Triangle, and TIN types can also represent shapes in 3-dimensional space. Geometry models shapes in the 2-dimensional Cartesian plane. The Simple Features Access - Part 1: Common architecture v1.2.1 Which represent various kinds and dimensions of geometric shapes. Geometry values belong to one of its concrete subtypes PostGIS implements the OGC Geometry model as the PostgreSQL data types It defines the fundamental spatial type of Geometry,Īlong with operations which manipulate and transform geometry values Standard (SFA) to provide a model for geospatial data. The Open Geospatial Consortium (OGC) developed the
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |