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