ODM2 / CZ-Manager

CZ Manager (formerly ODM2 Admin) is an application for site level data management of environmental observations using Observation Data Model 2 (ODM2) for documentation and a detailed walkthrough see:
http://odm2.github.io/CZ-Manager
MIT License
9 stars 12 forks source link

children of field areas not appearing in map #143

Open miguelcleon opened 7 years ago

miguelcleon commented 7 years ago

http://dev-odm2admin.cuahsi.org/LCZO/mapdata.html

I’m not certain why my field areas aren’t showing children. I thought maybe it was because their children didn’t have IGSNs, not all of the relationships between field areas and excavations are in the database (yet). So I used field area because they represent a catena over which 9 soil pits were dug.

COOX-3 should has one child with an IGSN at the moment and 3 without. This is at about lat 18.3100, lon -65.8185

Don, I added a ‘Is part of’ relationship between COOX-3 (samping feature id=659) and COOX-3-P55 Ridge (sampling feature id=405)

405 is part of 659

lsetiawan commented 7 years ago

@miguelcleon I don't think I have added Is part of relationship yet. Only Is child of since that was the case for CZIMEA. Thanks.

lsetiawan commented 7 years ago

See https://github.com/miguelcleon/ODM2-Admin/blob/master/odm2admin/views.py#L653

miguelcleon commented 7 years ago

but I'm only using is part of I'm confused :confused:

miguelcleon commented 7 years ago

I don't understand how the ecological land classifications are working they have is part ofrelationships. I changed COOX-3 to use is child of instead but it is still not showing children.

lsetiawan commented 7 years ago

Hmm... okay. Must be doing some sort of weird behavior. I will look into this in a bit.

lsetiawan commented 7 years ago

So, I think the things aren't showing up because they do not have igsn's. See https://github.com/miguelcleon/ODM2-Admin/blob/master/odm2admin/views.py#L683 I use Samplingfeatureexternalidentifiers to gather list of Children. Same with Siblings and Parents.

https://github.com/miguelcleon/ODM2-Admin/blob/master/odm2admin/views.py#L654 and https://github.com/miguelcleon/ODM2-Admin/blob/master/odm2admin/views.py#L655 I forgot to specify the relationship type that's why Is part of is working. I did specify this in https://github.com/miguelcleon/ODM2-Admin/blob/master/odm2admin/views.py#L660

I was really focused on getting CZIMEA Dataset to work at the time. Now that I have your database, more sophistication improvement is needed to parse out relationships between samplingfeatures. Thanks.