Code Monkey home page Code Monkey logo

go-geom's Introduction

go-geom

PkgGoDev Go Report Card Coverage Status

Package geom implements efficient geometry types for geospatial applications.

Key features

  • OpenGeo Consortium-style geometries.
  • Support for 2D and 3D geometries, measures (time and/or distance), and unlimited extra dimensions.
  • Encoding and decoding of common geometry formats (GeoJSON, KML, WKB, and others) including sql.Scanner and driver.Value interface implementations for easy database integration.
  • 2D and 3D topology functions.
  • Efficient, cache-friendly internal representation.
  • Optional protection against malicious or malformed inputs.

Examples

Detailed features

Geometry types

Encoding and decoding

Geometry functions

  • XY 2D geometry functions
  • XYZ 3D geometry functions

Protection against malicious or malformed inputs

The WKB and EWKB formats encode geometry sizes, and memory is allocated for those geometries. If the input is malicious or malformed, the memory allocation can be very large, leading to a memory starvation denial-of-service attack against the server. For example, a client might send a MultiPoint with header indicating that it contains 2^32-1 points. This will result in the server reading that geometry to allocate 2 ร— sizeof(float64) ร— (2^32-1) = 64GB of memory to store those points. By default, malicious or malformed input protection is disabled, but can be enabled by setting positive values for wkbcommon.MaxGeometryElements.

License

BSD-2-Clause

go-geom's People

Contributors

aabizri avatar bjamet avatar erikgrinaker avatar icholy avatar kostub avatar larsgh avatar otan avatar sams96 avatar twpayne avatar vcabbage avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.