null shapes (was Re: WIP-pyshapelib-Unicode issues)
Bram de Greve
bram.degreve at gmail.com
Mon Jan 14 16:19:23 CET 2008
Bernhard Reiter wrote:
> On Monday 14 January 2008 12:36, Bram de Greve wrote:
>
>> I've looked a bit further into it and I've found the conclusive paragraph
>> in the specs on page 5:
>>
>> "If the shapefile is empty (that is, has no records), the values for Xmin,
>> Ymin, Xmax and Ymax are unspecified."
>>
>
> Hmm there are reconrd in the shapefile,
> there is only one record without geometry.
> Check the link to an example shapefile in the reported issue.
>
>
Oh, I was under the assumption you were talking about shapefiles
_without_ records =)
"cool, I saw some of the commits happening, but hunted the /empty shape
file/ problem. (Does somebody know, btw, if such a shape file is
legitimate at all?)" [emphasis is mine]
>> To me, that implies that they are valid.
>>
>> Also, there's something like null shapes, without geometric data. Each
>> shapefile type supports null shapes, so you can have points and nulls in
>> one file. But not points and lines ...
>>
>
> The above paragraph seems to be too short for me to fully understand.
> If it is okay to not have geographic data in a shapeobject, I guess the
> example shapefile would be legitimate.
>
At the bottom of page 5 of the specs
(http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf), it states:
"A shape type of 0 indicates a null shape, with no geometric data for
the shape. Each feature type (point, line, polygon, etc.) [this would
be the type of the /file/, Bram] supports nulls - it is valid to have
points and null points in the same shapefile."
So, yes, the example shapefile is legitimate. There are actually 109
null shapes in that file (on 4962 shapes in total).
Bram
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)