unige-geohealth / accessmod

accessmod 5 : anisotropic accessibility analysis.
GNU Lesser General Public License v3.0
41 stars 14 forks source link

Give access to the rasterized version of the zone layers from the data module #294

Open SteeveEbener opened 4 years ago

SteeveEbener commented 4 years ago

Current Behavior

The rasterization of the zone layers in AccessMod does not give the same result as rasterizing these same layers in other software (ArcGIS for example).

Expected Behavior

There is nothing to change in AccessMod but it would be important to have access to the rasterized version of these polygons in order to:

  1. Use them when adjusting some of the layers before importing them into AccessMod (population distribution grid for example)
  2. Being able to check the result of some analysis

Possible Solution

two possible solutions:

  1. The user can upload zone layers in raster format and these layers can be used for both population adjustment and zonal statistics
    1. The rasterized version of the zone layers generated by AccessMod are accessible for download from the Data module

Steps to Reproduce

Not applicable

Detailed Description

See above and the exchange of email with Fred during the week of November 11th, 2019

fxi commented 4 years ago

@SteeveEbener : I think you may have used – maybe on purpose – a non-default option in ArcGIS to convert your polygon layer. By default, the ArcGIS polygon to raster tool use a similar approach to the one used in AccessMod.

In ArcGIS, if the user choose another cell assignment strategy such as 'MAXIMUM_AREA' or 'MAXIMUM_COMBINED_AREA', there will probably be differences, and I hope you understand this.

I invite you to read both manual :

GRASS - v.to.rast ArcGIS - How Polygon To Raster works

The solution you propose would maybe fix your issue, but would add a precedent that could affect all modules where rasterisation is done and also every module that use zones.

I think AccessMod is already complex enough and I would not recommend making it more complex for such specific case.

If something should be done, it's on a lower level. Maybe we should implement the same approach used in ArcGIS in the v.to.rast tool. Or fund a developer to do so, as I'm very busy.

SteeveEbener commented 4 years ago

Hi Fred,

I used the default polygon to raster function with a snapping to the DEM => Nothing special. I am certainly not the only one doing this and maybe that the rasterization in other GIS software does also present differences compare to what GRASS is doing.

I can understand the difficulty to implement the first option => Let's then go for the second one (The rasterized version of the zone layers generated by AccessMod are accessible for download from the Data module)

My guess is that such grids are in the machine but just not visible to the user for the moment, right?

Could we make them visible?

Thanks in advance

fxi commented 4 years ago

The default rasterisation technique for polygon is "CENTER_CELL" in ArcGIS. I checked online before my first reply, and now I checked again just now, this time on a running ArcGIS 10.7. I've also looked at ArcGIS 9.* : same. You have maybe other defaults, but that's not standard.

For the options you described, I don't think any of them is optimal. Both of them add unnecessary complexity and are prone to inconsistencies. They do not solve an issue.

Your issue is that the rasterisation tool used by AccessMod does not match your requirement.

The solution is to implement other rasterisation techniques in v.to.rast to let every user of AccessMod have the same opportunity to make their analysis as reproducible as possible. Everything done manually will add inconsistencies. This is not good.

We will discuss that subject further with @nicolasray.

SteeveEbener commented 4 years ago

The other option is to give the user access to the rasterized version of the zone created by AccessMod => original suggestion

nicolasray commented 1 year ago

@fxi : I agree that making accessible the rasterized version of the zone layer would allow users to further investigate any discrepancy. but we dont want to output this raster for each analysis as another "internal data set", as this will clog the internal database for a very marginal usage
So either we don't do it, or we find a an easy way (under "expert options") to output this raster on demand.

The third, easiest, option is that if we show that the default option of polygon to raster gives the exact same results in AccessMod, QGIS and ArcGIS, we simply refer to that in the user manual, and no need to output this raster in AM.

SteeveEbener commented 1 year ago

Thanks @nicolasray . Let's then start by testing if the default option of polygon to raster indeed gives the same result in AccessMod, QGIS and ArcGIS when you snap the result to the DEM. This is not the case on my side