coordinate-conversion | Python class for converting latitude longitude coordinates | Map library
kandi X-RAY | coordinate-conversion Summary
kandi X-RAY | coordinate-conversion Summary
coordinate-conversion
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Convert latitude and longitude to UTM
- Get the zone of the given latitude .
- Initialize the model .
- Calculate and return the farthing .
- Returns the zone from the given longitude .
- Calculate the Easting index .
coordinate-conversion Key Features
coordinate-conversion Examples and Code Snippets
Community Discussions
Trending Discussions on coordinate-conversion
QUESTION
I am trying to limit a large collection of UK OS Grid References (easting and northing) to only those that are in the mainland Great Britain.
-- Background on grid references --
The OS "National Grid" is formed of "easting"s and "northing"s relative to an origin (0,0). For our purposes, (700000, 1300000) is the theoretical maximum (top-right of the UK).
-- What I need, and what I've done so far --
I need to exclude any grid references that are not in mainland Great Britain (i.e. the largest island of the UK). I am happy for this to be a rough "best-guess" algorithm; but I definitely need something better than the whole range of values; which is kind of what I've got now.
The OS system splits the country into 100km squares, which is a start. This image shows how the UK is split up:
(By cmglee, Strebe, MansLaughter, Alexrk2 from naturalearthdata, Pethrus and nandhp - British National Grid.svgNorthwestern Europe on OSGB 1936 Datum.svg, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=35301574)
From that, given that each square (with two letters in) is one hundred thousand metres square, I know that I only need to consider eastings SW in the west to TG in the east (100000 to 700000) and northings in the approximate range SW..NC at the tallest point (0 to 999999) - which cuts down the numbers considerably; but there's still more to do.
What my logic so far has given me, therefore, is the rectangle SW..HW..JW..TW.
I know that, for each easting or range of eastings, I could store a map of valid northing values (and vice-versa) - and that would be one option for implementing this; however I was wondering if anyone had any other ideas. I am considering storing some kind of polygon that represents the UK, and then checking if the polygon contains the given point?
I'll be implementing in java, using integers for the easting and northing values.
My current crude method is therefore just a simple:
...ANSWER
Answered 2019-May-09 at 11:32Seems you just want a point in polygon algorithm. Try this one
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install coordinate-conversion
You can use coordinate-conversion like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page