New answers tagged

1

Perhaps, instead of "hardcoding" into the system's environment (as below, can't comment there...), you could use a batch file instead: @echo off set PYSC_DIR=%~dp0 set ARC_VER="ArcGIS10.2" set ARC_DIR="E:\Esri\Desktop10.2\" set PYTHONPATH="%PYSC_DIR%\Lib\rpyc.zip";C:\Windows\system32\python27.zip;C:\Python27\%ARC_VER%\DLLs;C:\Python27\%ARC_VER%\lib; set ...


0

I've marked Reilly answer as the answer as that is what I am using, but thought I'd go into a bit more detail as to how to actually go about doing this. So to actually get the filename from Python to C/C++ you need to pull in the python dataset(this doesn't have much overhead as it just takes a reference). then use PyObject* fileString = ...


0

This might be worth for those that need GeoAlchemy (not GeoAlchemy2). @Florian answer points out the reason for this error and a patch to fix it. Here is another solution, perhaps more easy to follow. As stated here by user jackha, the following combination seems to work: GeoAlchemy = 0.7.2 SQLAlchemy = 0.8.4 I had the same issue (on Python 2.7), which ...


0

If I look to your provided data it seems the coords are given in text because of the ""'s, I had a simmilar problem with R output, when I re-did the R steps. With a double translation of the coords [ as.numeric(as.character(gsub(",",".",X-coord))) it worked out fine for me and the error was resolved. Could it be that your stata loop somwhere provided the ...


0

If you're only reading the dataset, why pass the data structure to C++? Why not pass the filename and let C++ open it shared? That said, I think the C# swig wrapper has a method to get the unmanaged (i.e. C++) handle of the dataset. It is a member of the dataset object itself. See if the Python wrapper has the same thing. Although this is more dangerous ...


4

Instead of doing the reclassification as a double for loop described by dmh126, do it using np.where: # reclassification lista[np.where( lista < 200 )] = 1 lista[np.where((200 < lista) & (lista < 400)) ] = 2 lista[np.where((400 < lista) & (lista < 600)) ] = 3 lista[np.where((600 < lista) & (lista < 800)) ] = 4 ...


0

Here is some code that will take a line, and generate a perpendicular line to that line. You could take a river center line, divide it by vertex, run this tool, proportion the perpendicular lines, populate the sections with z values, and MAYBE glean some river banks from the results assuming that the surface model was collected when the river was at low ...



Top 50 recent answers are included