lundi 2 février 2015

Reconstituting features from E00 format, without ArcGIS


Recently I used OGR to convert an ESRI E00 format file to shapefiles. I am dealing with vector data, many polygon features per file. I was dismayed to find that none of the resulting shapefiles(you get one shapefile for each sub-file within the E00 file) 'reconstitute' the original features. According to the only E00 format documentation on planet earth there is an ARC file which describes all the arcs used for all features, and a PAL file which lists which arcs are used to describe each feature, and how the arcs should be combined.


As far as I can tell, the only way to get the actual features out of a E00 file is to use ArcGIS which can import the E00 and export all the shapefiles within. Is there any other open source possibility that will automatically extract the features? Or is the only solution to convert the E00 to shapefiles, and then write some code to brute force the features from the resulting ARC and PAL shapefiles i.e. parsing the ArcIds attribute from the PAL and building up a feature from the listed arcs?


End of main question.


Note that:



ogrinfo -al


and looking at the resulting ArcIds in the PAL section yields such gems as:



ArcIds (IntegerList) = (12:-58,164,197,220,275,274,-319,-344,-346,-329,-265,-203)
ArcIds (IntegerList) = (11:216,267,291,-292,257,0,-237,0,-239,0,-158)


where 0 indicates the following arc describes a hole, and a negative index indicates that the arc must be reversed. Not sure how 12:-58 would be interpreted. I assume



12,11,...,1,-1,-2,...-58


The format also indirectly implies that all holes must be comprised of a single closed arc.





Aucun commentaire:

Enregistrer un commentaire