1

I would like to build a database of GPS coordinates spaced out .25km over all of the land in the entire world. It's a discovery project for a client that wants to perform visualization and I'm not a (GIS developer). I'm good in Unity once I have the dataset. I've downloaded QGIS but I feel the same way I felt the first time I loaded up Unity3d.

Since this is a feasibility study, I just need to be able to demonstrate that this can be completed.

Is it possible to derive the latitude and longitude for the 'centroids', of all the land on earth spaced out .25km apart, or is there already such a thing?

4
  • Welcome to GIS SE! As a new user be sure to take the Tour to learn about our focussed Q&A format. It emphasizes that there should be only one question asked per question. I recommend reviewing meta.gis.stackexchange.com/a/3353/115 for tips on how to structure a good question for GIS SE.
    – PolyGeo
    Commented Jun 2, 2021 at 22:32
  • Do you really need a complete database (with IDs and geometries) of all centroids, or would it be OK to be able to produce a unique ID (corresponding to a grid cell) for an input set of coordinates? That way you could simply associate GPS coordinates by ID as they are added
    – Simbamangu
    Commented Jun 3, 2021 at 6:05
  • Sound to me like this is akin to recreating Google Earth. Without levels of detail, this cannot work, it's just too many data points.
    – Gabriel
    Commented Jun 3, 2021 at 12:40
  • @Simbamangu no, I just need the GPS coords of the centroids. but nothing else. I am exploring a way to slice the earth like an orange, then use a calc to generate the gps centroids, then simply repeat per angle to fill the earth. Then somehow remove the oceans. As long as GPS is mathematical, this should be feasible and not to processor intensive.
    – DKinnison
    Commented Jun 4, 2021 at 14:21

2 Answers 2

3

The surface area of Earth is over 510 million square kilometers. With a post distance of 0.25km, there would need to be sixteen times that number of points. Using 8.16+ billion (10^9) points is not a viable solution to this problem, even after reducing it to land area in populated continents drops you close to the 2.1B row physical limit of file geodatabase.

The accepted answer generated a 25km x 25km grid in "4 minutes". If generating an 0.25km x 0.25km grid held to that performance velocity, it would take 40,000 minutes (roughly 28 days) to complete the raw grid. Adding point-on-land tests for each vertex would increase runtime by two or three orders of magnitude, but with some algorithmic cleverness you might get cluster-of-points-near-land evaluation to only a single order of magnitude, which now places you at 280 compute-days for creation.

Rendering 60M points takes several minutes. A full table scan on 2000M points can't take less than an hour.

I try to avoid more than 20M features in a table --100 times that is too ugly to contemplate.

I would suggest that this is not feasible without making significant design changes (altering either the post interval or somehow utilizing multipoints to reduce the feature count, or both).

4
  • So we have a render farm that I can hijack for the project. All the client wants is the GPS coordinates for each centroid in the .25km square. What if we got a grid at a resolution of 100km and then using math, calculated the sub points to get us the array of GPS. I would think that GPS coordinates could be calculated knowing a starting point and knowing a distance both lat and lng. This I would think would be way faster than the method above, for this I wouldn't think it would be a massive compute issue. Also, there are ~510m km2 of land, so wouldn't I only need that many points?
    – DKinnison
    Commented Jun 3, 2021 at 14:10
  • The end goal, which might help, is to have a touch based interactive display of the earth where the land dots can act like a 3D graph that change based on user input. I know that rendering a billion points is feasible based on youtube.com/watch?v=PBktSo0bXas Imagine an audio equalizer wrapped on the earth.
    – DKinnison
    Commented Jun 3, 2021 at 14:34
  • 1
    There's a bit of a disconnect here. GIS SE is Focused question/Best answer compilation effort. We try to avoid broad, discussion-oriented topics. In theory, we have Geographic Information Systems Chat for discussion topics, but in reality, it has a minimum reputation requirement, and doesn't get enough traffic to generate useful feedback. Questions which focus on a solution usually address that solution, whether or not there's a better, different solution for the same root problem (which is why "XY Problems" are a thing).
    – Vince
    Commented Jun 3, 2021 at 16:25
  • 1
    It sounds like you want to basically reverse geocode. Based on a given place on a map, tell me the real world coordinates. That technology exists all over the place (vs generating these points and doing the lookup on them)
    – KHibma
    Commented Jun 3, 2021 at 16:37
2

It is a relatively simple task.

In QGIS you will find a create grid tool and under the R plugin in QGIS you will find a regular sampling grid tool.

In ArcGIS Pro and ArcMap you will find a fishnet tool that will do the task as well.

Here it is done for you in the Robinson Projection. enter image description here

You already have QGIS installed to give the grid tool a try. Here is an answer to help get you started. Creating fishnet grid Shapefile in QGIS?

Your biggest issue will be wanting a spacing of meters but in a latitude and longitude based system, as @Encomium notes in the comments.

4
  • 1
    No, a fishnet isn't going to help here. I generated a grid of 25 sq. km. cells (in 4326, fixed width, variable height) over the globe, and it was large. Then I dropped down to quarters of that, and quarters of the quarters, and at that point I had exceeded 2 billion discrete cell ids. 0.25km sided cells have 16-32 times more cells than that. You could wait out the heat death of the universe watching Create Fishnet churn on that task. Use of shapefile would have the benefit of failing sooner after exceeding the 2GB storage maximum.
    – Vince
    Commented Jun 2, 2021 at 23:21
  • thanks @PolyGeo. It appears that my questions we're indeed answered. 1. It is possible (but I might have some size limitations after 2GB. 2. QGIS can do what I'm looking to accomplish but in order to get the spacing just right, it's probably best to hire out.
    – DKinnison
    Commented Jun 3, 2021 at 2:56
  • 1
    You created a 25km x 25km grid, not a 250m x 250m grid, which would be 10000 times larger. The surface area of Earth is over 510 million square km. With a post distance of 0.25km, there would need to be sixteen times that number of cells. Using 8.16+ billion vector polygons is not a viable solution to this problem, even after reducing it to land area in populated continents drops you close to 2.1B physical limits (I try to avoid more than 20M features --100 times that is too ugly to contemplate)
    – Vince
    Commented Jun 3, 2021 at 10:47
  • @Vince funny how much a single . can change a question.... I read it as 25 km. Yeah, that is insane. You run into severe limitations once you get past 1 km at the global scale, even if just the land. Maybe a nesting relational approach with global 5 km grids with each grid having a relational subgrid at 25 m would work. I have to work with billions of points sometimes. Anyway, heat depth is just one of many theories.... Commented Jun 3, 2021 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.