-
Notifications
You must be signed in to change notification settings - Fork 7
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
Opensextant geo syntax question #21
Comments
Sorry for the slow response. |
Thanks for your response, I am still getting errors when I attempted your recommendation. I tried some other variations.
[user@localhost ~]$ curl -X GET http://localhost:8182/opensextant/lookup/csv/query/geo:%2833.2421%2F65.43094%29 AND name:Kajran
<html>
<head>
<title>Status page</title>
</head>
<body style="font-family: sans-serif;">
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Internal Server Error</p>
<p>The server encountered an unexpected condition which prevented it from fulfilling the request</p>
<p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>
curl: (6) Could not resolve host: AND; Unknown error
curl: (6) Could not resolve host: name; Unknown error
then I added %20 to fill in the spaces.
[user@localhost ~]$ curl -X GET http://localhost:8182/opensextant/lookup/csv/query/geo:%2833.2421%2F65.43094%29%20AND%20name:Kajran
<html>
<head>
<title>Status page</title>
</head>
<body style="font-family: sans-serif;">
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Internal Server Error</p>
<p>The server encountered an unexpected condition which prevented it from fulfilling the request</p>
<p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>
…-- still failed with syntax error.
This partially works (with the OR clause instead of the AND the request, but notice that I had to put back the asterisk after each coordinate.
[user@localhost ~]$ curl -X GET http://localhost:8182/opensextant/lookup/csv/query/geo:%2833.2421*%2F65.43094*%29%20OR%20name:Kajran
PlaceName ExpandedPlaceName NameType NameTypeSystem CountryCode Admin1 Admin2 FeatureClass FeatureCode Latitude Longitude Source
Kajran name AF AF41 Geo.featureType.Area AREA 33.2421 65.43094 NGA
Kajran name AF AF41 Geo.featureType.PopulatedPlace PPLA2 33.20357 65.47311 NGA
Kajran name AF AF41 Geo.featureType.AdminRegion ADM2 33.21433 65.61748 NGA
Kohe Kajran name AF AF41 Geo.featureType.Hypso MT 33.20493 65.38412 NGA
Markaz-e Kajran name AF AF41 Geo.featureType.PopulatedPlace PPL 33.21137 65.47075 NGA
Kuh-e Kajran name AF AF41 Geo.featureType.Hypso MT 33.20493 65.38412 NGA
This is what I ultimately need to work, but it returns no results.
[hadoop@localhost ~]$ curl -X GET http://localhost:8182/opensextant/lookup/csv/query/geo:%2833.2421*%2F65.43094*%29%20AND%20name:Kajran
PlaceName ExpandedPlaceName NameType NameTypeSystem CountryCode Admin1 Admin2 FeatureClass FeatureCode Latitude Longitude Source
should return this.
Kajran name AF AF41 Geo.featureType.Area AREA 33.2421 65.43094 NGA
Something is wrong with my syntax.
Thanks
________________________________
From: dlutz2 <[email protected]>
Sent: Monday, December 9, 2019 5:19 PM
To: OpenSextant/OpenSextantToolbox <[email protected]>
Cc: Burgess, Freddie <[email protected]>; Author <[email protected]>
Subject: Re: [OpenSextant/OpenSextantToolbox] Opensextant geo syntax question (#21)
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
I think you might have some extra characters in your URL ( "*" after the numbers in the geocoords.
Try this:
http://localhost:8182/opensextant/lookup/csv/query/geo:%2833.2421%2F65.43094%29<https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8182_opensextant_lookup_csv_query_geo-3A-252833.2421-252F65.43094-2529&d=DwMCaQ&c=qv9gmtOiXdJCj9gMlMKtaw&r=rwWSNh7eziSqkMViqMUAql2k1XeKjMOd2FPbNLtdyew&m=8r1VspdORWQ4cW3rBjDI3U7GLJIWXORgQppvtosTcR0&s=WuWXjB9xz2HvtsqU1zrdE_ZWP4-udrCIVZSFlofJoPg&e=> AND name:Kajran
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenSextant_OpenSextantToolbox_issues_21-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAN7EFR2OCGQK5WSZDNQS2XLQX277LA5CNFSM4JXBDPI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGK5CAQ-23issuecomment-2D563466498&d=DwMCaQ&c=qv9gmtOiXdJCj9gMlMKtaw&r=rwWSNh7eziSqkMViqMUAql2k1XeKjMOd2FPbNLtdyew&m=8r1VspdORWQ4cW3rBjDI3U7GLJIWXORgQppvtosTcR0&s=wDbBYRsknJ_b9_c7BGmNoZ2uvS17BVF63pxGf-CpFsQ&e=>, or unsubscribe<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AN7EFRYOHTUBRV2UPXFL3BLQX277LANCNFSM4JXBDPIQ&d=DwMCaQ&c=qv9gmtOiXdJCj9gMlMKtaw&r=rwWSNh7eziSqkMViqMUAql2k1XeKjMOd2FPbNLtdyew&m=8r1VspdORWQ4cW3rBjDI3U7GLJIWXORgQppvtosTcR0&s=N6yGSjii0R3b8_d_1e1leLMFvudM7s1Ck7S0nbkN2vc&e=>.
|
Try replacing the "/" between the geo coords with a comma. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the README_server.txt it states.
-- General query in the form of : pairs (query must be URL-safe)
curl -X GET http://localhost:8182/opensextant/lookup/csv/query/name:Ka*%20AND%20cc:AF
-- query fields
name - place name
name_expanded - an expanded form of the name (only for name which are codes or abbreviations)
feat_class - the general type of feature. Valid values are A, P, L, H, V, S, T, R
feat_code - specific type of feature.
cc - ISO 2 character country codes
name_type - what type of name. Valid values are "name", "code" and "abbreviation"
geo - the point location (lat/lon) for the named place
I am looking to leverage the geo option with the name option, but I can't find an example of the correct format.
i.e. this is what I am trying to do.
(33.2421/65.43094) -> URL-SAFE -> %2833.2421%2F65.43094%29
curl -X GET http://localhost:8182/opensextant/lookup/csv/query/geo:%2833.2421*%2F65.43094*%29%20AND%20name:Kajran*
This is returning no matches
PlaceName ExpandedPlaceName NameType NameTypeSystem CountryCode Admin1 Admin2 FeatureClass FeatureCode Latitude Longitude Source
but I want it to return this.
PlaceName ExpandedPlaceName NameType NameTypeSystem CountryCode Admin1 Admin2 FeatureClass FeatureCode Latitude Longitude Source
Kajran name AF AF41 Geo.featureType.Area AREA 33.2421 65.43094 NGA
What I'm I doing wrong?
The text was updated successfully, but these errors were encountered: