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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PostGIS</strong> <strong>1.5.8</strong> <strong>Manual</strong>21 / 310• If your data is contained in a small area, you might find that choosing an appropriate projection and using GEOMETRY is thebest solution, in terms of performance and functionality available.• If your data is global or covers a continental region, you may find that GEOGRAPHY allows you to build a system withouthaving to worry about projection details. You store your data in longitude/latitude, and use the functions that have been definedon GEOGRAPHY.• If you don’t understand projections, and you don’t want to learn about them, and you’re prepared to accept the limitations infunctionality available in GEOGRAPHY, then it might be easier for you to use GEOGRAPHY than GEOMETRY. Simply loadyour data up as longitude/latitude and go from there.Refer to Section 8.8 for compare between what is supported for Geography vs. Geometry. For a brief listing and description ofGeography functions, refer to Section 8.34.2.3 Geography Advanced FAQ1. Do you calculate on the sphere or the spheroid?By default, all distance and area calculations are done on the spheroid. You should find that the results of calculations inlocal areas match up will with local planar results in good local projections. Over larger areas, the spheroidal calculationswill be more accurate than any calculation done on a projected plane. All the geography functions have the option ofusing a sphere calculation, by setting a final boolean parameter to ’FALSE’. This will somewhat speed up calculations,particularly for cases where the geometries are very simple.2. What about the date-line and the poles?All the calculations have no conception of date-line or poles, the coordinates are spherical (longitude/latitude) so a shapethat crosses the dateline is, from a calculation point of view, no different from any other shape.3. What is the longest arc you can process?We use great circle arcs as the "interpolation line" between two points. That means any two points are actually joined uptwo ways, depending on which direction you travel along the great circle. All our code assumes that the points are joinedby the *shorter* of the two paths along the great circle. As a consequence, shapes that have arcs of more than 180 degreeswill not be correctly modelled.4. Why is it so slow to calculate the area of Europe / Russia / insert big geographic region here ?Because the polygon is so darned huge! Big areas are bad for two reasons: their bounds are huge, so the index tends to pullthe feature no matter what query you run; the number of vertices is huge, and tests (distance, containment) have to traversethe vertex list at least once and sometimes N times (with N being the number of vertices in the other candidate feature).As with GEOMETRY, we recommend that when you have very large polygons, but are doing queries in small areas, you"denormalize" your geometric data into smaller chunks so that the index can effectively subquery parts of the object andso queries don’t have to pull out the whole object every time. Just because you *can* store all of Europe in one polygondoesn’t mean you *should*.4.3 Using OpenGIS StandardsThe OpenGIS "Simple Features Specification for SQL" defines standard GIS object types, the functions required to manipulatethem, and a set of meta-data tables. In order to ensure that meta-data remain consistent, operations such as creating and removinga spatial column are carried out through special procedures defined by OpenGIS.There are two OpenGIS meta-data tables: SPATIAL_REF_SYS and GEOMETRY_COLUMNS. The SPATIAL_REF_SYS tableholds the numeric IDs and textual descriptions of coordinate systems used in the spatial database.

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

Saved successfully!

Ooh no, something went wrong!