Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute naming of bounding-box wrong (North and South Longitude) #5645

Closed
pdante-ubc opened this issue Mar 14, 2019 · 8 comments · Fixed by #10306
Closed

Attribute naming of bounding-box wrong (North and South Longitude) #5645

pdante-ubc opened this issue Mar 14, 2019 · 8 comments · Fixed by #10306
Labels
Feature: Geospatial Feature: Metadata Size: 30 A percentage of a sprint. 21 hours. (formerly size:33) Type: Bug a defect User Role: API User Makes use of APIs
Milestone

Comments

@pdante-ubc
Copy link

I was working on a harvester to grab data/metadata from Dataverse and noticed that North and South Latitude fields in the geospatial metadata are mislabeled as "Longitude". The web interface titles the fields as "Latitudes" so this doesn't break anything other than for developers who are trying to parse metadata coming out of Dataverse. The error is both in actual metadata coming out of Dataverse and in the field names in the Dataverse Metadata v4.x spreadsheet, although the spreadsheet has the correct labels in the title.

@djbrooke
Copy link
Contributor

Hi @pdante-ubc - I'll tag in local metadata block enthusiast @jggautier to get his thoughts about what a fix would look like here.

@jggautier jggautier changed the title North and South Logitude North and South Longitude Mar 14, 2019
@jggautier
Copy link
Contributor

jggautier commented Mar 14, 2019

Thanks for pointing out this error, @pdante-ubc!

Because this fix involves changes to the database's field names, as opposed to the field labels we see in the UI, I don't know if editing and reloading the geospatial.tsv, the thing I'm most familiar with doing, would be appropriate. There's a warning in our metadata customization guides:

Great care must be taken when reloading a metadata block. Matching is done on field names (or identifiers and then names in the case of controlled vocabulary values) so it’s easy to accidentally create duplicate fields.

So would only editing these field names in the geospatial.tsv and reloading it create duplicate fields?

@pdurbin
Copy link
Member

pdurbin commented Mar 14, 2019

If it helps, the logic is in "DatasetFieldServiceApi.java": https://github.com/IQSS/dataverse/blob/v4.11/src/main/java/edu/harvard/iq/dataverse/api/DatasetFieldServiceApi.java


Update: I'm just adding the terms northLongitude and southLongitude here so I can more easily find this issue. Yes, these are incorrect and should be northLatitude and southLatitude, respectively, as noted at https://groups.google.com/g/dataverse-community/c/kYNkZjc1CJM/m/c3eUp6vNFgAJ

@jggautier jggautier changed the title North and South Longitude Attribute naming of bounding-box wrong (North and South Longitude) Jun 5, 2019
@mheppler
Copy link
Contributor

mheppler commented Mar 2, 2020

Related to Improve Geospatial Metadata Block #6713.

@scolapasta
Copy link
Contributor

scolapasta commented Jun 18, 2020

@jggautier sorry no one fully answered your question, but yes it would create duplicates since the "name" is what we use to match the DatasetFieldType.

So the change in the tsv would need to be accompanied by a corresponding db change. But it would be a straightforward update query.

@cmbz
Copy link

cmbz commented Jan 8, 2024

2024/01/08: This is a cleanup task. See tasks below. Update with size: 10

  • - Correct the typo in the code
  • - Provide SQL script to update database
  • - Consider and address backwards compatibility issues

@jp-tosca jp-tosca self-assigned this Jan 26, 2024
@cmbz cmbz added Size: 30 A percentage of a sprint. 21 hours. (formerly size:33) and removed Size: 10 A percentage of a sprint. 7 hours. labels Jan 31, 2024
@cmbz
Copy link

cmbz commented Jan 31, 2024

2024/01/31

  • Possibly update with a flyway script, but needs additional investigation. Resized at 33 (from 10) during kickoff.

@landreev
Copy link
Contributor

As for maintaining backward compatibility on the API level - I don't really have a strong opinion. We can keep code in place that recognizes the old names, or we can say firmly that this is a breaking change and the old names are no longer accepted because they were wrong in the first place. Either option is ok, IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Geospatial Feature: Metadata Size: 30 A percentage of a sprint. 21 hours. (formerly size:33) Type: Bug a defect User Role: API User Makes use of APIs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants