wiseomran / ala

Automatically exported from code.google.com/p/ala
0 stars 0 forks source link

Add to Map | Areas | Gazetteer polygon not working for some layers (dynamic land cover, surface geology) #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Original Issue  - 
https://code.google.com/p/alageospatialportal/issues/detail?id=1067

Project Member Reported by leebel...@gmail.com, Jun 5, 2013 
What steps will reproduce the problem?

1. Add to Map | Areas | Gazetteer polygon

2. Enter "open alpine" and select the DLC class

3. Compare Lake Eyre DLC (attached) which is "brine" with mapped "open alpine 
class" (attached).

This is an URGENT (not "Medium") problem as some may not detect an error more 
subtle than this! It could be very embarassing.

 DLC.gif 184 KB   View   Download Alpine.gif 117 KB   View   Download Jun 5, 2013 Project Member #1 chris.fl...@gmail.com 
(Copied from issue 632)

Hi Lee,

This problem is caused due to a problem with the special ingestion process that 
Adam developed to generate a contextual layer from a large gridded dataset. The 
only two layers that have been ingested using this process are Dynamic Land 
Cover and the new Land Cover Type layer that I got from AusCover.

For layers loaded via this process, a lot of data is read straight off files on 
disk where for other contextual layers it would be read from the layers 
database.

Because of this disk vs database difference, it is not possible to render 
gazetter areas for these layers in the ordinary way. So what Adam has done is 
display the entire layer that the layer belongs to, and then render it with a 
custom style to (in theory) only highlight the relevant area from the gazetter 
search. 

A problem with the generation of the custom style means that an incorrect area 
is highlighted.

I can fix the problem with the custom style, however there are a few other 
problems here:

1. The legend for the corresponding layer is displayed. e.g. the DLC legend is 
displayed when a gazetter search is done for "open alpine". This does not 
happen when a gazetteer area from other layers is displayed.

2. The hover tool displays values for the corresponding layer, even in 
non-highlighted areas. This does not happen when a gazeteer area from other 
layers is displayed.

3. The gazetteer area cannot be exported, used in an add to map/species etc. 
E.g. display "open alpine" and then try add to map/species.

I can fix the aforementioned style problem to get areas to display correctly, 
but as you can see this is only part of the problem.

Thoughts Lee and Dave?
 Jul 9, 2013 Project Member #2 chris.fl...@gmail.com 
(No comment was entered for this change.)
 Labels: -Priority-Medium Priority-High Jul 29, 2013 Project Member #3 leebel...@gmail.com 
(No comment was entered for this change.)
 Summary: Add to Map | Areas | Gazetteer polygon not working for some layers (dynamic land cover, surface geology) (was: Add to Map | Areas | Gazetteer polygon no working for some layers)

Original issue reported on code.google.com by moyesyside on 8 Aug 2013 at 12:33

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
We put this to Adam a month ago for any clarification he can bring but I have 
not been able to get a specific response. We need to address this as this 
function is important to address Issue such as #76 (dependent on this issue and 
posted 30/8/2011?) and any Area Report based on polygon classes. Suggest 
expertise to address this is required by at least one in the team?

Original comment by leebel...@gmail.com on 11 Sep 2013 at 12:11

GoogleCodeExporter commented 9 years ago
Email sent to Adam and Lee on 26/11/2013:

Thanks Adam, okay I'll send through some questions via email. Let me know if 
you think it would be better to Skype about any particular points/issues.

When we last spoke before your internet dropped out, we were talking about the 
use of layers loaded using the GridClassBuilder (e.g. Dynamic Land Cover).

I mentioned that I had fixed (fix not yet deployed) the web service that 
returns the wkt for layer classes and objects to correctly handle these layers.

Problems still remain in the spatial portal however. In a number of cases the 
"placeholder" wkt for classes (e.g. "ENVELOPE(cl918:15)") is being used 
verbatim when running a number of spatial portal functions which is causing 
problems. For example the "ENVELOPE" wkt is sent to the distributions service 
when trying to add species occurrences to the map restricted to an area.

There is the issue with the area report but we have discussed that previously 
and I will fix the problem that you identified for me.

An additional problem is that most of the wkt classes generated by the 
GridClassesBuilder are invalid geometries due to self-intersecting polygons etc.

Questions (Lee - can you please provide your input on these where applicable):

1. You mentioned that in some cases, bounding boxes for GridClassBuilder 
generated classes should be used with spatial portal functions instead of the 
geometries themselves due to their complexity. Can you (and possibly Lee?) help 
me make a list of what functions should use bounding boxes/what functions 
should use the actual geometries?

2. The "ENVELOPE" wkts are not being intercepted and substituted. Is there an 
area of the spatial portal code that you would suggest examining for problems 
in this regard? You mentioned that these geometries were being handled 
correctly at some point so it sounds like some defects have been introduced.

3. You mentioned that there may be issues with using some of the 
GridClassBuilder classes in the spatial portal due to their large size. Did you 
and Lee have a strategy for how to deal with these large geometries, or should 
we simply fail gracefully with an appropriate error message?

4. I was thinking of adding an additional step in the GridClassBuilder 
ingestion process to fix the invalid geometries, e.g. using postgis functions. 
Do you have any thoughts on this?

Thanks for your help I really appreciate it.

Cheers,
Chris 

Original comment by chris.fl...@gmail.com on 23 Dec 2013 at 12:21

GoogleCodeExporter commented 9 years ago
Notes on the issue with the Area Report:

Contextual layers loaded with using the GridClassBuilder tool have two fields 
table entries, with types marked "a" and "b". "a" is for entire classes and "b" 
is for individual polygons. 

In the case of the dynamic and cover layer these entries have ids cl918 ("b" 
type) and cl1918 ("a" type). The request to the biocache is specifying cl918 
which only returns a small number of records. If this request is changed to use 
cl1918, it returns what appears to be the correct number of records.

The requests being made to the biocache are using 

Original comment by chris.fl...@gmail.com on 23 Dec 2013 at 1:11

GoogleCodeExporter commented 9 years ago
Both layers are type 'a' - they contain multiple polygons with the same 
class. If anyone does a 'Add to map | Areas | Gazetteer polygon' on 
either of these two layers, selecting a particular polygon should select 
ALL polygons of that class.

Original comment by leebel...@gmail.com on 23 Dec 2013 at 3:47

GoogleCodeExporter commented 9 years ago
My previous comment got cut off.

As indicated by Lee, the biocache requests should specify the "a" type field 
table entries.

Original comment by chris.fl...@gmail.com on 23 Dec 2013 at 4:05

GoogleCodeExporter commented 9 years ago
As far as I can tell, this seems to be fixed.

Original comment by leebel...@gmail.com on 5 Jan 2014 at 11:39