Vanuatu GIS Feed
banner
vanuatugis.bsky.social
Vanuatu GIS Feed
@vanuatugis.bsky.social
The Vanuatu GIS Feed will be used to aggregate site posts. It is monitored, but will probably not be very 'personal'. - @raetlomi.bsky.social
Technology Feed @vanuatutech.bsky.social.
231124
LAStools: "DOSKEY" command wasn't found
A while ago I wrote the following Java 8 code on Win 10 to create an index file for a .laz file: Process p = null; ArrayList lines = new ArrayList(); String lasbinpath = "somepath\\LAStools\\bin"; String command = "lasindex64 -i someotherpath\\myfile.laz"; try { ProcessBuilder builder = new ProcessBuilder("cmd.exe", "/c", command); Map env = builder.environment(); env.put("path", lasbinpath); builder.redirectErrorStream(true); p = builder.start(); BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream())); String line; while(true) { line = br.readLine(); if (line==null) { break; } lines.add(line); } br.close(); } catch(IOException e) { e.printStackTrace(); } finally { if(p!=null) { p.destroy(); } } Recently I got a new Win 11 PC, installed the latest LAStools version (241017), the same Eclipse version (2020-06) and Java 8 on it and copied the old project. Yesterday I ran it once and it was working fine. Then I installed Miniconda but now it always returns an error: The "DOSKEY" command is either misspelled or could not be found. done with 'someotherpath\myfile.laz'. took 0.006 sec. It does create a .lax file (can't check if it's done correctly atm) but I've never seen this error before and definitely want to fix it. What I've already tried/checked: * Cleaned the project * Restarted Eclipse and my PC * The PATH (environmental variable) looks fine imo, only the "condabin" folder was added to it * The "doskey.exe" file exists in the "system32" folder * env.get("path") is null before I set it and it's got the correct path afterwards * When I copy this path into file explorer, it does lead to the "bin" folder, so the path is definitely correct. * The lasinfo64 command opens the lasinfo window but doesn't display anything (not sure what it should look like, as I've never used it before) and the same error is printed * Java is working fine otherwise and e.g. java -version prints the java version without any errors * I tested the same code in Eclipse 2025-09 with OpenSDK 24 and it's printing the same error * I added the path to PATH (system, not user) but it's still printing the same error The weird thing is, if I call it directly from cmd like this: cd someotherpath set path=C:\Sonstiges\RestBuero\LfU\LAZ\LAStools\bin;%path% lasindex64 -i myfile.laz ...then it works - no error. With the path added to PATH, I can omit the second line and it's still working (of course). What am I missing? Did Win 11 change how Eclipse can access the environmental variables? Is there anything I have to do/add to make it use LAStools correctly? Is this version of LAStools possibly bugged in a way?
gis.stackexchange.com
November 19, 2025 at 1:11 PM
Creating and showing vector layer for Oracle GeometryCollection with PyQGIS
I have a table in my Oracle database with multiple different geometry types (ie, points and lines). Now, I want to show the data in QGIS. I can create a new vector layer, however, its geometry type is arbitrarily defined as either point or line. Although all features are displayed in the attribute table, they aren't displayed in the map when their geometry type is different from the previously mentioned type chosen by QGIS. I also tried a filter expression on the table that checks for the SDO_GTYPE within the layers' filter expression: However, that prompts an error, as GET_GTYPE isn't defined (it's defined on Oracle's SDO_GEOMETRY type, but that seems inaccessible in the filter expression). Ultimately, I want to create a Python script that does this: writer_options = QgsVectorFileWriter.SaveVectorOptions() writer_options.driverName = 'GPKG' result = QgsVectorFileWriter.writeAsVectorFormatV3(layerFromOracle, outFile, QgsProject.instance().transformContext(), options=writer_options) EDIT: From https://gis.stackexchange.com/a/197800/20297 I got, that I can create a layer from any arbitrary SQL-expression using this: uri = QgsDataSourceURI() uri.setConnection('host', 'port', 'database', 'username', 'password') sql = 'SELECT * FROM myschema.mytable t WHERE t.geometrie.get_gtype() = 2' uri.setDataSource('', '(' + sql + ')', 'geometrie', '', 'id') vlayer = QgsVectorLayer(uri.uri(), 'LayerName','oracle') which I'd like to save then to my output-file. However when I check if that layer is valid, it returns False. Furthermore, when adding it to my map, I get a warning that the datasource for the layer is broken. However when opening that layers' properties, it seems, QGIS is able to query the correct data, but is unable to get the appropriate geometry-type and thus to display it properly:
gis.stackexchange.com
November 19, 2025 at 11:28 AM