Git Product home page Git Product logo

gridmaker's Introduction

Eurostat GridMaker

GridMaker produces GIS grid datasets of various resolutions covering user-defined countries or regions:

Eurostat Grid Maker

Quick start

  1. Download gridmaker-1.3.zip and unzip somewhere.
  2. Run: java -jar GridMaker.jar -res 200 -epsg 2169 -i pathTo/myRegions.geojson to make a grid of resolution 200m for the Coordinate Reference System EPSG:2169 where pathTo/myRegions.geojson is the input area to be covered by the grid. You can alternativelly edit and execute gridmaker.bat (or gridmaker.sh for Linux users).

To capture the input geometry to be covered by the grid and store it as a *.geojson file, you can use http://geojson.io/ or any GIS software.

Usage

Requirements

Java 1.9 or higher is required. The java version installed, if any, can be found with java --version command. Recent versions of Java can be installed from here.

Input parameters

The help is displayed with java -jar GridMaker.jar -h command.

Parameter Required Description Default value
-h Show the help message
-res The grid resolution (pixel size). Note that the unit of measure is expected to be the same as the one of the coordinate reference system. 100 000
-epsg The EPSG code of the grid coordinate reference system. '3035', corresponding to ETRS89-LAEA.
-i Input file containing the geometry of the region to be covered by the grid. Supported formats and file extensions: GeoJSON (*.geojson), SHP (*.shp), GeoPackage (*.gpkg).
-tol A tolerance distance to keep the cells that are not too far from the specified region. 0
-gt The type of grid cell geometry: The squared surface representation ('SURF') or its center point ('CPT'). 'SURF'
-o Output file. The supported formats and file extensions are GeoPackage (*.gpkg), GeoJSON (*.geojson) and SHP (*.shp) 'out.gpkg'

For coders

Install JGiscoTools and see the instructions here.

Showcase

GridMaker is used at Eurostat-GISCO for the production of gridded datasets. It supports the creation of GIS datasets representing statistical grids based on the European ETRS89-LAEA coordinate reference system (EPSG:3035), which are compliant with the Census 2021 regulation, the INSPIRE regulation and the GEOSTAT initiative.

Support and contribution

Feel free to ask support, fork the project or simply star it (it's always a pleasure). The source code is currently stored as part of JGiscoTools repository. It is mainly based on GeoTools and JTS Topology Suite.

gridmaker's People

Contributors

jgaffuri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gridmaker's Issues

problem with upper limit of grid

An unnecessary row and column of cells are created along the X and Y upper limits of the envelope.
This is due to a wrong rounding in method ensureEnvelope. Maybe.

Memory issues

Trying to generate a grid I get an Out of Memory Error:

GridMaker

It should generate a file of about 2.4Gb (about 12 million cells), but the PC has 16Gb of RAM.

Is there any way to avoid this?

Thanks a lot

`tol` parameter and buffer options in source code

Hi,
I wonder how is exactly implemented the tol parameter in calculations.

Surfing the source code in JGiscoTools it seems that it uses the buffer function:
buffer(String inFile, String outFile, double bufferDistance, int quadrantSegments, int endCapStyle)
in the DataPreparation.java module.

So the next question is what are the default values of quadrantSegments and endCapStyle in this function.

I am able to reproduce all the examples in GridMaker in an R translation of the code, except for some exterior cells when the tol parameter is used. Is does not affect the interior cells, so it is a question of how the buffer is generated.

Thanks a lot

Geographical grids

Hi,
Does GridMaker support geographical (non proyected) grids?
I have tried to build a grid in epsg 4326 (WGS84) and I have got an OutofMemoryError exception.
I assume that the res parameter should be in degrees in this case, so -res 10 is 10 degrees, and the grid should be fairly small.

GridMaker_4326

Thanks a lot.

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.