Examples of Shapefile


Examples of com.bbn.openmap.layer.shape.ShapeFile

     * @param graphics OMGraphics from VPF database to write to shape
     *        file.
     */
    public void writeShapeFile(String shapeFileName, OMGraphicList graphics) {
        try {
            ShapeFile s = new ShapeFile(shapeFileName);
            int nGraphics = graphics.size();
            if (nGraphics > 0) {
                OMGraphic omg = graphics.getOMGraphicAt(0);
                if ((omg instanceof OMPoly)
                        && (omg.getRenderType() == OMGraphic.RENDERTYPE_LATLON)) {
                    int shapeType = ((OMPoly) omg).isPolygon() ? ShapeUtils.SHAPE_TYPE_POLYGON
                            : ShapeUtils.SHAPE_TYPE_ARC;
                    System.out.println("shapeType=" + shapeType);
                    s.setShapeType(shapeType);
                }
            }

            System.out.println(nGraphics + " candidates.");

View Full Code Here

Examples of com.vividsolutions.jtstest.testbuilder.io.shapefile.Shapefile

  }
   
  private static Geometry readGeometriesFromShapefile(String filename, GeometryFactory geomFact)
  throws Exception
  {
    Shapefile shpfile = new Shapefile(new FileInputStream(filename));
    shpfile.readStream(geomFact);
    List geomList = new ArrayList();
    do {
      Geometry geom = shpfile.next();
      if (geom == null)
        break;
      geomList.add(geom);
    } while (true);
   
View Full Code Here

Examples of gov.nasa.worldwind.formats.shapefile.Shapefile

            String str = "WWUtil.isEmpty(source)";
            OurShapefileLoaderPoint._LOGGER_.severe(str);
            throw new Exception(str);
        }
       
        Shapefile shp = null;
     
        try
        {
            shp = new Shapefile(source);
           
            if (shp == null)
            {
                  String str = "shp == null";
                  OurShapefileLoaderPoint._LOGGER_.severe(str);
                  throw new Exception(str);
            }
           
            String strTypeShape = shp.getShapeType();
           
            if (Shapefile.isMultiPointType(strTypeShape))
            {
                alt = OurShapefileLoaderPoint._s_getRecordsMultiPointUnique_(shp);
            }
View Full Code Here

Examples of gov.nasa.worldwind.formats.shapefile.Shapefile

            String str = "WWUtil.isEmpty(source)";
            OurShapefileLoaderLineOpen._LOGGER_.severe(str);
            throw new Exception(str);
        }
       
        Shapefile shp = null;
     
        try
        {
            shp = new Shapefile(source);
            alt = OurShapefileLoaderLineOpen._s_getRecordsLinestring_(shp);
        }
               
        finally
        {
View Full Code Here

Examples of gov.nasa.worldwind.formats.shapefile.Shapefile

            OurShapefileLoaderLineClosed._LOGGER_.severe(strLog);
            String strMessage = "Empty file";
            throw new Exception(strMessage);
        }
       
        Shapefile shp = null;
     
        try
        {
            shp = new Shapefile(source);
            alt = OurShapefileLoaderLineClosed._s_getRecordsPolygon_(shp);
        }
               
        finally
        {
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.