1

Topic: verifcation form v5 doesn't zoom and doesn't show point on map

Hi, i'm trying to configure the Verification form v5: if i click on a row, i can see the result details but map doesn't zoom or point to the lat/long in the record (even if there is this info). Only in a record done today, i can see the map zooming on the point... Maybe is it a problem of form settings? I use the default... I use Bing and OpenStreetMap map layers.
Any help?
Thanks

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

2

Re: verifcation form v5 doesn't zoom and doesn't show point on map

Hi Carlo

Can I check I understand correctly. Are you saying that
- if you create a new record then the verification form map will correctly zoom to the record but
- for older records the verification map does not zoom?

Jim Bacon.

3

Re: verifcation form v5 doesn't zoom and doesn't show point on map

Jim Bacon wrote:

Hi Carlo

Can I check I understand correctly. Are you saying that
- if you create a new record then the verification form map will correctly zoom to the record but
- for older records the verification map does not zoom?

Jim Bacon.


Yes, it's correct. The last i have done, after update Drupal Iform and Warehouse and DB (and cache), is highlighted on map as a blue square. the older no... It seems a missing data in feature info from call from server... but in the info box about record it reports lat and long...

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

4

Re: verifcation form v5 doesn't zoom and doesn't show point on map

It doesn't sound like a configuration issue with the form then.

I would use browser tools to inspect the network traffic and compare the difference between the responses for old and new records. That might give a clue.

I don't know how the map is working but if it is drawing a square rather than a circle that suggests it is drawing a polygon from a geometry rather than a point from a lat/long.

Therefore, I would look out for geom fields in the responses and perhaps look in the cache tables to see if there is a difference between how the old and new records are being stored or accessed. I would expect all your old records to have been moved in to the new cache tables.

Regards,
Jim Bacon.

5

Re: verifcation form v5 doesn't zoom and doesn't show point on map

Jim Bacon wrote:

It doesn't sound like a configuration issue with the form then.

I would use browser tools to inspect the network traffic and compare the difference between the responses for old and new records. That might give a clue.

I don't know how the map is working but if it is drawing a square rather than a circle that suggests it is drawing a polygon from a geometry rather than a point from a lat/long.

Therefore, I would look out for geom fields in the responses and perhaps look in the cache tables to see if there is a difference between how the old and new records are being stored or accessed. I would expect all your old records to have been moved in to the new cache tables.

Regards,
Jim Bacon.

On DB, where is the right table to check for cache geometry/points?

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

6

Re: verifcation form v5 doesn't zoom and doesn't show point on map

carlo_politi wrote:
Jim Bacon wrote:

It doesn't sound like a configuration issue with the form then.

I would use browser tools to inspect the network traffic and compare the difference between the responses for old and new records. That might give a clue.

I don't know how the map is working but if it is drawing a square rather than a circle that suggests it is drawing a polygon from a geometry rather than a point from a lat/long.

Therefore, I would look out for geom fields in the responses and perhaps look in the cache tables to see if there is a difference between how the old and new records are being stored or accessed. I would expect all your old records to have been moved in to the new cache tables.

Regards,
Jim Bacon.

On DB, where is the right table to check for cache geometry/points?

I have seen this thing in network calls:

http://postgres.comune.grosseto.it/Indi … antCount=1

gives: jsonp1488216098400({"records":[],"count":0})

but in http://www.naturaesocialmapping.it/ifor … ce_id=5390 is see, in "extra" object, wkt:"POINT(1016620.68557045 5522820.10771462)"

The working point is this:
http://postgres.comune.grosseto.it/Indi … antCount=1

giving: jsonp1488216098403({"records":[{"occurrence_ids":"5441","taxon_meaning_ids":"2827","geom":"POLYGON((1236000 5274000,1238000 5274000,1238000 5276000,1236000 5276000,1236000 5274000))"}],"count":1})

http://www.naturaesocialmapping.it/ifor … ce_id=5441 has in "extra" object, wkt:"POINT(1237198.141507 5275650.42871568)"

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

7

Re: verifcation form v5 doesn't zoom and doesn't show point on map

Hi Carlo,

The request for the working point which returns a geom is

http://postgres.comune.grosseto.it/IndiciaWarehouse090/index.php/services/report/requestReport?
report=library/occurrences/filterable_explore_list_mapping_lores.xml&
reportSource=local&
mode=json&
view=list&
user_id=24&
quality=all&
sharing=verification&
record_status=C&
records=unverified&
my_records=1&
knownCount=1633&
limit=2000&
sq_size=2000&
occurrence_id=5441&
offset=0&
wantCount=1

If I examine the report library/occurrences/filterable_explore_list_mapping_lores.xml, which should look like https://github.com/Indicia-Team/warehou … lores.xml, then I can see

1. The geom is coming from the map_squares table
2. The map square is joined on the cache_occurrence_functional.map_sq_2km_id field

Therefore, I would check whether your older records have values in cache_occurrence_functional.map_sq_2km_id field

Regards,
Jim Bacon

8

Re: verifcation form v5 doesn't zoom and doesn't show point on map

Jim Bacon wrote:

Hi Carlo,

The request for the working point which returns a geom is

http://postgres.comune.grosseto.it/IndiciaWarehouse090/index.php/services/report/requestReport?
report=library/occurrences/filterable_explore_list_mapping_lores.xml&
reportSource=local&
mode=json&
view=list&
user_id=24&
quality=all&
sharing=verification&
record_status=C&
records=unverified&
my_records=1&
knownCount=1633&
limit=2000&
sq_size=2000&
occurrence_id=5441&
offset=0&
wantCount=1

