Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 10 14:12

    tomkralidis on openapi-refs-https

    (compare)

  • Aug 10 14:12

    tomkralidis on master

    fix schema imports as HTTPS (#9… (compare)

  • Aug 10 14:04

    tomkralidis on openapi-refs-https

    fix schema imports as HTTPS (compare)

  • Aug 10 13:52

    tomkralidis on openapi-refs-https

    fix schema imports as HTTPS (compare)

  • Aug 09 19:04
    tomkralidis closed #959
  • Aug 09 19:04

    tomkralidis on issue-959

    (compare)

  • Aug 09 19:04

    tomkralidis on master

    fix linked data ref for geometr… (compare)

  • Aug 09 18:48

    tomkralidis on issue-959

    fix linked data ref for geometr… (compare)

  • Aug 09 18:46

    tomkralidis on issue-959

    fix linked data ref for geometr… (compare)

  • Aug 09 18:21
    tomkralidis assigned #959
  • Aug 09 18:21
    tomkralidis milestoned #959
  • Aug 09 18:19
    PhilippeTh opened #959
  • Aug 09 18:19
    PhilippeTh labeled #959
  • Aug 08 22:53
    pvgenuchten closed #956
  • Aug 08 22:53
    pvgenuchten commented #956
  • Aug 08 21:15
    pvgenuchten edited #958
  • Aug 08 21:13
    pvgenuchten edited #958
  • Aug 08 21:13
    pvgenuchten commented #958
  • Aug 08 21:07
    pvgenuchten edited #958
  • Aug 08 21:05
    pvgenuchten labeled #958
Nacho Correas
@skyNacho

@tomkralidis I have fixed some of the pending issues that I mentioned in the OGC demo. I am working now on the process error handling when generating a new route (the rest of error handlings are working fine).

I found that when calling execute_process in a process, the exceptions are handled by the manager, which currently hardcodes to

        outputs = {
            'code': 'InvalidParameterValue',
            'description': 'Error updating job'
        }

I see two ways here:
1) either we create a specific manager for routes process or
2) we improve the error handling in base and dummy, which will be used by other processes

The code in manager/base.py for exception handling states that "# TODO assess correct exception type and description to help users" so 2) might be the best option, but I cannot make this decision by myself. Opinions?

Tom Kralidis
@tomkralidis
@skyNacho thanks for the info. So our goal here is to emit better error messages when there is an exception, to the client?
Nacho Correas
@skyNacho

correct. In the case of routes there are three different types of errors that could be returned to the client, each with its own response code according to the API Routes standard:

  • 404, if a requested route is not found among the stored routes (this is already handled)
  • 422, If the request is valid, but the server is not able to process the request (for example the coordinates for the origin or destination are not matched with existing nodes in the routing dataset, or there is no possible route between them; providing this information is important for the client to regenerate the route request)
  • 500, if the server encountered an error in the execution (such as the database was down)

At this moment, there is no way to distinguish whether an error should generate a 422 or a 500 and what type of additional information should be provided to the client

I have created two new generic errors in the BaseProcessor that processes can raise (ProcessorCannotComputeError and ProcessorItemNotFoundError), we just need to add capabilities in the process manager to handle them and build the response for api.py
Tom Kralidis
@tomkralidis
so based on the new exception types we can return 422/500 accordingly
Nacho Correas
@skyNacho
correct
I do not know if other processes would require other response codes, but we could start with these two, as we already have a use case, and extend if required
Tom Kralidis
@tomkralidis
this sounds like a plan/works for me :)
Nacho Correas
@skyNacho
cool!
Jo
@doublebyte1
@tomkralidis @skyNacho are you joining the demo session now, on gotomeetings?
@francbartoli is demoing fastgeoapi
Nacho Correas
@skyNacho
so, I guess the logical step would be to improve the error handling in the process manager base and decide whether to include it also in the dummy process manager for all processes to use
Tom Kralidis
@tomkralidis
yes. Which means updating around https://github.com/geopython/pygeoapi/blob/master/pygeoapi/process/manager/base.py#L224 to catch the various exceptions?
Nacho Correas
@skyNacho
that's exactly the spot
@doublebyte1 yes, I will join.
Tom Kralidis
@tomkralidis
@doublebyte I joined but can’t stay long
Tom Kralidis
@tomkralidis
@justb4 RE: geopython/pygeoapi#801, is this good for merge ?
ahmadharis14
@ahmadharis14
HI guys, I have problem with implementing data files with Polygon geometeries via MongoDB, the procedure works perfectly for the data files with points but it doesn't work for the data files with Polygons or Polyline geometries, how to correctly code in DOCK_CONFIG file for data files with polygon or polyline geometries. OR Pygeoapi only works for Point Data. Any assistance would be very helpful.
Tom Kralidis
@tomkralidis
Hi @ahmadharis14 . What problems are you running into?
ahmadharis14
@ahmadharis14
Hi Tom, I am trying implement Pygeoapi via MongoDB on data file which has polygon geometry, when I run the command (docker compose up -d) to run Pygeoapi, it generates three containers of (Mongo, Pygeoapi, Mongo_Express) but the Pygeoapi gives an error that it exited because Openapi.yml wasn't generated
image.png
image.png
@tomkralidis the Docker-Config file works perfectly for the data with points geometry
ahmadharis14
@ahmadharis14
image.png
Tom Kralidis
@tomkralidis
can you share your entire pygeoapi configuration? It looks like there may be some issues with format/indenting.
ahmadharis14
@ahmadharis14
should I copy and paste the pygeoapi configuration?
image.png
image.png
Tom Kralidis
@tomkralidis
you need to create each layer/resource within a resources section. See the sample pygeoapi configuration for an example
ahmadharis14
@ahmadharis14
image.png
you mean like this?
Tom Kralidis
@tomkralidis
yes, you can test that
ahmadharis14
@ahmadharis14
it still gives error but the error is about the document of data set that it's out of Bounding Box, while the data is selected in mentioned bounding box
image.png
Tom Kralidis
@tomkralidis
What is the request you are making that triggers that error? What projection of the data on the MongoDB backend (should be 4326)
ahmadharis14
@ahmadharis14
I am pulling the pygeoapi on docker via docker-compose up -d, for MongoDB I am using 27017
Everything works perfectly when I am using data set with point geometries but for the polygon or polyline geometries - it doesn't work.
Tom Kralidis
@tomkralidis

PSAs:

Having said this, for those who are using pygeoapi, please feel free to let us know so we can include your work in our upcoming presentation at FOSS4G. Thanks in advance!

5 replies
Tom Kralidis
@tomkralidis

Hi all: as we march towards OSGeo incubation/graduation, can folks take a look at geopython/pygeoapi#930 ? We need to bottom this issue out with some attribution/doc cc @justb4 @francbartoli @ksonda

Thanks in advance

Tom Kralidis
@tomkralidis

pygeoapi PSC (@kalxas @francbartoli @justb4 @jorgejesus @pvgenuchten) please see / vote on https://lists.osgeo.org/pipermail/pygeoapi/2022-August/000252.html

Thanks in advance

Tom Kralidis
@tomkralidis

all: FYI @msmitherdc has made the motion to the OSGeo Incubation committee

https://lists.osgeo.org/pipermail/incubator/2022-August/004507.html

Thanks for everyone’s efforts and for Mike for getting us here. Let’s see how things go

Cheers

Tom Kralidis
@tomkralidis

Hi all: FYI I’ve posted a pygeoapi OSGeo AGM update in https://docs.google.com/presentation/d/1Mis580FlD29HjaymfL9OC72X9IqcM4uvnqVH57jQLqI/edit#slide=id.g5fb9d78caa_21_1

please feel free to add your updates, implementations, etc. to our update for the OSGeo Annual General Meeting. Thanks in advance!

Tom Kralidis
@tomkralidis

hi all: FYI I’ve added a pygeoapi section for the Florence code sprint: https://wiki.osgeo.org/wiki/FOSS4G_2022/Community_sprint#pygeoapi

For my part, I won’t be able to make day 1 given OSGeo Board meetings, but will be there on day 2. Please feel free to add/update items accordingly. It would be great to get a release out at the sprint.

Cheers

Francesco Bartoli
@francbartoli

hi all: FYI I’ve added a pygeoapi section for the Florence code sprint: https://wiki.osgeo.org/wiki/FOSS4G_2022/Community_sprint#pygeoapi

For my part, I won’t be able to make day 1 given OSGeo Board meetings, but will be there on day 2. Please feel free to add/update items accordingly. It would be great to get a release out at the sprint.

Cheers

I’ll be there during day 1 @tomkralidis

Tom Kralidis
@tomkralidis
great @francbartoli. Which day?
Francesco Bartoli
@francbartoli
Saturday
Tom Kralidis
@tomkralidis
ok great. I can pick up where you leave off :)
(ugh, misread "day 1" for "1 day" :)
Francesco Bartoli
@francbartoli
I’ll leave early on Sunday so I’ll be still around Saturday evening