Package org.geotools.data.shapefile

Examples of org.geotools.data.shapefile.ShapefileDataStore.createSchema()


        } finally {
            if(pw != null) pw.close();
        }

        try {
            sfds.createSchema(schema);
        } catch (NullPointerException e) {
            LOGGER.warning(
                "Error in shapefile schema. It is possible you don't have a geometry set in the output. \n"
                + "Please specify a <wfs:PropertyName>geom_column_name</wfs:PropertyName> in the request");
            throw new ServiceException(
View Full Code Here


      SimpleFeatureType featureType = neo4jDataStore.getSchema(layerName);
            GeometryDescriptor geometryType = featureType.getGeometryDescriptor();
            crs = geometryType.getCoordinateReferenceSystem();
            // crs = neo4jDataStore.getFeatureSource(layerName).getInfo().getCRS();

            shpDataStore.createSchema(featureType);
            FeatureStore store = (FeatureStore) shpDataStore.getFeatureSource();
            store.addFeatures(neo4jDataStore.getFeatureSource(layerName).getFeatures());
            tx.success();
    }
        if (crs != null)
View Full Code Here

        } finally {
            if(pw != null) pw.close();
        }

        try {
            sfds.createSchema(schema);
        } catch (NullPointerException e) {
            LOGGER.warning(
                "Error in shapefile schema. It is possible you don't have a geometry set in the output. \n"
                + "Please specify a <wfs:PropertyName>geom_column_name</wfs:PropertyName> in the request");
            throw new ServiceException(
View Full Code Here

    File directory = IOUtils.createTempDirectory("sxttmp");
        File file = new File(directory, m_sFilename);

        try {
            ShapefileDataStore dataStore = new ShapefileDataStore(DataUtilities.fileToURL(file));
            dataStore.createSchema(m_FeatureType);
            manager.addResource(new ShapefileResource(dataStore, directory));
           
            return dataStore;
        } catch(Throwable t) {
            LOGGER.log(Level.SEVERE, "Could not create shapefile output ", t);
View Full Code Here

 
    ShapefileDataStore store=null;
    Transaction transaction=null;
    try{
      store = (ShapefileDataStore) dataStoreFactory.createNewDataStore(params);
      store.createSchema(fc.getSchema());
     
      final SimpleFeatureStore featureStore =(SimpleFeatureStore) store.getFeatureSource(fc.getSchema().getName());
      transaction=featureStore.getTransaction();
     
      featureStore.addFeatures(fc);   
View Full Code Here

    {
      //File file = new File(System.getProperty("java.io.tmpdir"), name+".zip");
      File file = new File(tempDir, name/*+".zip"*/);
     
      ShapefileDataStore sfds = new ShapefileDataStore(file.toURL());
      sfds.createSchema(featureResults[0].getSchema());
     
      FeatureStore store = (FeatureStore) sfds.getFeatureSource(name);
      store.addFeatures(reader);
    }
 
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.