Skip to main content

It's Shapely with projections and some other conveniences!

Project description

Shapely is great for working with geometries, but if you’re dealing with Geographic Information Systems (GIS) there are times when you really need your geometries to have some awareness of spatial reference. This project seeks to combine Shapely with pyproj and some other conveniences to make working with geometries across spatial references easy and fun!

Project Features

Getting Started

The project’s documentation contains a section to help you get started as a developer or user of the library.

Examples

WGS84 to UTM

In this example we’ll start with a latitude and a longitude and create a point that happens to be in UTM zone 15N (32615). We’ll then use the as_utm method to create the equivalent point in the UTM coordinate system.

from shapeit import SrPoint

# Create a point from a latitude, longitude.
wgs84 = SrPoint.from_lat_lon(lat=45.553670, lon=-94.142430)

# Convert it to UTM.
utm = wgs84.as_utm()

# What are the coordinates of the UTM point?
print(f'x={utm.x}, y={utm.y}')

# What's the SRID of the UTM point's coordinate system.
print(f"The UTM SRID is: {utm.srid}")
x=410830.5412685075, y=5045093.805781859
The UTM SRID is: 32615

For more examples and other information, visit the documentation page.

Development Prerequisites

If you’re going to be working in the code (rather than just using the library), you’ll want a few utilities.

Resources

Below are some handy resource links.

  • Project Documentation

  • Click is a Python package for creating beautiful command line interfaces in a composable way with as little code as necessary.

  • Sphinx is a tool that makes it easy to create intelligent and beautiful documentation, written by Geog Brandl and licnsed under the BSD license.

  • pytest helps you write better programs.

  • [GNU Make] is a tool which controls the generation of executables and other non-source files of a program from the program’s source files.

Authors

  • Pat Daburu - Initial work - github

See also the list of contributors who participated in this project.

LicenseMIT License

Copyright (c) patdaburu

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shapeit-0.0.7.tar.gz (14.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page