1

Re: Extract Grid Squares tool appears to be buggy

I've just used the Extract Grid Squares function and it appears to have a bug whereby it repeats the 10km generated references for all other reference classes chosen. A screenshot probably explains it more clearly (click to enlarge):

[img]http://imgur.com/JRLRGl.jpg[/img]

Note how the 10km references TQ80, TQ71 and TQ81 are erroneously repeated for both tetrads and 1km references. Because these references are invalid, it actually prevent the location from being saved:

[img]http://imgur.com/70xt2l.jpg[/img]

Charles

Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital

2

Re: Extract Grid Squares tool appears to be buggy

I can confirm that I am experiencing the same behaviour (although it hasn't yet prevented me from saving). I'm glad I didn't do this for all 1500 sites yet. I assume that even though it doesn't interrupt normal use of the db, the presence of four or five copies of each grid square in the list  might impact negatively on performance when doing some kinds of spatial queries on a large dataset (since there will be many more sqares to check against).

One strange aspect to this which I did notice is that after I had extracted the grid squares for a couple of location boundaries put one location into edit mode and then saved again (to see if recorder would stop me as it did Charles), it allowed me to save (although nothing had changed), but when I examine the content of the GRID_SQUARES table, I find that the entries for that location all had the CHANGED_BY and CHANGED_DATE fields set (to me at the time I saved).

Clearly these fields should only be set after an edit which makes changes and it leaves me wondering if this happens with other tables in the db (I have not checked).

I know recorder does not make much use of these two fields, but they can be very useful to the database administrator and it would be good if they reported edits correctly and consistently across the database. It would actually be even more useful if (for at least the major tables?) there was a mechanism for viewing the information they hold from within recorder, although I appreciate that this would represent a fairly major change to the system for little return for many users.

While I am on the subject, I must say that it is a shame that the ENTERED_BY and CHANGED_BY (and corresponding date fields) are managed by the Recorder UI, rather than by SQLServer internal triggers. I guess this is a hangover from the Access database days when triggers were not an option. . There have been many occasions when I have needed to carry out complex updates through the Access database or through Management Studio (because I didn't have time to develop an XML batch update for a very specific once-only task). It is really annoying on those occasions when I forget to set those fields. My fault though & I guess I need to be more careful.

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre

3

Re: Extract Grid Squares tool appears to be buggy

Hi Rob
About the entered_by and changed_by. The thing is, you are normally logged into SQL Server as NBNUser, unless you are using trusted authentication in which case SQL Server knows your Windows username but not your Recorder Name_Key. So there is no way a trigger can do this I'm afraid. Plus, a trigger would be a bit slower I think.

I guess Lynn will log the grid square extraction bug...

Best Wishes

John

John van Breda
Biodiverse IT

4

Re: Extract Grid Squares tool appears to be buggy

yeah I had thought of the NBNUser issue John. I was just having a moan for the sake of it really. I know it's too fundamental a change to be likely to be implemented.

Interested to hear your thoughts though. Personally I have not found the trigger approach to be particularly slow when I have used it for other applications, but I admit I have never tried it with a very large dataset.

Anyway I have given the map tool another day of my time, trying to convince myself that it's worth the effort of setting it up. Yet again I have come away thinking naah, can't be bothered, not if I have to import all the thousands of polygons onto each workstation. I'll go back to my (very long-term) project of developing an alternative.

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre

5

Re: Extract Grid Squares tool appears to be buggy

Hi Rob

Hmm, the map may not be brilliant admittedly, partly because many serious users have a GIS. But writing your own replacement - sounds like a big job! There are a few free GIS tools around by the way. One point - if you create a polygon layer in a multi-user map environment in Recorder, then add some polygons to it, they will automatically appear on all users maps since you share polygon layers. Plus the 6.14 polygon import facilities are improved a bit for linking to locations.

Regards

John van Breda
Biodiverse IT

6

Re: Extract Grid Squares tool appears to be buggy

That's what is supposed to happen John, but on our system no.  We have all sorts of exceptions occurring whenever we try the recorder maps on some of the workstations and I haven't found myself inclined to make them work properly yet. If I ever get round to sorting out everyone's machines properly, maybe I will think again about this.

As for the development task, well I agree that from scratch it would be huge, but I have an almost complete application, currently in vb, which uses mapinfo integrated mapping and which tightly controls the kinds of edits which can be done on our boundary map layers, in the process extracting attribute data from recorder 6 and inserting some data back (e.g. site areas etc.)

Using MapInfo in this way dramatically reduces the amount of development work necessary and provides the kind of high end tools that we need (although obviously it requires a mapinfo licence). I anticipate that within a few weeks this tool will become our main means of editing site boundaries and doing all sorts of other stuff.

Once the creases are ironed out, I will move onto the next stage, which will be to try to make it into a Recorder addin, although I may have to use something a bit cleverer than vb for that since I don't know if vb can create activex conrols any more. It's an interesting challenge, but everyone needs a hobby no?

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre

7

Re: Extract Grid Squares tool appears to be buggy

Coming back to the grid squares issue I have just noticed something which may be relevant.

When a layer of boundaries is imported (from .MIF format), the process succeeds, but at the matching stage there appear to be multiple matches listed for some (many) sites. Initially I had assumed that this happened when a site has multiple polygons, but on closer inspection I discovered at least one site which although it is composed of two polygons, produced about a dozen matches. All had the same location key and site name but they had been given different, consecutive polygon IDs. This behavious appears consistent (in that the same number of matches occur for a given site if the import is repeated)

It looks as if the importer is generating multiple copies of the boundary polygons in Recorder. I have checked the location_boundary table and have indeed found that in the case of the site described above there are 13 location boundaries listed against a single location key and map sheet key combination.

If this is the case, that might explain the source of the multiple grid squares generated by the extraction tool and there may be no problem with the extraction tool (although it should surely check for duplicates).

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre

8

Re: Extract Grid Squares tool appears to be buggy

Oh and I have just noticed that in Charles original post he was refering to duplication only of the 10km grid squares. Here it is happening with 100m grid squares (I am trying to get rid of the 10km squares as I don't think they provide very useful validation)

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre

9

Re: Extract Grid Squares tool appears to be buggy

Can anyone reproduce the buggy grid squares extractor issue in 6.15.4? I was writing a CCN for it but cannot now reproduce it here.

Many thanks, Mary