Skip to content
Permalink
Browse files

WaSP: on creation, make sure the layer geometry type set on the featu…

…re definition is wkbLineString25D
  • Loading branch information...
rouault committed May 15, 2019
1 parent 75e9532 commit 00b24922c54ad2cc203f397fc237dea1c58a416a
Showing with 3 additions and 3 deletions.
  1. +0 −2 gdal/ogr/ogrsf_frmts/wasp/ogrwasp.h
  2. +3 −1 gdal/ogr/ogrsf_frmts/wasp/ogrwasplayer.cpp
@@ -159,8 +159,6 @@ class OGRWAsPLayer : public OGRLayer

virtual OGRFeature *GetNextFeature() override;
OGRFeature *GetNextRawFeature();
virtual OGRwkbGeometryType GetGeomType() override { return wkbLineString25D; }
virtual OGRSpatialReference *GetSpatialRef() override { return poSpatialReference; }
virtual const char *GetName() override { return sName.c_str(); }
};

@@ -58,7 +58,6 @@ OGRWAsPLayer::OGRWAsPLayer( const char * pszName,
{
SetDescription( poLayerDefn->GetName() );
poLayerDefn->Reference();
poLayerDefn->SetGeomType( wkbLineString25D );
poLayerDefn->GetGeomFieldDefn(0)->SetType( wkbLineString25D );
poLayerDefn->GetGeomFieldDefn(0)->SetSpatialRef( poSpatialReference );
if( poSpatialReference ) poSpatialReference->Reference();
@@ -92,7 +91,10 @@ OGRWAsPLayer::OGRWAsPLayer( const char * pszName,
pdfAdjacentPointTolerance(pdfAdjacentPointToleranceParam),
pdfPointToCircleRadius(pdfPointToCircleRadiusParam)
{
SetDescription( poLayerDefn->GetName() );
poLayerDefn->Reference();
poLayerDefn->GetGeomFieldDefn(0)->SetType( wkbLineString25D );
poLayerDefn->GetGeomFieldDefn(0)->SetSpatialRef( poSpatialReference );
if (poSpatialReference) poSpatialReference->Reference();
}

0 comments on commit 00b2492

Please sign in to comment.
You can’t perform that action at this time.