Class FeaturesParser

java.lang.Object
org.mapfish.print.map.geotools.FeaturesParser

public class FeaturesParser extends Object
Parser for GeoJson features collection.

Created by Stéphane Brunner on 16/4/14.

  • Constructor Details

    • FeaturesParser

      public FeaturesParser(MfClientHttpRequestFactory httpRequestFactory, boolean forceLongitudeFirst)
      Construct.
      Parameters:
      httpRequestFactory - the HTTP request factory
      forceLongitudeFirst - 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 template
      features - 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 template
      geoJsonUrl - 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