[OpenMap Users] shapefiles - getting the outerRing

From: C S <usmsci_at_yahoo.com>
Date: Thu, 18 Nov 2010 07:26:41 -0800 (PST)

Hi again all,

  I was wondering if there was a way to retrieve information about the outer ring of each shapeRecord of a shapefile. It doesnt look like ESRIRecord or any of its subclasses offer any way to look into each record of a shapefile and give you info about clockwise or counter-clockwise orientation of rings. below is a small snippet of code for reference. I have done a shpdump on the shapefiles as well and there doesnt seem to be an indicator of which was would be the outer ring.
    
  shapeFile = new ShapeFile(shpInputfile);
  shapeCount = dbf.getRowCount();

for (int i = 1; i <= shapeCount; i++) {
ESRIPolygonRecord shapeRecord = null;
        
shapeRecord = (ESRIPolygonRecord) shapeFile.getNextRecord();

for (int polyIndex = 0; polyIndex < shapeRecord.polygons.length; polyIndex++) {
    ESRIPoly.ESRIFloatPoly poly = (ESRIPoly.ESRIFloatPoly) shapeRecord.polygons[polyIndex];

.......

}




      

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Nov 18 2010 - 10:27:46 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:10 EDT