-
Notifications
You must be signed in to change notification settings - Fork 31
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
Issue 194 #196
Issue 194 #196
Conversation
... for exporting.
... for shapefile export.
private final String shapefileExportThresholdPropertyName = "shapefile.export.measurement.threshold"; | ||
private Track track; | ||
private Properties properties; | ||
private static final String PROPERTIES = "/export.properties"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see my previous comment: #195 (comment)
Agreed, but I will need to fix the unit tests first... |
I agree that this could be misleading, my only concern is that .zip could be too generic (whats in the zip file?). The API documentation clearly states that the shapefile is zipped. Changing the extension would cause changes on several locations (server/docs/website). Not a big problem, but lets be sure that this is really needed. |
hehe. I once tried to load the .shp (the zip) into ArcMap and failed due to missing extraction :D maybe we can go for uuid.shp.zip? should be supported by all major OS. |
Right, I tried that and it seemed as though the server only recognized the last suffix, i.e. .zip. Come to think of it, I will have to try it again, maybe it could work after all. But I'd suggest to handle it separated from this PR. |
I second |
I double checked an it is not directly possible to use uuid.shp.zip, because the URL path is split using dots to get the suffixes and if a if there is more than one suffix the other suffixes are concatenated to the path again, leading to uuid.zip. This is then used as track-id and of course no track is found. Now, I could replace possible occurences of .zip in any track-id String before the the id is used for the database query. That way, we could use http://.../uuid.shp.zip and get a nice zip-file with the same name. Kind of a hack, I guess but this would give us the desired behavior... Any views? |
I was actually thinking about just changing the name of the file using the Content-Disposition header, see http://stackoverflow.com/questions/5318132/is-it-possible-to-control-the-filename-for-a-response-from-a-jersey-rest-service So something along the lines of
I think that was my first mistake, because you don't actually work on a specific service endpoint but just implement an encoder. |
Fix for #194. Measurement limit for shapefile export: 500 (configurable) Everything above that will result in a HTTP 500 error:
