We’ve been dealing with an issue with Latlong Information being wiped in Specify 7 that is holding back our testing and ability to use Specify 7 in Prod.
If I query existing records I can see that both Latitude and Longitude are there as expected:
If I then go to the Locality information for one of these records E.g AQ20 - while the Latitude and Longitude are in the database and fill in the Verbatim Latitude and Verbatim Longitude fields, the LatLong parser does not show the information:
This means that if someone opens an existing record’s locality information and then saves it, the Latitude and Longitude end up replaced by empty strings.
Same query as before after opening and saving the Localtiy form without making any changes:
Any ideas what might be causing the issue with the Latitude and Longitude plugin that it is not autofilling with any existing latitude or longitude data? When the data is entered manually it works as expected, but any of the existing records will be wiped if someone just happens to look at the locality information.
The Longitude and Latitude coordinate fields on the Locality form show the values from the Lat1Text and Long1Text fields rather than the decimal counterparts (Latitude1 and Longitude1), leading to the discrepancy you are seeing here.
This will be fixed in an upcoming update for Specify (arriving this spring), but for now, you or an IT administrator can run the following SQL command on your database:
-- There are cases from Specify 6 where Longitude and Latitude are captured as decimal values but
-- the accompanying text fields are not populated. In cases where the text fields are not populated,
-- it appears the records do not have coordinates. This script will populate the text fields with the
-- decimal values where the text fields are empty but the decimal values are not.
UPDATE locality
SET Lat1text = Latitude1
WHERE Lat1text IS NULL AND Latitude1 IS NOT NULL;
UPDATE locality
SET Long1text = Longitude1
WHERE Long1text IS NULL AND Longitude1 IS NOT NULL;
UPDATE locality
SET Lat2text = Latitude2
WHERE Lat2text IS NULL AND Latitude2 IS NOT NULL;
UPDATE locality
SET Long2text = Longitude2
WHERE Long2text IS NULL AND Longitude2 IS NOT NULL;
Once done, you should see the coordinates appearing on the form as expected!