If I examine the report library/occurrences/filterable_explore_list_mapping_lores.xml, which should look like https://github.com/Indicia-Team/warehou … lores.xml, then I can see

1. The geom is coming from the map_squares table
2. The map square is joined on the cache_occurrence_functional.map_sq_2km_id field

Therefore, I would check whether your older records have values in cache_occurrence_functional.map_sq_2km_id field

Regards,
Jim Bacon

Hi Jim,
in my cache_occurrences_functional i see this:

map_sq_1km_id    map_sq_2km_id    map_sq_10km_id
5158    5159    5157

and all null for the other records...

while map_squares is empty... i don't understand...

I see the same in cache_samples_functional... only 1 with map_sq ids

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

9

Re: verifcation form v5 doesn't zoom and doesn't show point on map

carlo_politi wrote:
Jim Bacon wrote:

Hi Carlo,

The request for the working point which returns a geom is

http://postgres.comune.grosseto.it/IndiciaWarehouse090/index.php/services/report/requestReport?
report=library/occurrences/filterable_explore_list_mapping_lores.xml&
reportSource=local&
mode=json&
view=list&
user_id=24&
quality=all&
sharing=verification&
record_status=C&
records=unverified&
my_records=1&
knownCount=1633&
limit=2000&
sq_size=2000&
occurrence_id=5441&
offset=0&
wantCount=1

If I examine the report library/occurrences/filterable_explore_list_mapping_lores.xml, which should look like https://github.com/Indicia-Team/warehou … lores.xml, then I can see

1. The geom is coming from the map_squares table
2. The map square is joined on the cache_occurrence_functional.map_sq_2km_id field

Therefore, I would check whether your older records have values in cache_occurrence_functional.map_sq_2km_id field

Regards,
Jim Bacon

Hi Jim,
in my cache_occurrences_functional i see this:

map_sq_1km_id    map_sq_2km_id    map_sq_10km_id
5158    5159    5157

and all null for the other records...

while map_squares is empty... i don't understand...

I see the same in cache_samples_functional... only 1 with map_sq ids

I'm re-running the  modules/cache_builder/db/version_0_1_2/201401010910_map_squares_populate.sql
and
modules/cache_builder/db/version_0_1_2/201511031926_fix_map_squares.sql

but i get this error:

ERROR:  cannot update view "cache_occurrences"
DETAIL:  Views that do not select from a single table or view are not automatically updatable.
HINT:  To enable updating the view, provide an INSTEAD OF UPDATE trigger or an unconditional ON UPDATE DO INSTEAD rule.


and the id remain NULL...

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

10

Re: verifcation form v5 doesn't zoom and doesn't show point on map

carlo_politi wrote:
carlo_politi wrote:
Jim Bacon wrote:

Hi Carlo,

The request for the working point which returns a geom is

http://postgres.comune.grosseto.it/IndiciaWarehouse090/index.php/services/report/requestReport?
report=library/occurrences/filterable_explore_list_mapping_lores.xml&
reportSource=local&
mode=json&
view=list&
user_id=24&
quality=all&
sharing=verification&
record_status=C&
records=unverified&
my_records=1&
knownCount=1633&
limit=2000&
sq_size=2000&
occurrence_id=5441&
offset=0&
wantCount=1

If I examine the report library/occurrences/filterable_explore_list_mapping_lores.xml, which should look like https://github.com/Indicia-Team/warehou … lores.xml, then I can see

1. The geom is coming from the map_squares table
2. The map square is joined on the cache_occurrence_functional.map_sq_2km_id field

Therefore, I would check whether your older records have values in cache_occurrence_functional.map_sq_2km_id field

Regards,
Jim Bacon

Hi Jim,
in my cache_occurrences_functional i see this:

map_sq_1km_id    map_sq_2km_id    map_sq_10km_id
5158    5159    5157

and all null for the other records...

while map_squares is empty... i don't understand...

I see the same in cache_samples_functional... only 1 with map_sq ids

I'm re-running the  modules/cache_builder/db/version_0_1_2/201401010910_map_squares_populate.sql
and
modules/cache_builder/db/version_0_1_2/201511031926_fix_map_squares.sql

but i get this error:

ERROR:  cannot update view "cache_occurrences"
DETAIL:  Views that do not select from a single table or view are not automatically updatable.
HINT:  To enable updating the view, provide an INSTEAD OF UPDATE trigger or an unconditional ON UPDATE DO INSTEAD rule.


and the id remain NULL...


I have solved... instead using the view "cache_occurrences", i have used the table "cache_occurrences_functional" and now i have all points on map

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

11

Re: verifcation form v5 doesn't zoom and doesn't show point on map

Hi Carlo

Congratulations on solving your problem.

What you describe suggests that the database updates to the warehouse had not been applied as intended. All the updates should be applied in order as there are often dependencies.

Obviously if there are other updates that have been missed then there may be further problems.
Good luck!

Jim Bacon.

12

Re: verifcation form v5 doesn't zoom and doesn't show point on map

Jim Bacon wrote:

Hi Carlo

Congratulations on solving your problem.

What you describe suggests that the database updates to the warehouse had not been applied as intended. All the updates should be applied in order as there are often dependencies.

Obviously if there are other updates that have been missed then there may be further problems.
Good luck!

Jim Bacon.

Hi Jim,
i hope to have solved most of my problems now... If any other problems, i'll continue to post questions..

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit