Tag Info

New answers tagged

0

You need to go with option 2 and the URL it wants is the location of the XSD file which will be in the top of the GML that is within your ServletRequest. So you need to open the root element and extract the namespaces and schema URLs. Then you can create the name and URL from that: GML gml = new GML(Version.WFS1_0); gml.setCoordinateReferenceSystem( ...


-1

private Style createStyle2(FeatureSource featureSource) { SimpleFeatureType schema = (SimpleFeatureType)featureSource.getSchema(); Class geomType = schema.getGeometryDescriptor().getType().getBinding(); if (Polygon.class.isAssignableFrom(geomType) || MultiPolygon.class.isAssignableFrom(geomType)) { ...


3

You need to import the GeoJSON plugn <dependency> <groupId>org.geotools</groupId> <artifactId>gt-geojson</artifactId> <version>${geotools.version}</version> </dependency> and then call it like this (a full example is here): public String geoData() { final GeometryBuilder builder = new ...


0

Check your class path, it might miss the jars that are able to read the shape file: Check the availabel DataStores: Iterator availableStores = DataStoreFinder.getAvailableDataStores(); LOGGER.info("List available Stores: {"); while (availableStores.hasNext()) { LOGGER.info(availableStores.next().toString()); } ...


1

You can check the code out of the repository and do pretty much anything you like with it. You might also want to look at the GeoTools code that underlies much of the GeoServer code. GeoServer code is licensed under the GPL - so there are some restrictions on what you can do with it, mostly related to releasing programs without releasing your changes to ...



Top 50 recent answers are included