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

Opensextant geo syntax question #21

Open
dbapundit opened this issue Dec 6, 2019 · 3 comments
Open

Opensextant geo syntax question #21

dbapundit opened this issue Dec 6, 2019 · 3 comments

Comments

@dbapundit
Copy link

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?

@dlutz2
Copy link
Member

dlutz2 commented Dec 9, 2019

Sorry for the slow response.
I think you might have some extra characters in your URL, try removing the "*" after the numbers in the geocoords, like:
http://localhost:8182/opensextant/lookup/csv/query/geo:%2833.2421%2F65.43094%29 AND name:Kajran

@dbapundit
Copy link
Author

dbapundit commented Dec 10, 2019 via email

@dlutz2
Copy link
Member

dlutz2 commented Dec 10, 2019

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants