*
**********************************************************************
* $Log$
+ * Revision 1.49 2004/05/13 12:07:13 strk
+ * Other fix in 3d handling - you should now be able to dump as 2d or 3d any 2d or 3d object
+ *
* Revision 1.48 2004/05/13 11:59:08 strk
* Fixed bug in 3d features handling.
*
{
byte *ptr = str;
uint32 type;
- //int is3d;
+ int is3d;
// skip byte order
skipbyte(&ptr);
// get type
type = getint(ptr);
- //is3d = type&WKB3DOFFSET;
+ is3d = type&WKB3DOFFSET;
type &= ~WKB3DOFFSET;
switch(type)
totpoints += npoints;
}
- obj = SHPCreateObject(SHPT_ARC, shape_id, nparts,
+ obj = SHPCreateObject(outshptype, shape_id, nparts,
part_index, NULL, totpoints,
x, y, z, NULL);
}
- obj = SHPCreateObject(SHPT_ARC, shape_id, nparts,
+ obj = SHPCreateObject(outshptype, shape_id, nparts,
part_index, NULL, totpoints,
x, y, NULL, NULL);
z[pn] = popdouble(&wkb);
}
- obj = SHPCreateSimpleObject(SHPT_ARCZ, npoints, x, y, z);
+ obj = SHPCreateSimpleObject(outshptype, npoints, x, y, z);
free(x); free(y); free(z);
return obj;
y[pn] = popdouble(&wkb);
}
- obj = SHPCreateSimpleObject(SHPT_ARC, npoints, x, y, z);
+ obj = SHPCreateSimpleObject(outshptype, npoints, x, y, z);
free(x); free(y);
return obj;
if ( geotype == POINTTYPE )
{
- obj = SHPCreateSimpleObject(SHPT_POINTZ,1,&x,&y,&z);
+ obj = SHPCreateSimpleObject(outshptype,1,&x,&y,&z);
}
else if ( geotype == MULTIPOINTTYPE )
{
//fprintf(stderr, "create_point3D_WKB: fluffing to MULTIPOINT\n");
- obj = SHPCreateSimpleObject(SHPT_MULTIPOINTZ, 1, &x, &y, &z);
+ obj = SHPCreateSimpleObject(outshptype, 1, &x, &y, &z);
}
else
{
z[pn]=popdouble(&wkb);
}
- obj = SHPCreateSimpleObject(SHPT_MULTIPOINTZ,npoints,x,y,z);
+ obj = SHPCreateSimpleObject(outshptype,npoints,x,y,z);
free(x); free(y); free(z);
return obj;
totpoints += npoints;
}
- obj = SHPCreateObject(SHPT_POLYGONZ, shape_id, nrings,
+ obj = SHPCreateObject(outshptype, shape_id, nrings,
part_index, NULL, totpoints,
x, y, z, NULL);
printf("End of polygons\n");
#endif
- obj = SHPCreateObject(SHPT_POLYGON, shape_id, nparts,
+ obj = SHPCreateObject(outshptype, shape_id, nparts,
part_index, NULL, totpoints,
x, y, z, NULL);