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
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.1.tar.gz (2.0 MB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: coordinate_finder-1.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.35.0 CPython/3.7.3

File hashes

Hashes for coordinate_finder-1.1.tar.gz
Algorithm Hash digest
SHA256 5ff6532631ce960d1d98a8c00a429925e8bb6be8ba8e027f90d6cf66b371ea3c
MD5 25c48c28635a3dd1025bd47b06b30843
BLAKE2b-256 e201a4d9fbe147fd6c2e64d562037b9cdbdfc344c10796012a25de9558da56fe

See more details on using hashes here.

Supported by

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