congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
WKTReader
Code IndexAdd Tabnine to your IDE (free)

How to use
WKTReader
in
org.deegree.geometry.io

Best Java code snippets using org.deegree.geometry.io.WKTReader (Showing top 4 results out of 315)

origin: deegree/deegree3

@Override
public Geometry toParticle( ResultSet rs, int colIndex )
            throws SQLException {
  Object sqlValue = rs.getObject( colIndex );
  try {
    if ( sqlValue != null ) {
      if ( sqlValue instanceof byte[] ) {
        if ( is2d ) {
          return WKBReader.read( (byte[]) sqlValue, crs );
        }
        // hur hur, not using cp1252 any more, are we?
        sqlValue = new String( (byte[]) sqlValue, "UTF-16LE" );
      }
      return new WKTReader( crs ).read( sqlValue.toString() );
    }
  } catch ( Throwable e ) {
    throw new SQLException( e );
  }
  return null;
}
origin: deegree/deegree3

public Geometry read( Reader reader )
            throws ParseException {
  try {
    return read( IOUtils.toString( reader ) );
  } catch ( IOException e ) {
    // wrap the exception nicely as to not break 172643521 API calls
    throw new ParseException( e );
  }
}
origin: deegree/deegree3

  return fac.createEnvelope( -180, -90, 180, 90, CRSUtils.EPSG_4326 );
Geometry g = new WKTReader( crs ).read( bboxString );
cachedEnvelope.first = current;
cachedEnvelope.second = g.getEnvelope();
origin: deegree/deegree3

  @Override
  public <T> TypedObjectNode[] evaluate( T obj, XPathEvaluator<T> xpathEvaluator )
              throws FilterEvaluationException {
    TypedObjectNode[] crs = getParams()[0].evaluate( obj, xpathEvaluator );
    TypedObjectNode[] geom = getParams()[1].evaluate( obj, xpathEvaluator );
    if ( crs.length != 1 ) {
      throw new FilterEvaluationException( "The GeometryFromWKT function's first argument must "
                         + "evaluate to exactly one value." );
    }
    if ( geom.length != 1 ) {
      throw new FilterEvaluationException( "The GeometryFromWKT function's second argument must "
                         + "evaluate to exactly one value." );
    }
    ICRS srs = CRSManager.getCRSRef( crs[0].toString() );
    String wkt = geom[0].toString();
    WKTReader reader = new WKTReader( srs );
    try {
      return new TypedObjectNode[] { reader.read( wkt ) };
    } catch ( ParseException e ) {
      LOG.trace( "Stack trace:", e );
      throw new FilterEvaluationException( "GeometryFromWKT error while parsing WKT: "
                         + e.getLocalizedMessage() );
    }
  }
};
org.deegree.geometry.ioWKTReader

Javadoc

Reads Geometry objects encoded as Well-Known Text (WKT). TODO re-implement without delegating to JTS TODO add support for non-SFS geometries (e.g. non-linear curves) TODO TODO TODO do not go about using PostGIS for parsing the WKT, generate WKB and then parse it back using JTS TODO TODO TODO repeat after me s/TODO/TODO TODO/g

Most used methods

  • read
  • <init>

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • putExtra (Intent)
  • addToBackStack (FragmentTransaction)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Option (scala)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now