Giter Site home page Giter Site logo

Comments (7)

drinckes avatar drinckes commented on May 18, 2024 1

from open-location-code.

drinckes avatar drinckes commented on May 18, 2024

Hi, no, the grid doesn't exist as a shapefile, because at the fine levels it would be huuuuuge.

The easiest thing to do is to draw it for the area you want:

  • For a four digit grid, the lines are the degree latitude and longitude lines;
  • For a six digit grid, you divide each degree into 20;
  • For an eight digit grid, you divide each degree into 400 (that is, each of the previous divisions is divided by 20);
  • For a 10 digit grid, you divide each degree into 8000 (that is, divide by 20 again).

Does that help?

from open-location-code.

abdultanveer avatar abdultanveer commented on May 18, 2024

like to have a 10 digit grid overlaid on maps in which

  1. repeated first 5 digits should be in small fonts and color coded
  2. next 3 to be slightly bigger
  3. next 2 big enough

from open-location-code.

bgirardot avatar bgirardot commented on May 18, 2024

@cumminsjp @drinckes has created a TMS server that will hopefully get hosted soon that sounds like it might meet your needs. I put some examples on twitter while I was testing it: https://twitter.com/BlakeGirardot/status/1036300493717467136

from open-location-code.

answerquest avatar answerquest commented on May 18, 2024
precision level intervals in lat-long units
10 0.000125
8 0.0025
6 0.05
4 1
2 20

We can generate the grid lines in QGIS.

Just make sure your starting lat-long values are an exact multiple of the interval values for your chosen precision level you want.
example : Creating a grid with precision 6 : starting latitude cannot be 16.4563. Change it to 16.45 or 16.50 so that when you divide it by 0.05 it gives you an integer answer.

In QGIS, you can generate a grid by clicking in the top Menu: Vector > Research tools > Vector Grid

  • Grid extent (xmin,xmax,ymin,ymax): 78.1,79,16.9,18.2 (in my example, a city in India)
  • Set both lat and lon interval as per the precision level you want. So for precision level 6, enter 0.05 for both.
  • You can set ourtput as lines or polygons, your choice. Lines make simpler and smaller shapefiles.
  • And that should generate the grid for you. You can save that layer as a shapefile in any format.

Note that this will not put any information about the pluscodes in your grid's metadata. They're just lines/boxes.

But if you make polygons, then I can think of a roundabout way of adding pluscode values to those polygons (I have not done this myself yet):

  1. Generate a centroid layer (Vector > Geometry Tools > Polygon Centroid) from the grid-polygons layer. This will place points inside each grid box. (in a new points layer.)
  2. Install "Lat Lon Tools" plugin.
  3. That plugin can generate plus codes from points. So run it on the centroid layer you made.
  4. (And this I can't quite figure out yet) Figure out a way to move the meta field from the centroid layer to the grid polygons layer.

QGIS does have python console etc so one could find a way to do this with some script, or make a plugin, or contribute to Lat Lon tools. If someone finds a way, please post here!

from open-location-code.

drinckes avatar drinckes commented on May 18, 2024

In the meantime another option is to use the grid service

This serves tiles that you can overlay into various maps and GIS platforms.

from open-location-code.

fabanc avatar fabanc commented on May 18, 2024

@drinckes, @answerquest: I have also created a tool for the Esri community and ArcGIS Pro in order to compute plus code. You can compute the plus code directly on polygon that represent plus codes areas (in that case the plus code is based on the centroid of the polygon) or on points. You can define the length of the code you want as well.

This has been a problem I have been facing on a project and decided it would be a shame to not publish it. Since the datasets were big, computing the polygons centroid first and then joining was not an efficient option, so I have the tool the ability to compute the plus codes on the polygons as well.

The tool and a full tutorial on how to generate grids and plus code with the software in the ArcGIS / Esri world is on this GitHub project: https://github.com/fabanc/arcgis-plus-code-generator

from open-location-code.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.