Hello,
I'm new with openmap and I'm wondering, what is the simplest way to get
raw data from .shp files. I supposed the following code should do it:
----------------
ShapeFile sh=new ShapeFile("my.shp");
while(true) {
ESRIRecord er=sh.getNextRecord();
if(er==null) break;
byte b[]=new byte[er.getBinaryStoreSize()];
er.write(b,0);
ESRIPolygonRecord erp=new ESRIPolygonRecord(b,0);
ESRIPoly ep[]=erp.polygons;
for(int n=0;n<ep.length;n++) {
ESRIPoly.ESRIFloatPoly erf=new
ESRIPoly.ESRIFloatPoly(ep[n].nPoints);
erf.read(b,0,true);
for(int p=0;p<erf.nPoints;p++)
System.out.println(erf.getX(p)+" p "+erf.getY(p));
}
}
--------------
However there are some zero and infinity values before real pointdata
and in some records x- and y values are changed. Have I misunderstand
something?
thanks in advance,
Arto
-- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Wed Nov 13 02:21:38 2002
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:33 EDT