How do shape files define a physical location? When looking at the attributes of a polygon record, I see a Shape_Length and Shape_Area. The shape can be so complex but the definition seems extremely simple. Very curious....
The Shape field in the table is a BLOB (binary large object) that has structured coordinates. The structure is different depending on the type of feature (line, polygon, point). Those locations are hidden from the interface, if you wanted to see them all you'd need to use a tool that dumps them out or write a script that can read them and print them.
Reading geometries—Help | ArcGIS for Desktop
The length and area are calculated from the shape, which can be extremely complex, with up to millions of coordinates.
Actually, while shapefiles have three different internal structures by type, the types are Point, Multipoint, and Polyline/Polygon. The only difference between polylines and polygons are the permitted values in the first four bytes of the shape record, and the fact that the point array values for polygon rings must close (first == last) and may not cross (though they can touch at a point).
The Shapefile Technical Description whitepaper details the nuts and bolts of the shapefile format. Interestingly, the length and area values are not carried as properties inside the .shp file itself, but are computed when needed from the combined part and point arrays.
- V
You guys are great. Thanks for all the input and links. They are greatly appreciated and helpful.
With your help and exercises in Chapter 4 of GIS Tutorial 1 by Wilpen Gorr, I've been able to deduce the following.
zip files can originate from many sources. I have found the US Census county zip files here.
Index of /geo/tiger/TIGERrd13/COUSUB10
The zip file has the following
.xml - the Description of the data, the extents, the link, all of the meta data about the data.
.dbf - I'm assuming this is storing all of the BLOBs. I don't know which editor to use to read it.
.shp - the Shape file that gets imported into the GeoDatabase.gdb file and becomes a Feature Class. It must have a relationship to the .dbf file.
.prj - the DATUM, coordinate system, that is used as the foundation for the geometries.
.shx - mystery to me.
The shape file can be added to the GeoDatabase in ArcCatalog.
The GeoDatabase can then be used in ArcMap.
The Feature class can then be added to the Table of Contents on a Layer.
Please add any comments or corrections.
Next question then becomes, is it a best practice to use that geodatabase as the default geodatabase in the mxd properties?
This is going to lead to another topic and another thread of pacakaging mxds and gdbs for distribution.
I deduce that there is a relationship between the Project Coordinate System and pairs of coordinates for a Point Geometry or a set of coordinate pairs for a Polygon Geometry that are stored in the BLOB.
Where does that relationship get defined and how is it resolved? Ultimately, how does a polygon of a county get mapped to a polygon of a state? And how does a point geometry of a city get mapped to a polygon of a county?
The *prj file (or the coordinate system definition) is part of the metadata of the feature. The coordinates in the "blob" are just a bunch of numbers. Without knowing what those numbers represent, ie the projection that they are in, the system would still not know how to map these coordinates on to a map in their correct real world location.
Russel, each shape aligns with the coordinate system through pairs of coordinates for each vertices that match up with the coordinates in the coordinate system. If you look at that link Curtis posted, and scroll down to polygon geometries, for example, you can see illustrations of the vertices, their coordinates, and how that geometry code looks. Is that what you meant?
Thanks. I see the coordinate system defined in the *.prj file. How does each shape align with the coordinate system?
Thanks for the link - Reading Geometries. That opens pandora's box! I'm familiar with a BLOB as a field in and Oracle or SQL Server database. Where is this BLOB stored?
Good one for my learning Curtis Price.
Russel Quan:
Hi Russel,
For a polygon, the feature stores the coordinates of the vertices that helps to define the structure of the polygon, thus calculating the area and perimeter (length), based on the projected coordinate system.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.