Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiled format documentation – clarification needed #81

Closed
wahlatlas opened this issue Jan 3, 2023 · 2 comments
Closed

Tiled format documentation – clarification needed #81

wahlatlas opened this issue Jan 3, 2023 · 2 comments

Comments

@wahlatlas
Copy link

This looks like a terrific project that could solve a lot of challenges I regularly face. However it seems to me that tiling the csv-files for larger geographies is crucial. Do you have any preliminary documentation of the format no matter how rough around the edges it may be.

Also how did you create the files for your example. Is there any R or Python code to prepare the tiled csv format? That would obviously be even more appreciated than an elaborate documentation of the format.

Thanks in advance!

@wahlatlas wahlatlas changed the title Tiled format documentation Tiled format documentation – clarification Mar 6, 2023
@wahlatlas
Copy link
Author

Thanks so much for the documentation at
https://github.com/eurostat/gridviz/blob/master/docs/tiledformat.md

I am trying to get a grip on this and prepare my data accordingly using Pandas, however, here's where I struggle:

  • Why isn't originPoint the xMin and yMin of tilingBounds
  • Is the gridded data referenced by their cell center or as INSPIRE defines by the lower left corner? If the former is the case, then would one have to add/substract half of resolutionGeo to the min/max of a gridded dataset to get tilingBounds?
  • does the value for tileSizeCell have to be a power of two (64, 128, 256) for computational effectiveness or how does one chose the value?
  • what are the coordinates for grid-cells within each tile, are they the same as without being tiled or are they relative to the respective tile they are in, e.g. is it comparable to how topojson works?

It's probably a lot of work but a sketch as to how this works or a link to how this is done elsewhere would be helpful.
How did you create the tiled data for the examples?

@wahlatlas wahlatlas changed the title Tiled format documentation – clarification Tiled format documentation – clarification needed Mar 6, 2023
@jgaffuri
Copy link
Contributor

Thank you for these questions: I will further improve the documentation to clarify this !

  • originPoint is the geographique coordinates of the lower left point of the grid. tilingBounds refers to how the tiling frame is filled with data: Not all tiles may be provided, due to data sparsity. tilingBounds is used by the application to avoid requesting tiles where no tile is expected to be found.
  • The grid cell coordinate is of the lower left corner point.
  • there is no special constraint on tileSizeCell value. It is not forced to be a power of two. It should be chosen to ensure the tile size is low enough (so that it is fast enough to download and parse) and high enought (so that there are not too many tiles to be requested).
  • The coordinates of the grid cells within a tile are those relative to the tile. It is an integer value within [0,tileSizeCell[ interval for both x and y. This is indeed comparable to topojson coordinates compression mechanism: the affine transform to retrieve the cell geo coordinate from the cell tile coordinate uses the tile origin geo coordinate and the resolution.

The tiled datasets here
https://github.com/jgaffuri/tiledgrids/
were created in java.
Here is the generic procedure:
https://github.com/eurostat/JGiscoTools/tree/dev/modules/gproc/src/main/java/eu/europa/ec/eurostat/jgiscotools/gridProc

Here are examples of use:
https://github.com/eurostat/JGiscoTools/tree/dev/modules/gproc/src/main/java/eu/europa/ec/eurostat/jgiscotools/gisco_processes/gridvizprep

We plan to deploy this tiling procedure there:
https://github.com/eurostat/gridtiler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants