goat-community / goat

This is the home of Geo Open Accessibility Tool (GOAT)
GNU General Public License v3.0
89 stars 47 forks source link

Geojson to others converter 🌀 #2219

Closed metemaddar closed 12 months ago

metemaddar commented 1 year ago

Related issues:

EPajares commented 1 year ago

Thanks Mohammad this looks great! This gives us a lot of flexibility to also add this to the other endpoints. It would be good adding it to the following:

image image

For isochrones it might be a bit more complex as we have the steps (1-60 minutes). Maybe we should generate these different isochrones using the jsoline function that we have and then convert it to geojson and then convert it to the other formats.

I wonder where we add the type conversion though? I guess it will be in the endpoint that returns the data based on the task id right?

metemaddar commented 1 year ago

I wonder where we add the type conversion though? I guess it will be in the endpoint that returns the data based on the task id right?

It can be added to any endpoint that returns geojson. But for the endpoints that needs task_id/result we have another step to hexlify/unhexlify the data.

EPajares commented 1 year ago

OK this makes sense. I guess we can add it to the endpoints without breaking things right? As we had the type attribute already? Or do we need changes in the client?

EPajares commented 1 year ago

We also need to think how we treat nested data as for the isochrone we actually will have a JSON colum. I think we should expand it in case of one nested level. Not sure if there is an option for this directly in GDAL.

metemaddar commented 1 year ago

OK this makes sense. I guess we can add it to the endpoints without breaking things right? As we had the type attribute already? Or do we need changes in the client?

For heatmap we didn't have return-type before, but it has a default datatype to geojson. But I think I should change this to geobuf. Am I right @majkshkurti?

metemaddar commented 1 year ago

We also need to think how we treat nested data as for the isochrone we actually will have a JSON colum. I think we should expand it in case of one nested level. Not sure if there is an option for this directly in GDAL.

We can test with a sample data :v:

EPajares commented 1 year ago

Just talked to him. We should add the type to this endpoint:

image

So we can actually remove it from the other endpoints as we will have the same return types for all of them right. So no need to specify the return type in the first request.

metemaddar commented 1 year ago

So we can actually remove it from the other endpoints as we will have the same return types for all of them right.

Not really. As you specified before, the isochrone doesn't return geojson. It returns R5-like Byte type.

metemaddar commented 1 year ago

To note:

  1. isochrone should also change the format of output like the heatmap (#2230)
  2. results should get tested
  3. We need to check other endpoints to add converter also to them
metemaddar commented 12 months ago

It is followed by