Examples of GetLayerDefn()


Examples of org.gdal.ogr.Layer.GetLayerDefn()

        /*
         * Invoke.
         */

        FeatureDefn feature = layer.GetLayerDefn();
       
        gdal.ContourGenerate(band, contourInterval, offset, fixedLevelsDouble,
                (ignoreNodata ? 1 : 0), sourceNodata, layer, feature.GetFieldIndex("ID"),
                (attributName != null ? feature.GetFieldIndex(attributName) : -1),
                progressCallback);
View Full Code Here

Examples of org.gdal.ogr.Layer.GetLayerDefn()

                     {
                        if( args[iArg].equalsIgnoreCase("-lnum")
                              && Integer.parseInt(args[iArg+1]) == iLayer )
                           bRequested = true;
                        else if( args[iArg].equalsIgnoreCase("-lname")
                              && args[iArg+1].equalsIgnoreCase(poLayer.GetLayerDefn().GetName()) )
                           bRequested = true;
                     }

                     if( !bRequested )
                        continue;
View Full Code Here

Examples of org.gdal.ogr.Layer.GetLayerDefn()

                        alreadyExistingSpatialRefValid = true;
                        alreadyExistingSpatialRef =
                           (poLayer.GetSpatialRef()!=null) ? poLayer.GetSpatialRef().Clone() : null;

                           if (poFeatureDefn == null) {
                              poFeatureDefn = CloneFeatureDefn(poLayer.GetLayerDefn()); // XXX: no Clone supported in java binding!!
                           }
                     }
                     poDS.delete();
                  }
               }
View Full Code Here

Examples of org.gdal.ogr.Layer.GetLayerDefn()

            {
               if( args[iArg].equalsIgnoreCase("-lnum")
                     && Integer.parseInt(args[iArg+1]) == iLayer )
                  bRequested = true;
               else if( args[iArg].equalsIgnoreCase("-lname")
                     && args[iArg+1].equalsIgnoreCase(poLayer.GetLayerDefn().GetName()) )
                  bRequested = true;
            }

            if( !bRequested )
               continue;
View Full Code Here

Examples of org.gdal.ogr.Layer.GetLayerDefn()

            /* -------------------------------------------------------------------- */
            /*    Check if all layers in dataset have the same attributes  schema. */
            /* -------------------------------------------------------------------- */
            if( poFeatureDefn == null )
            {
               poFeatureDefn = CloneFeatureDefn(poLayer.GetLayerDefn()); // XXX: no Clone supported in java binding!!
            }
            else if ( !accept_different_schemas )
            {
               FeatureDefn poFeatureDefnCur = poLayer.GetLayerDefn();
               assert(null != poFeatureDefnCur);
View Full Code Here

Examples of org.gdal.ogr.Layer.GetLayerDefn()

            {
               poFeatureDefn = CloneFeatureDefn(poLayer.GetLayerDefn()); // XXX: no Clone supported in java binding!!
            }
            else if ( !accept_different_schemas )
            {
               FeatureDefn poFeatureDefnCur = poLayer.GetLayerDefn();
               assert(null != poFeatureDefnCur);

               int fieldCount = poFeatureDefnCur.GetFieldCount();

               if( fieldCount != poFeatureDefn.GetFieldCount())
View Full Code Here

Examples of org.gdal.ogr.Layer.GetLayerDefn()

               int fieldCount = poFeatureDefnCur.GetFieldCount();

               if( fieldCount != poFeatureDefn.GetFieldCount())
               {
                  System.err.print("Number of attributes of layer "+poLayer.GetLayerDefn().GetName()+" of "+args[nFirstSourceDataset]+" does not match ... skipping it.\n");

                  if (bFirstWarningForNonMatchingAttributes)
                  {
                     System.err.print("Note : you can override this behaviour with -accept_different_schemas option\n"
                           + "but this may result in a tileindex incompatible with MapServer\n");
View Full Code Here

Examples of org.gdal.ogr.Layer.GetLayerDefn()

                  if( !poField.GetTypeName().equalsIgnoreCase(poFieldCur.GetTypeName())
                        || poField.GetWidth() != poFieldCur.GetWidth()
                        || poField.GetPrecision() != poFieldCur.GetPrecision()
                        || !poField.GetNameRef().equalsIgnoreCase(poFieldCur.GetNameRef()) )
                  {
                     System.err.print("Schema of attributes of layer "+poLayer.GetLayerDefn().GetName()+" of "+args[nFirstSourceDataset]+" does not match ... skipping it.\n");

                     if (bFirstWarningForNonMatchingAttributes)
                     {
                        System.err.print("Note : you can override this behaviour with -accept_different_schemas option\n"
                              + "but this may result in a tileindex incompatible with MapServer\n");
View Full Code Here

Examples of org.gdal.ogr.Layer.GetLayerDefn()

            double sExtents[] = poLayer.GetExtent(true);
            Geometry/*Polygon*/ oRegion = new Geometry(ogr.wkbPolygon);
            Geometry/*LinearRing*/ oRing = new Geometry(ogr.wkbLinearRing);
            
            if (sExtents == null) {
               System.err.print("GetExtent() failed on layer "+poLayer.GetLayerDefn().GetName()+" of "+args[nFirstSourceDataset]+", skipping.\n");
               continue;
            }
                                   
            // XXX: sExtents [minX, maxX, minY, maxY]
            //oRing.addPoint( sExtents.MinX, sExtents.MinY );
View Full Code Here

Examples of org.gdal.ogr.Layer.GetLayerDefn()

                                    pszZField, pszWHERE, pfnProgress)
                    && !bSkipFailures )
                {
                    System.err.println(
                            "Terminating translation prematurely after failed\n" +
                            "translation of layer " + poLayer.GetLayerDefn().GetName() + " (use -skipfailures to skip errors)");

                    System.exit( 1 );
                }
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.