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

Adding GeoCoordinates queries to address #100 #125

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

iannesbitt
Copy link

This PR adds queries that should match the following spatialCoverage definition in a schema.org JSON-LD. It also adds a test file and accompanying systemmetadata.

    "spatialCoverage": {
      "@type": "Place",
      "geo": [
        {
          "@type": "GeoCoordinates",
          "latitude": "36.7016",
          "longitude": "-121.90504"
        },
        {
          "@type": "GeoCoordinates",
          "latitude": "36.837017",
          "longitude": "-121.88215"
        },
        {
          "@type": "GeoCoordinates",
          "latitude": "36.873",
          "longitude": "-122.03484"
        },
        {
          "@type": "GeoCoordinates",
          "latitude": "37.04653",
          "longitude": "-122.404"
        }
      ]
    },

I once again need help testing this as I don't know how to get it set up myself.

@taojing2002
Copy link
Collaborator

Hi @iannesbitt. I checked out the branch and ran the tests twice (mvn clean test). Every time I got this error:

[ERROR] Errors: 
[ERROR]   JsonLdSubprocessorTest.testGeoCoordinates:562->DataONESolrJettyTestBase.compareFieldValue:333 » NullPointer

Did all tests pass when you ran? Did I miss anything?

@@ -576,6 +576,110 @@
<property name="converter" ref="solrLongitudeConverter" />
</bean>

<!-- Extract south bounding coordinate from a 'SO:spatialCoverage' property of type 'GeoCoordinates'. -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You added four beans such as schema_org_geoCoordinates_east. But they are not referenced by any place. They should be referenced in the application-context-json-ld.xml file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in 355cbec.

"spatialCoverage": {
"@type": "Place",
"geo": [
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May we add another part ( or file) having bounding box?

Copy link
Author

@iannesbitt iannesbitt Oct 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taojing2002 This file is meant to test singular coordinate values. There are two test files that implicitly test the bounding box format (example below):

      "spatialCoverage": {
        "@type": "Place",
        "geo": {
          "@type": "GeoShape",
          "box": "-28.09816 -32.95731 41.000022722222 1.71098"
        }
      },

@iannesbitt
Copy link
Author

@taojing2002 I never got tests working, so I didn't get to this point. I will review and resubmit. Thank you!

@artntek artntek added this to the 3.2.0 milestone Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand sparql query for extracting spatial coverage info from schema.org documents
3 participants