Changeset 38753 for main/trunk/greenstone2
- Timestamp:
- 2024-02-20T11:43:55+13:00 (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/doc.pm
r38357 r38753 1217 1217 if($value =~ m/^-/) 1218 1218 { 1219 $direction = ($ fieldeq "Latitude") ? "S" : "W";1219 $direction = ($metaname eq "Latitude") ? "S" : "W"; 1220 1220 } 1221 1221 else 1222 1222 { 1223 $direction = ($ fieldeq "Latitude") ? "N" : "E";1223 $direction = ($metaname eq "Latitude") ? "N" : "E"; 1224 1224 } 1225 1225 … … 1227 1227 if(defined $beforeDec && defined $afterDec) 1228 1228 { 1229 my $name = ($ fieldeq "Latitude") ? "LatShort" : "LngShort";1229 my $name = ($metaname eq "Latitude") ? "LatShort" : "LngShort"; 1230 1230 # only do the following if we haven't already done it 1231 1231 if (!$self->contains_metadata_value($section, $name, $beforeDec . $direction)) { … … 1243 1243 #Only add the metadata if it has not already been added 1244 1244 my $metaMap = $self->get_metadata_hashmap($section); # metaMap not used and called function has no apparent side-effects, 1245 1246 1245 # but this line appears important for ensuring uniqueness of (Latitude, value) meta 1246 # in the section. Also for LatShort, Longitude, LngShort. 1247 1247 } 1248 1248 … … 1250 1250 my $latitude; 1251 1251 my $longitude; 1252 if($ field =~ m/^(.+\.)?Longitude$/) {1252 if($metaname eq "Longitude") { 1253 1253 # if we are dealing with Longitude meta, and we have already seen Latitude, then add Coordinate metadata 1254 1254 $latitude = $self->get_metadata_element ($section, "Latitude");
Note:
See TracChangeset
for help on using the changeset viewer.