1

Re: Remove all Location grid squares

Having imported a lot of data, we now have a lot of locations with populated "grid squares".

Is there an easy way to remove them all (batch update?)

Charlie Barnes
Information Officer
Greater Lincolnshire Nature Partnership

2

Re: Remove all Location grid squares

The grid squares are all stored in a table called GRID_SQUARE (unsurprisingly).  It looks to me like you should be OK to filter this appropriately and delete as many of the records (for which you are custodian) as you wish.

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre

3

Re: Remove all Location grid squares

So manually deleting records in GRID_SQUARES won't cause problems with Recorder?

Charlie Barnes
Information Officer
Greater Lincolnshire Nature Partnership

4

Re: Remove all Location grid squares

I can't promise that. The obvious problem is that the validation routines which test new records to see if they are within a location will not work so you may not be able to enter any data for the locations.

What is the problem with having grid squares populated? Why do you want to delete them?

I must admit that I have thought about doing this but never tried it. Many of our locations which came originally for Recorder 3 have a 10km grid square associated, which means that the validation is pretty poor, since any record within that square can be attached to the site. If I had the time I might try deleting the lot and recreating using the tool in Recorder

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre

5

Re: Remove all Location grid squares

RobLarge wrote:

so you may not be able to enter any data for the locations.

I thought Recorder only validates the sample spatial reference if location grid squares are present? If there aren't any, it skips that bit?

RobLarge wrote:

What is the problem with having grid squares populated? Why do you want to delete them?

I must admit that I have thought about doing this but never tried it. Many of our locations which came originally for Recorder 3 have a 10km grid square associated, which means that the validation is pretty poor, since any record within that square can be attached to the site. If I had the time I might try deleting the lot and recreating using the tool in Recorder

The import was from a Recorder 3 transfer, and I'm not entirely sure where these grid squares came from - they relate to villages mainly, for which no defined boundary exists, and are causing problems as there are only 2, 3 or 4 grid squares, which by no means encompass the "site", causing Recorder to refuse associating valid sample spatial references to a site.

Charlie Barnes
Information Officer
Greater Lincolnshire Nature Partnership

6

Re: Remove all Location grid squares

Grid Squares are optional. So there is no problem deleting them.  Their main use is to provide validation for data entered against a location. Any data entered against a location is checked to make sure it falls within the grid square of the Location. If there are no grid squares for Location then the entry is accepted. As Rob says there is only one table involved GRID_SQUARE.  A batch update would do the job. The query for deleting all of them in your system would be DELETE from Grid_Square where Custodian = 'your site id', but you may wish to apply other criteria.  You shouldn't  delete the grid squares for locations where you are not the Custodian as potentially this cause problems if the data if  passed to others.
     

Mike



Mike

Mike Weideli

7

Re: Remove all Location grid squares

I have deleted grid squares in the past with no adverse results.

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