12.07.2015 Views

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>PostGIS</strong> <strong>1.5.8</strong> <strong>Manual</strong>25 / 310--Lets say you created a derivative table by doing a bulk insertSELECT poi.gid, poi.the_geom, citybounds.city_nameINTO myschema.myspecialpoisFROM poi INNER JOIN citybounds ON ST_Intersects(citybounds.the_geom, poi.the_geom);--Create index on new tableCREATE INDEX idx_myschema_myspecialpois_geom_gistON myschema.myspecialpois USING gist(the_geom);--To manually register this new table’s geometry column in geometry_columns-- we do the same thing as with viewINSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, ←↪f_geometry_column, coord_dimension, srid, "type")SELECT ’’, ’myschema’, ’myspecialpois’, ’the_geom’, ST_CoordDim(the_geom), ST_SRID(the_geom ←↪), GeometryType(the_geom)FROM public.myschema.myspecialpois LIMIT 1;4.3.5 Ensuring OpenGIS compliancy of geometries<strong>PostGIS</strong> is compliant with the Open Geospatial Consortium’s (OGC) OpenGIS Specifications. As such, many <strong>PostGIS</strong> methodsrequire, or more accurately, assume that geometries that are operated on are both simple and valid. for example, it does notmake sense to calculate the area of a polygon that has a hole defined outside of the polygon, or to construct a polygon from anon-simple boundary line.According to the OGC Specifications, a simple geometry is one that has no anomalous geometric points, such as self intersectionor self tangency and primarily refers to 0 or 1-dimensional geometries (i.e. [MULTI]POINT, [MULTI]LINESTRING).Geometry validity, on the other hand, primarily refers to 2-dimensional geometries (i.e. [MULTI]POLYGON) and defines theset of assertions that characterizes a valid polygon. The description of each geometric class includes specific conditions thatfurther detail geometric simplicity and validity.A POINT is inheritably simple as a 0-dimensional geometry object.MULTIPOINTs are simple if no two coordinates (POINTs) are equal (have identical coordinate values).A LINESTRING is simple if it does not pass through the same POINT twice (except for the endpoints, in which case it is referredto as a linear ring and additionally considered closed).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!