Select to view content in your preferred language

Creating a Raster Surface and updating this

622
4
03-28-2013 11:05 PM
DilipWagh
Emerging Contributor
All,

I am trying to use some of the functionality of the PSCOP which allows download of dynamic weather data, this works really well, and updates every 15 mins via a python script, I am then trying to use this data to build a raster surface (Temperature) in an SDE database, which also works (Model Maker which I will convert to a python script later), the issue is, it will not overwrite the raster, but appends a sequential number and creates further raster�??s. I need it to overwrite as I want to serve the raster in ArcGIS Server, just can�??t seem to find the solution, and don�??t want to over complicate this by then creating a vector, but may have to do that, Any ideas and assistance would be greatly appreciated.
0 Kudos
4 Replies
JamesCrandall
MVP Alum
Maybe you could delete any existing rasters in that workspace first?


## you need to set the worspace first!
## for each Raster in the workspace, delete it
rasters = arcpy.ListRasters()
for r in rasters:
    arcpy.Delete_management(r)
              

0 Kudos
DilipWagh
Emerging Contributor
Maybe you could delete any existing rasters in that workspace first?


## you need to set the worspace first!
## for each Raster in the workspace, delete it
rasters = arcpy.ListRasters()
for r in rasters:
    arcpy.Delete_management(r)
              



Thanks James, but would this work if the file is being served in ArcGIS Server at the same time
0 Kudos
JamesCrandall
MVP Alum
Thanks James, but would this work if the file is being served in ArcGIS Server at the same time


I'm not completely certain of the answer.  I suppose if you are creating and publishing a mapservice from an .mxd with the raster loaded, then I'd take a guess you would need to re-publish.  I think at 10.1, the REST cache is automatically refreshed when a service/folder is updated.

So... hope that I helps but I think you will likely have to just work through this one.

j
0 Kudos
JakeSkinner
Esri Esteemed Contributor
All,

I am trying to use some of the functionality of the PSCOP which allows download of dynamic weather data, this works really well, and updates every 15 mins via a python script, I am then trying to use this data to build a raster surface (Temperature) in an SDE database, which also works (Model Maker which I will convert to a python script later), the issue is, it will not overwrite the raster, but appends a sequential number and creates further raster�??s. I need it to overwrite as I want to serve the raster in ArcGIS Server, just can�??t seem to find the solution, and don�??t want to over complicate this by then creating a vector, but may have to do that, Any ideas and assistance would be greatly appreciated.


What is the workflow you are using to create the raster surface in your SDE geodatabase?
0 Kudos