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

Add Records Collection Downloader #163

Merged
merged 6 commits into from
Jul 31, 2018

Conversation

meomancer
Copy link
Contributor

@meomancer meomancer commented Jul 25, 2018

this fix #kartoza/LEDET_BIMS#200

Control screenshots
selection_022

Example of csv result
download.csv.zip

@meomancer meomancer changed the title [WIP] Add Records Collection Downloader Add Records Collection Downloader Jul 27, 2018
@meomancer
Copy link
Contributor Author

hi @dimasciput
updated :

  • download with csv or shapefile

@meomancer
Copy link
Contributor Author

geojson that produced
selection_028

@meomancer
Copy link
Contributor Author

we could add other format in future with new ticket

@dimasciput
Copy link
Member

@meomancer
Can you update the column titles to this :
latitude(float), longitude(float), species_name(string), location_site(string), notes(string), category(string), date(yyyy-mm-dd), collector(string)
Same fields as csv upload requirement.

screen shot 2018-07-27 at 2 03 42 pm
Get the iucn name instead.

screen shot 2018-07-27 at 2 03 20 pm
Remove the id from the owner

@meomancer
Copy link
Contributor Author

hi @dimasciput
thank you for the review
updated

@gubuntu
Copy link

gubuntu commented Jul 27, 2018

not shapefile. Other formats as per OP, in other tickets.

@meomancer so you decided it was easier to do it all via Django than to publish the biodiversity data through Geoserver and then download in the same way as other layers?

also @meomancer your clip 'n ship from kartoza/geonode#150 needs to be merged into GeoNode, then we can use it for all the downloads in BIMS

@dimasciput
Copy link
Member

@gubuntu not shapefile. Other formats as per OP, in other tickets.

What if the site is polygon? Doesn't make sense if we output them as a csv.

@gubuntu : @meomancer so you decided it was easier to do it all via Django than to publish the biodiversity data through Geoserver and then download in the same way as other layers?

IIRC, Tim said that we don't need to put the biodiversity data to the geoserver. We only want the base map and other layers. And we never have this discussion to put all the collection data to the geoserver.

@gubuntu
Copy link

gubuntu commented Jul 28, 2018

  1. If it's a polygon, the other formats in the OP do the trick. We do not want to provide shapefiles.
  2. By 'putting the biodiversity data in the geoserver' I mean publishing the BIMS biodiversity data from the BIMS database as geoserver layers by defining a geoserver store on the BIMS postgresql database. In other words, not changing BIMS at all. It's just an alternative approach to consider since geoserver already provides all the download functionality and could save time writing download tools

@dimasciput
Copy link
Member

@gubuntu
1.

If it's a polygon, the other formats in the OP do the trick. We do not want to provide shapefiles.
I think what Irwan meant is geojson not shapefile. If user wants to download data that has polygon on it, and they choose csv format, what will happen with that data?

  • We output two different file? Csv and other file that has polygon on it?
  • Remove the geometry data from csv?

By 'putting the biodiversity data in the geoserver' I mean publishing the BIMS biodiversity data from the BIMS database as geoserver layers by defining a geoserver store on the BIMS postgresql database. In other words, not changing BIMS at all. It's just an alternative approach to consider since geoserver already provides all the download functionality and could save time writing download tools

I don't know how that works, we will need @NyakudyaA helps. And right now we haven't even successfully restored the geoserver data. I think this is our biggest blocker right now. And FYI only location site that has geometry data, we still need to do query from Django app to get the collection data (fish, reptile, etc).

@gubuntu
Copy link

gubuntu commented Jul 28, 2018

  1. For point data, csv can have simple x,y fields. For polygon data, either give an error saying we can't provide csv because it is not point data, or put WKT geometry in the geom field.
  2. Since @meomancer has already written the code for downloading, let's not complicate things. (one can create views in postgresql or geoserver to define the download table)
  3. restoring geoserver as a blocker, what exactly is the blocker?
    a. its backend postgresql should be restored into a separate db so should not interfere with django/geonode db
    a. then it's the geoserver_data_dir

@dimasciput
Copy link
Member

@gubuntu

restoring geoserver as a blocker, what exactly is the blocker?
a. its backend postgresql should be restored into a separate db so should not interfere with django/geonode db
b. then it's the geoserver_data_dir

@NyakudyaA is currently working on it, maybe he can answer. And for point a, I think @lucernae create only one db for django+geonode+geoserver.

@dimasciput dimasciput merged commit e543a2e into kartoza:develop Jul 31, 2018
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

Successfully merging this pull request may close these issues.

3 participants