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

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

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

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

@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

  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.ioWKTReaderread

Popular methods of WKTReader

  • <init>

Popular in Java

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • onCreateOptionsMenu (Activity)
  • getApplicationContext (Context)
  • Kernel (java.awt.image)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Best plugins for Eclipse
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