1

Re: link polygon to admin area - lost hierarchy

Im trying to link the polygon boundaries to their appropriate ADMIN area.

When the find dialogue comes up I specify the appropriate list (Countries and all admin...as of 2002) and type.

The only level it finds are the countries (england, scotland etc) the rest of the hierarchy being inaccessible.

The other dictionaries seem to search just fine... so i wonder if I have corrupted something somewhere.

Does this ring true for anyone else?

MAtt

Cumbria Biodiversity Data Centre
Tullie House Museum

2

Re: link polygon to admin area - lost hierarchy

Hi Matt,

There is an oddity with the way the dictionary is set up for the Countries and all admin areas list. If you use the Admin Area Browser to browse this list, the Admin Area Type is displayed in a field on the right. You will see that the children of the countries at the top level don't actually belong to the list at all (although they are children). For example, if Bedfordshire belongs to the "English County 1974 -" type. So, when you link boundaries to admin areas you can find them if you choose the appropriate list (in this case English County 1974 -) rather than using the Countries and all admin areas list.

Best Wishes

John van Breda
Biodiverse IT

3

Re: link polygon to admin area - lost hierarchy

Oddity indeed - thank you.

Cumbria Biodiversity Data Centre
Tullie House Museum

4 (edited by Matt_tullie 30-07-2008 12:40:23)

Re: link polygon to admin area - lost hierarchy

A follow on from the above.

The identification of Admin Areas using the find box is less than adequate as it doesnt take you to the hierarchy to check the name.

For example - associating the parish boundary of Stapleton returns four stapletons. Without being directed through the admin hierarchy (which we aren't) to check that it is the right parish - how are we supposed to know!

This disparity between the find dialogues behaviour and the 'master' hierarchy is relavent to taxon finds also.


So now that I have associated potentially the wrong Stapleton with the boundary - where do I need to rectify it in the tables. 

I've tried just changing the Admin_area_key in the Admin_boundary table but that didnt seem to do the whole job - the wrong name being retained in the map window. So I suspect there is another value that needs changing/rectifying (Location table?) - im just not sure where.

?

M

Cumbria Biodiversity Data Centre
Tullie House Museum

5

Re: link polygon to admin area - lost hierarchy

This is definately an area that is less than helpful - got some ideas to overhaul it but there are some more urgent ones so it may not get into the next release.

Linking admin areas to me is not very logical - evidently it was designed to be used when linking the exact polygon of an admin area to that admin area. For example linking a polygon for the entire and exact boundary of the parish of Stapleton - not for linking a wildlife site to the parish due to its location. This information can be entered onto the Administrative Area tab of the Geo Info tab in the Location Hierarchy.

Hope this helps
Lynn Heeley

6

Re: link polygon to admin area - lost hierarchy

Hi Matt,

There is definitely an issue with this area of Recorder that needs looking at for the future.

I have found a workaround in the meantime for your specific problem.  You've done the right thing in editing the Admin_area_key in the Admin_boundary table, but you'll also need to edit one of the polygon layer files.  For this you will need a Hex Editor (Freeware Hex Editor XVI32 worked fine for me courtesy of Google).

In the Admin_boundary table make a note of the MAP_SHEET_KEY field for the required record.  In the Recorder 6\Object Sheet directory you should see several files all prefixed with this map_sheet_key.  You need to open up the .gdb file (relating to the required map_sheet_key) in the Hex Editor.  At this point you'll probably see a load of gobbly-gook, but you should be able to pick out a few Recorder keys (in the text interpretation), from the editor you can change the wrong Admin_area_key  for the new one, then save the file.   That's it!

If you do give this a go, I'd make sure to take a backup of the .gdb file before, just in case.

Kind Regards,
Simon Wood

Simon Wood
[url=http://www.dorsetsoftware.com/]Dorset Software Services[/url]

7

Re: link polygon to admin area - lost hierarchy

Hi Simon and Matt,

During my work on the Recorder-D project (adapting and translation Recorder and the NBNDatabase to the needs of German naturalists) I had been looking for a background possibility to link admin-areas or locations to imported shape files (e.g. German 'Länder' or other admin areas to their shapes) at the beginning of my work 2 ½ years ago. I didn't proceed in this because other problems were more significant.

But what I found out was, the gdb files are dBASE-Files with "wrong" extention. It was not possible to open this files with Borland's dBASE 5 (Win 16) or Ashton Tate's dBASE 4.2, because both will recognise the mdx index file as corrupt (dBASE 5 will open the dbf in read-only mode).
But *gdb-files can be opened with some of the more recent dBase editors, for example Alexey Dolgachows "DBFNavigator" (download link: http://nwvault.ign.com/fms/Download.php?id=19598) or the Grigory Filatov's famous DBFView, which is bundled with the Harbour-MiniGUI Project (Harbour MiniGUI 1.4 or 1.5 Extended Edition, http://sourceforge.net/project/showfiles.php?group_id=135924&package_id=268845&release_id=625319).

It seems that broken links can be fixed by editing the *.gdb file with a dBASE-editor, which may be more user friendly than a hex editor. When I opened a *.gdb File (in DBFNavigator you can open the file without renaming to *.dbf), I found 4 columns:
ID, STACTIC_ID, LOCATN_KEY, LOC_BD_KEY. I can edit the values of the Locatn_key and Loc_bd_key columns to fix the problem as Simon described. But I wonder whether I will get a problem with the mdx-index file, because I could not find out which fields are indexed in this file (If this would be a problem, it will also occurred after editing this file in a hex editor as well)?

In the LOCATN_KEY Field Recorder stores either the LOCATION_KEY or the ADMIN_AREA_KEY. If an ADMIN_AREA_KEY is stored, the value has a prefix (#).
In the LOC_BD_KEY Field the LOCATION_BOUNDARY_KEY is stored, if a Location is linked to the line or polygon object. But what is stored, if an admin area is linked to it? The difference between ID and STATIC_ID I couldn't found out.

Motivated by the recent discussion in the forum I resumed my tests on linking Polygon/Line objects to locations and admin areas. So I found out:

- It is not possible to link a polygon or line object both to an Admin area and a Location (This makes sense, because its very rare that Locations and Admin areas have the same boundary).
But when I added a polygon object, which has already been linked to an admin area to a Location the existing link was replaced by the location link without any warning message!!

- In one of my map screens a created an object layer and added two polygons. I linked one polygon to a location. After saving I opened the object sheets *.gdb file in DBFNavigator. For every polygon a record was created, so I got 2 records. ID and Static ID had identical values. As I expected one of the records got the Location_Boundary_Key value and Location_key value of the location, to which it was linked.

- I wrote this values in the appropriate fields of the "unlinked" record and deleted them in the "linked" record. Saved and closed the gdb file.

- I switched to Recorder and tested what happened: I opened my map and selected the previously linked polygon. I selected "Associate Boundary" and got the Associate Boundary dialogue. I leaved this dialogue with "Cancel". I selected the other polygon, clicked Associate Boundary – and got the location screen with the location (as I have expected).

- I closed the map window, selected my test location on the Location window. Then I selected "Find on map" from the context menu: Recorder opens the map window and selects a polygon – but the originally linked polygon! Did I overlook something?

(Please excuse my sometimes very "German" English)

Kind Regards,
Thomas

Thomas SCHNEIDER

Teamleader Recorder D-Project
Delattinia, Merzig Germany