jhpoelen / effechecka

create taxonomic checklists and monitor biodiversity data access
MIT License
1 stars 2 forks source link

Another example API query #55

Closed diatomsRcool closed 7 years ago

diatomsRcool commented 7 years ago

Can I get an example of how to format the url if the lat/lon in the Envelope are for polygons instead of bounding boxes or for multiple, non-intersecting polygons?

jhammock commented 7 years ago

http://api.effechecka.org/checklist?limit=20&taxonSelector=Aves%2CInsecta&traitSelector=&wktString=GEOMETRYCOLLECTION%28POLYGON%20%28%28-72.147216796875%2041.492120839687786%2C%20-72.147216796875%2043.11702412135048%2C%20-69.949951171875%2043.11702412135048%2C%20-69.949951171875%2041.492120839687786%2C%20-72.147216796875%2041.492120839687786%29%29%2CPOLYGON%20%28%28-73.89404296875%2043.70577357323458%2C%20-73.553466796875%2042.841905375615426%2C%20-75.25634765625%2042.61593874499187%2C%20-75.43212890625%2043.18732209986729%2C%20-74.783935546875%2043.506895053350576%2C%20-73.89404296875%2043.70577357323458%29%29%29

jhpoelen commented 7 years ago

Using the map widget in effechecka.org, I was able to create this query

and this resulted in the following query to the api:

http://api.effechecka.org/checklist?limit=20&taxonSelector=Aves%2CInsecta&wktString=GEOMETRYCOLLECTION(POLYGON%20((-72.147216796875%2041.492120839687786%2C%20-72.147216796875%2042.391008609205045%2C%20-70.916748046875%2042.415346114253616%2C%20-70.7080078125%2041.66470503009207%2C%20-72.147216796875%2041.492120839687786))%2CPOLYGON%20((-70.45524597459007%2042.612626024464085%2C%20-70.02677917771507%2042.51552607464184%2C%20-70.09819031052756%2042.198907906111096%2C%20-70.46623230271507%2042.28430817647003%2C%20-70.45524597459007%2042.612626024464085)))
jhpoelen commented 7 years ago

Looks like @jhammock beat me to it ...

diatomsRcool commented 7 years ago

Hmmm. Looks like something I could have done myself. Sorry.