Package org.mapfish.print.map.geotools
Class FeaturesParser
java.lang.Object
org.mapfish.print.map.geotools.FeaturesParser
Parser for GeoJson features collection.
Created by Stéphane Brunner on 16/4/14.
-
Constructor Summary
ConstructorsConstructorDescriptionFeaturesParser(MfClientHttpRequestFactory httpRequestFactory, boolean forceLongitudeFirst) Construct. -
Method Summary
Modifier and TypeMethodDescriptionfinal org.geotools.data.simple.SimpleFeatureCollectionGet the features collection from a GeoJson inline string or URL.final org.geotools.data.simple.SimpleFeatureCollectiontreatStringAsGeoJson(String geoJsonString) Get the features collection from a GeoJson inline string.final org.geotools.data.simple.SimpleFeatureCollectiontreatStringAsURL(Template template, String geoJsonUrl) Get the features collection from a GeoJson URL.
-
Constructor Details
-
FeaturesParser
Construct.- Parameters:
httpRequestFactory- the HTTP request factoryforceLongitudeFirst- if true then force longitude coordinate as first coordinate
-
-
Method Details
-
autoTreat
public final org.geotools.data.simple.SimpleFeatureCollection autoTreat(Template template, String features) throws IOException Get the features collection from a GeoJson inline string or URL.- Parameters:
template- the templatefeatures- what to parse- Returns:
- the feature collection
- Throws:
IOException
-
treatStringAsURL
public final org.geotools.data.simple.SimpleFeatureCollection treatStringAsURL(Template template, String geoJsonUrl) throws IOException Get the features collection from a GeoJson URL.- Parameters:
template- the templategeoJsonUrl- what to parse- Returns:
- the feature collection
- Throws:
IOException
-
treatStringAsGeoJson
public final org.geotools.data.simple.SimpleFeatureCollection treatStringAsGeoJson(String geoJsonString) throws IOException Get the features collection from a GeoJson inline string.- Parameters:
geoJsonString- what to parse- Returns:
- the feature collection
- Throws:
IOException
-