Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

RGeo component for reading and writing GeoJSON

License

NotificationsYou must be signed in to change notification settings

rgeo/rgeo-geojson

Repository files navigation

Gem VersionCI

rgeo-geojson is an extension toRGeothat provides GeoJSON encoding and decoding.

Summary

RGeo is a key component for writing location-aware applications in the Rubyprogramming language. At its core is an implementation of the industrystandard OGC Simple Features Specification, which provides datarepresentations of geometric objects such as points, lines, and polygons,along with a set of geometric analysis operations. See the README for the"rgeo" gem for more information.

RGeo::GeoJSON is an optional RGeo module that provides GeoJSON encodingand decoding.GeoJSON is a JSON format used forgeographic data structures.

Example:

require'rgeo/geo_json'str1='{"type":"Point","coordinates":[1,2]}'geom=RGeo::GeoJSON.decode(str1)geom.as_text# => "POINT (1.0 2.0)"str2='{"type":"Feature","geometry":{"type":"Point","coordinates":[2.5,4.0]},"properties":{"color":"red"}}'feature=RGeo::GeoJSON.decode(str2)feature['color']# => 'red'feature.geometry.as_text# => "POINT (2.5 4.0)"hash=RGeo::GeoJSON.encode(feature)hash.to_json ==str2# => true

Install

RGeo::GeoJSON requires:

  • Ruby 2.1.0 or later
  • rgeo 1.0.0 or later

Include in your bundle:

gem'rgeo-geojson'

Installrgeo-geojson as a gem:

gem install rgeo-geojson

See the README for thergeo gem, a required dependency, for further installation information.

Development and support

RDoc Documentation is available athttp://rdoc.info/gems/rgeo-geojson

Source code is hosted on Github athttps://github.com/rgeo/rgeo-geojson

Contributions are welcome. Fork the project on Github.

Report bugs on Github issues athttp://github.com/rgeo/rgeo-geojson/issues

Acknowledgments

RGeo was created by Daniel Azuma (http://www.daniel-azuma.com).

Development is/was supported byPirq andNeighborland.

License

Copyright (c) Daniel Azuma, Tee Parham

https://github.com/rgeo/rgeo-geojson/blob/master/LICENSE.txt

About

RGeo component for reading and writing GeoJSON

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

    Packages

    No packages published

    Languages


    [8]ページ先頭

    ©2009-2025 Movatter.jp