Skip to main content

Package to find equidistant Lat & Long coordinates

Project description

Mars Coordinate Finder

Contents

  1. Description
  2. Installation
  3. Usage
  4. Generating a JSON file that bounds a required location

Description

  • This package allows the user to generate equidistant latitude and longitude coordinates within a region defined by the user.

  • As most of the work done within Mars is not concerned with locations within the ocean, this package limits the coordinates to those that are on land and ensures the equidistant locations are only over land mass.

  • There are two methods within this package:

    • The first can find equidistant coordinates within a region bounded by North, South, East and West coordinates.
    • The second can take a JSON file that defines the boundary coordinates of given region and creates equidistant points within this region
  • The result of either of these methods can be stored as a JSON for use using the createJSON method

Installation

Use the package manager pip to install coordinate_finder

pip install coordinate-finder

Usage

To use this package you can reference the following commands as an example:

from coordinate_finder import Marscoordfinder
coords = Marscoordfinder()

# Code to generate equidistant points within a boxed region
# land_points are points within the region on land
# equidistant_points are the number of coordinates (in this case 40) equidistant across the land in this region
# n & s are the North and South Latitudes you wish to use as the boundaries
# e & w are the East and West longitudes you wish to use as Boundaries
# fidelity is the granularity of the defined grid, a smaller fidelity will give a finer granularity
land_points, equidistant_points = coords.getNPointsInRegion(40, n=30, s=26, e=86.9, w=83.3, fidelity = 0.08)

# Code to generate equidistant points within a custom defined boundary
land_points, equidistant_points = coords.pointsInRegion(40,'BRA_Shape_Points.json')

# Code to write the calculated coordinates to a JSON file
coords.createJson(equidistant_points, 'C:/Users/smithjoh/Documents/output_coords.json')

Generating a JSON file that bounds a required location

  • Go to https://gadm.org/download_country_v3.html and search for the country you want a region within
  • Download the shapefile for this country
  • Go to https://mapshaper.org/ and upload all the files at the _0 level (this will give the country outline)
  • Export the GeoJSON files which will give a JSON file of all the cooridnates of the country outlines
  • This can now be used with the package

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

coordinate_finder-1.2.1.tar.gz (2.0 MB view details)

Uploaded Source

File details

Details for the file coordinate_finder-1.2.1.tar.gz.

File metadata

  • Download URL: coordinate_finder-1.2.1.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.3

File hashes

Hashes for coordinate_finder-1.2.1.tar.gz
Algorithm Hash digest
SHA256 60b4b510c9b4e48c0ee4dbd0b1b065390eedc45c0cd92a1e2d25f42c2e6051f2
MD5 a858a044b0e28ddc9b120a339f928b6e
BLAKE2b-256 c2d710d2a76c687bf134b0c3edb9b947a9989ade8ad33ab650e71e9406ea137b

See more details on using hashes here.

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