diff --git a/plugins/input/shape/shape_index_featureset.cpp b/plugins/input/shape/shape_index_featureset.cpp index d6b7e9358..3f0eedea9 100644 --- a/plugins/input/shape/shape_index_featureset.cpp +++ b/plugins/input/shape/shape_index_featureset.cpp @@ -93,7 +93,7 @@ feature_ptr shape_index_featureset::next() double x=shape_.shp().read_double(); double y=shape_.shp().read_double(); shape_.shp().read_double();// z - shape_.shp().read_double();// m + shape_.shp().read_double();// m geometry_ptr point(new point_impl(-1)); point->move_to(x,y); feature->set_geometry(point); @@ -157,7 +157,6 @@ feature_ptr shape_index_featureset::next() } if (attr_ids_.size()) { - //feature->reserve_props(attr_ids_.size()); shape_.dbf().move_to(shape_.id_); std::vector::const_iterator pos=attr_ids_.begin(); while (pos!=attr_ids_.end()) diff --git a/plugins/input/shape/shape_io.cpp b/plugins/input/shape/shape_io.cpp index 269b24a4d..b272ed30c 100644 --- a/plugins/input/shape/shape_io.cpp +++ b/plugins/input/shape/shape_io.cpp @@ -52,7 +52,7 @@ void shape_io::move_to (int pos) reclength_ = shp_.read_xdr_integer(); type_ = shp_.read_ndr_integer(); - if (type_ != shape_point) + if (type_ != shape_point && type_ != shape_pointm && type_ != shape_pointz) { shp_.read_envelope(cur_extent_); } diff --git a/utils/shapeindex/shapeindex.cpp b/utils/shapeindex/shapeindex.cpp index 001d7da02..9e149245c 100644 --- a/utils/shapeindex/shapeindex.cpp +++ b/utils/shapeindex/shapeindex.cpp @@ -139,14 +139,15 @@ int main (int argc,char** argv) int offset=shp.pos(); int record_number=shp.read_xdr_integer(); int content_length=shp.read_xdr_integer(); - + shp.skip(4); + std::cout << "offset= "<< offset << std::endl; + Envelope item_ext; if (shape_type==shape_io::shape_point) { double x=shp.read_double(); double y=shp.read_double(); - shp.skip(2*content_length-2*8-4); item_ext=Envelope(x,y,x,y); } @@ -155,7 +156,6 @@ int main (int argc,char** argv) double x=shp.read_double(); double y=shp.read_double(); shp.read_double(); - shp.skip(2*content_length-3*8-4); item_ext=Envelope(x,y,x,y); } @@ -165,7 +165,6 @@ int main (int argc,char** argv) double y=shp.read_double(); shp.read_double(); shp.read_double(); - shp.skip(2*content_length-4*8-4); item_ext=Envelope(x,y,x,y); }