Ejemplo n.º 1
0
        public static DataSource GetOpenDS(int ds_number)
        {
            IntPtr     cPtr = OgrPINVOKE.GetOpenDS(ds_number);
            DataSource ret  = (cPtr == IntPtr.Zero) ? null : new DataSource(cPtr, false, ThisOwn_false());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 2
0
        public GeomFieldDefn GetGeomFieldDefn(int i)
        {
            IntPtr        cPtr = OgrPINVOKE.FeatureDefn_GetGeomFieldDefn(swigCPtr, i);
            GeomFieldDefn ret  = (cPtr == IntPtr.Zero) ? null : new GeomFieldDefn(cPtr, false, ThisOwn_false());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 3
0
        public DataSource CreateDataSource(string utf8_path, string[] options)
        {
            IntPtr     cPtr = OgrPINVOKE.Driver_CreateDataSource(swigCPtr, Ogr.StringToUtf8Bytes(utf8_path), (options != null)? new OgrPINVOKE.StringListMarshal(options)._ar : null);
            DataSource ret  = (cPtr == IntPtr.Zero) ? null : new DataSource(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 4
0
        public Geometry Centroid()
        {
            IntPtr   cPtr = OgrPINVOKE.Geometry_Centroid(swigCPtr);
            Geometry ret  = (cPtr == IntPtr.Zero) ? null : new Geometry(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 5
0
        public FieldDefn GetFieldDefnRef(string field_name)
        {
            IntPtr    cPtr = OgrPINVOKE.Feature_GetFieldDefnRef__SWIG_1(swigCPtr, field_name);
            FieldDefn ret  = (cPtr == IntPtr.Zero) ? null : new FieldDefn(cPtr, false, ThisOwn_false());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 6
0
        public Geometry SimplifyPreserveTopology(double tolerance)
        {
            IntPtr   cPtr = OgrPINVOKE.Geometry_SimplifyPreserveTopology(swigCPtr, tolerance);
            Geometry ret  = (cPtr == IntPtr.Zero) ? null : new Geometry(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 7
0
        public Geometry SymmetricDifference(Geometry other)
        {
            IntPtr   cPtr = OgrPINVOKE.Geometry_SymmetricDifference(swigCPtr, Geometry.getCPtr(other));
            Geometry ret  = (cPtr == IntPtr.Zero) ? null : new Geometry(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 8
0
        public Geometry GetLinearGeometry(double dfMaxAngleStepSizeDegrees, string[] options)
        {
            IntPtr   cPtr = OgrPINVOKE.Geometry_GetLinearGeometry(swigCPtr, dfMaxAngleStepSizeDegrees, (options != null)? new OgrPINVOKE.StringListMarshal(options)._ar : null);
            Geometry ret  = (cPtr == IntPtr.Zero) ? null : new Geometry(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 9
0
        public Geometry GetCurveGeometry(string[] options)
        {
            IntPtr   cPtr = OgrPINVOKE.Geometry_GetCurveGeometry(swigCPtr, (options != null)? new OgrPINVOKE.StringListMarshal(options)._ar : null);
            Geometry ret  = (cPtr == IntPtr.Zero) ? null : new Geometry(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 10
0
        public static Geometry CreateGeometryFromJson(string input_string)
        {
            IntPtr   cPtr = OgrPINVOKE.CreateGeometryFromJson(input_string);
            Geometry ret  = (cPtr == IntPtr.Zero) ? null : new Geometry(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 11
0
        public static Geometry BuildPolygonFromEdges(Geometry hLineCollection, int bBestEffort, int bAutoClose, double dfTolerance)
        {
            IntPtr   cPtr = OgrPINVOKE.BuildPolygonFromEdges(Geometry.getCPtr(hLineCollection), bBestEffort, bAutoClose, dfTolerance);
            Geometry ret  = (cPtr == IntPtr.Zero) ? null : new Geometry(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 12
0
        public static Geometry CreateGeometryFromWkt(ref string val, OSGeo.OSR.SpatialReference reference)
        {
            IntPtr   cPtr = OgrPINVOKE.CreateGeometryFromWkt(ref val, OSGeo.OSR.SpatialReference.getCPtr(reference));
            Geometry ret  = (cPtr == IntPtr.Zero) ? null : new Geometry(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 13
0
        public static Driver GetDriver(int driver_number)
        {
            IntPtr cPtr = OgrPINVOKE.GetDriver(driver_number);
            Driver ret  = (cPtr == IntPtr.Zero) ? null : new Driver(cPtr, false, ThisOwn_false());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 14
0
        public static DataSource OpenShared(string utf8_path, int update)
        {
            IntPtr     cPtr = OgrPINVOKE.OpenShared(System.Text.Encoding.Default.GetString(System.Text.Encoding.UTF8.GetBytes(utf8_path)), update);
            DataSource ret  = (cPtr == IntPtr.Zero) ? null : new DataSource(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 15
0
        public StyleTable GetStyleTable()
        {
            IntPtr     cPtr = OgrPINVOKE.DataSource_GetStyleTable(swigCPtr);
            StyleTable ret  = (cPtr == IntPtr.Zero) ? null : new StyleTable(cPtr, false, ThisOwn_false());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 16
0
        public Geometry Value(double dfDistance)
        {
            IntPtr   cPtr = OgrPINVOKE.Geometry_Value(swigCPtr, dfDistance);
            Geometry ret  = (cPtr == IntPtr.Zero) ? null : new Geometry(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 17
0
        public Geometry GetGeometryRef(int geom)
        {
            IntPtr   cPtr = OgrPINVOKE.Geometry_GetGeometryRef(swigCPtr, geom);
            Geometry ret  = (cPtr == IntPtr.Zero) ? null : new Geometry(cPtr, false, ThisOwn_false());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 18
0
        public Geometry DelaunayTriangulation(double dfTolerance, int bOnlyEdges)
        {
            IntPtr   cPtr = OgrPINVOKE.Geometry_DelaunayTriangulation(swigCPtr, dfTolerance, bOnlyEdges);
            Geometry ret  = (cPtr == IntPtr.Zero) ? null : new Geometry(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 19
0
        public Geometry Buffer(double distance, int quadsecs)
        {
            IntPtr   cPtr = OgrPINVOKE.Geometry_Buffer(swigCPtr, distance, quadsecs);
            Geometry ret  = (cPtr == IntPtr.Zero) ? null : new Geometry(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 20
0
        public Driver GetDriver()
        {
            IntPtr cPtr = OgrPINVOKE.DataSource_GetDriver(swigCPtr);
            Driver ret  = (cPtr == IntPtr.Zero) ? null : new Driver(cPtr, false, ThisOwn_false());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 21
0
        public OSGeo.OSR.SpatialReference GetSpatialReference()
        {
            IntPtr cPtr = OgrPINVOKE.Geometry_GetSpatialReference(swigCPtr);

            OSGeo.OSR.SpatialReference ret = (cPtr == IntPtr.Zero) ? null : new OSGeo.OSR.SpatialReference(cPtr, true, ThisOwn_true());
            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 22
0
        public Layer CreateLayer(string name, OSGeo_v3.OSR.SpatialReference srs, wkbGeometryType geom_type, string[] options)
        {
            IntPtr cPtr = OgrPINVOKE.DataSource_CreateLayer(swigCPtr, name, OSGeo_v3.OSR.SpatialReference.getCPtr(srs), (int)geom_type, (options != null)? new OgrPINVOKE.StringListMarshal(options)._ar : null);
            Layer  ret  = (cPtr == IntPtr.Zero) ? null : new Layer(cPtr, false, ThisOwn_false());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 23
0
        public Feature Clone()
        {
            IntPtr  cPtr = OgrPINVOKE.Feature_Clone(swigCPtr);
            Feature ret  = (cPtr == IntPtr.Zero) ? null : new Feature(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 24
0
        public Layer CopyLayer(Layer src_layer, string new_name, string[] options)
        {
            IntPtr cPtr = OgrPINVOKE.DataSource_CopyLayer(swigCPtr, Layer.getCPtr(src_layer), new_name, (options != null)? new OgrPINVOKE.StringListMarshal(options)._ar : null);
            Layer  ret  = (cPtr == IntPtr.Zero) ? null : new Layer(cPtr, false, ThisOwn_false());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 25
0
        public FeatureDefn GetDefnRef()
        {
            IntPtr      cPtr = OgrPINVOKE.Feature_GetDefnRef(swigCPtr);
            FeatureDefn ret  = (cPtr == IntPtr.Zero) ? null : new FeatureDefn(cPtr, false, ThisOwn_false());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 26
0
        public Layer GetLayerByName(string layer_name)
        {
            IntPtr cPtr = OgrPINVOKE.DataSource_GetLayerByName(swigCPtr, layer_name);
            Layer  ret  = (cPtr == IntPtr.Zero) ? null : new Layer(cPtr, false, ThisOwn_false());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 27
0
        public DataSource Open(string utf8_path, int update)
        {
            IntPtr     cPtr = OgrPINVOKE.Driver_Open(swigCPtr, Ogr.StringToUtf8Bytes(utf8_path), update);
            DataSource ret  = (cPtr == IntPtr.Zero) ? null : new DataSource(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 28
0
        public Layer ExecuteSQL(string statement, Geometry spatialFilter, string dialect)
        {
            IntPtr cPtr = OgrPINVOKE.DataSource_ExecuteSQL(swigCPtr, statement, Geometry.getCPtr(spatialFilter), dialect);
            Layer  ret  = (cPtr == IntPtr.Zero) ? null : new Layer(cPtr, false, ThisOwn_false());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 29
0
        public Geometry GetGeomFieldRef(string name)
        {
            IntPtr   cPtr = OgrPINVOKE.Feature_GetGeomFieldRef__SWIG_1(swigCPtr, name);
            Geometry ret  = (cPtr == IntPtr.Zero) ? null : new Geometry(cPtr, false, ThisOwn_false());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 30
0
        public static Geometry ForceToMultiLineString(Geometry geom_in)
        {
            IntPtr   cPtr = OgrPINVOKE.ForceToMultiLineString(Geometry.getCPtr(geom_in));
            Geometry ret  = (cPtr == IntPtr.Zero) ? null : new Geometry(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }