congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
WKBReader
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: deegree/deegree3

@Override
public Geometry toParticle( ResultSet rs, int colIndex )
            throws SQLException {
  byte[] wkb = rs.getBytes( colIndex );
  if ( wkb == null ) {
    return null;
  }
  try {
    return WKBReader.read( wkb, crs );
  } catch ( Throwable t ) {
    throw new IllegalArgumentException( t.getMessage(), t );
  }
}
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( String wkt )
            throws ParseException {
  try {
    org.postgis.Geometry g = org.postgis.PGgeometry.geomFromString( wkt );
    byte[] bs = new BinaryWriter().writeBinary( g );
    return WKBReader.read( bs, crs );
  } catch ( SQLException e ) {
    e.printStackTrace();
    // wrap the exception nicely as to not break 172643521 API calls
    throw new ParseException( e );
  }
}
origin: deegree/deegree3

if ( bs != null ) {
  try {
    Geometry geom = WKBReader.read( bs, crs );
    props.add( new GenericProperty( pt, geom ) );
  } catch ( ParseException e ) {
org.deegree.geometry.ioWKBReader

Javadoc

Reads Geometry objects encoded as Well-Known Binary (WKB). TODO re-implement without delegating to JTS TODO add support for non-SFS geometries (e.g. non-linear curves)

Most used methods

  • read

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (Timer)
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • String (java.lang)
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Notification (javax.management)
  • JList (javax.swing)
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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