Closed mikejeffe closed 8 years ago
This also could be something that @sisskind might have some insight into since he worked on the implementation of clipping layers.
This may also be causing issues on ngageoint/hootenanny#480. Need to confirm space issue for ingesting datasets or creating through conflation.
@mjeffe98 Ready for test. Should not be able to use a space in dataset name when importing/clipping/conflating.
Just adding a comment for a mental note. Revisiting this to see if removing support for spaces altogether is the best approach or not.
Appears that importing with spaces is also causing errors.
This is a renderdb issue -- it appears it will not accept layer names with spaces. @brianhatchl how do you want to proceed?
@brianhatchl @mattjdnv changing hoot core code to replace map name with map id in issue-326 branch (will commit shortly).
@sisskind replacing map name with id is the proper fix. There should be tests that break at this point.
@brianhatchl ok -- will let you know once it is ready for a review. may miss some things along the way, but if i can import/clip/delete without warnings, I think I'll be on the right track?
I'm still a bit uncertain because I thought there was a ticket for adding a export render db trigger to the clipping job, but maybe not.
This fix will settle this https://github.com/ngageoint/hootenanny-ui/issues/269
See scripts/exportrenderdb.sh and then uses of RasterToTilesService job in ConflationResource and FileUploadResource. Currently $INPUT=mapname and those resources would have to add the mapid to the available env vars for the exportrenderdb script.
_createCommandObj in RasterToTilesService would need to accept the map id as a param.
As you can see, I just commandeered the old density map service infrastructure to run the exportrenderdb script instead of the gdal2tiles stuff.
So that is the only change that would need to be made? I also found map name being used instead of map id in a few places and made the change (see https://github.com/ngageoint/hootenanny/commit/467de2892c83ce8561eecd07d521abb525e248ab)
Working on updating _createCommandObj now
There is newish code in the core to delete render dbs within hoot delete-map
so that's the first update in the commit you reference. And the node-mapnik-server needs to know the render db naming convention as well.
where in node-mapnik-server does that get defined?
I think you already found it in your initial commit, I was describing what those commit changes affected in comment above.
@brianhatchl do you have bandwidth to review? think I am missing something, since mapnik is running but not rendering. Will create a pull request for easier viewing.
The pull request above (replacing map name with map id in the render database name) is ready to review. But I don't think the clip tool in the UI generates a render db based on my testing (see #262). This pull request should address https://github.com/ngageoint/hootenanny-ui/issues/269 however.
When you clip using bounding box or map extent, there is the option to enter a name for the layer. If the name has a space in between it causes the clip job to fail without reporting the reason why (example error below). Since providing a space in the name is supported when renaming a layer it seems that we should support it with all functions that involve output name.
2016-03-16 13:56:12,675 ERROR JobExecutionManager:225 - Job with ID: a0b658d9-6382-4bd1-882d-fe4015f0d732 failed: {"chainjobstatus":"a0b658d9-6382-4bd1-882d-fe4015f0d732","childrencount":"1","children":[{"id":"834e8d78-4d4b-4cdb-90c2-bd6c7864c342","detail":"Failed to execute.Error running crop-map:\ncrop-map takes three parameters.\nmake: *** [step1] Error 255\n","status":"failed"}]}