fix broken support for pointz as code assumed pointzm - closes #504

This commit is contained in:
Dane Springmeyer 2010-01-29 01:59:50 +00:00
parent 5f8d1713a8
commit 8ac189ccf2
2 changed files with 16 additions and 2 deletions

View file

@ -90,7 +90,14 @@ feature_ptr shape_featureset<filterT>::next()
{
double x=shape_.shp().read_double();
double y=shape_.shp().read_double();
shape_.shp().skip(8*2); // m, z
// skip z
shape_.shp().skip(8);
//skip m if exists
if ( shape_.reclength_ == 8 + 36)
{
shape_.shp().skip(8);
}
geometry2d * point=new point_impl;
point->move_to(x,y);
feature->add_geometry(point);

View file

@ -111,7 +111,14 @@ feature_ptr shape_index_featureset<filterT>::next()
{
double x=shape_.shp().read_double();
double y=shape_.shp().read_double();
shape_.shp().skip(8*2); // skip m,z
// skip z
shape_.shp().skip(8);
//skip m if exists
if ( shape_.reclength_ == 8 + 36)
{
shape_.shp().skip(8);
}
geometry2d * point = new point_impl;
point->move_to(x,y);
feature->add_geometry(point);