texts: How to convert NDWI into vector and export it?

texts:
I am working over a collection to calculate NDWI. Now I want to convert each NDWI over the collection to vector and export it.
Following code is being used.
a function defined for masking
function maskLandsatclouds(image) {
var qa = image.select('BQA')
var cloudBitMask = ee.Number(2).pow(4).int()
var mask = qa.bitwiseAnd(cloudBitMask).eq(0)
 return image.updateMask(mask).select("B.*").copyProperties(image, ["system:time_start"])
 }

filtering landsat data
var landsat8= ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA').filterBounds(geometry)
.filterDate('2016-07-01', '2020-10-22')
.sort('DATE_ACQUIRED')
.filter(ee.Filter.eq('WRS_PATH', 152))
.filter(ee.Filter.eq('WRS_ROW', 42))
.map(maskLandsatclouds)

defining threshold
 var waterThreshold = 0.1;

water extraction function:
var waterfunction = function(image){
  //add the NDWI band to the image
  var ndwi = image.normalizedDifference(['B3', 'B5']).rename('NDWI');
  //get pixels above the threshold
  var water01 = ndwi.gt(waterThreshold);
  //mask those pixels from the image
  image = image.updateMask(water01).addBands(ndwi);

  var area = ee.Image.pixelArea();
  var waterArea = water01.multiply(area).rename('waterArea');

  image = image.addBands(waterArea);

  var stats = waterArea.reduceRegion({
    reducer: ee.Reducer.sum(),
    geometry: geometry,
    scale: 30,
  });

  return image.set(stats);};
       var collection = landsat8.map(waterfunction);
      print(collection);

    var chart = ui.Chart.image.series({
      imageCollection: collection.select('waterArea'),
      region: geometry,
      reducer: ee.Reducer.sum(),
      scale: 30,
    });

 var ndwiViz = {min: 0, max: 0.3, bands: ['B4', 'B3', 'B2']};

Map.addLayer(collection.median().clip(geometry),ndwiViz,"jj");
print(chart);


texts: An internal QGIS plugin repository shows available plugin (3.1) version predating the installed version (3.2)

texts: The metadata file is updated and the ui and resource files were compiled.  The .xml file is also updated.  Where else does QGIS store the plugin version?  The plugin works just fine but the 'installed version' = 3.2 and the 'Available version' = 3.1.


texts: Summary Widget and Incident Analysis Widget not working after ArcGIS online June 2016 update

texts:
Has anyone noticed changes to arcgis online widgets with the latest June update?

I am using the Summary Widget and the Incident Analysis Widget (along with other widgets) within an app but these two are no longer fully working with my data since the update.  I have removed my layers then brought them back in and chosen widget settings according to the layers.

I am using the Summary Widget with a filter field selected.  A summary of the whole layer is working but the filter is not working.

I am using the Incident Analysis Widget, this has stopped altogether picking up my data.

I have looked for documentation on these widgets but I have not found anything new.

Any suggestions as to why these tools that previously worked are no longer working or what I might need to do differently?


texts: Split string after first word using ArcMap 10

texts:
I want to split a string field after the first word using the space as a delimiter so that:

"WA ROSSOUW ORANJE BELEGGINGS" becomes "ROSSOUW ORANJE BELEGGINGS".

I am using ArcMap 10.


texts: Geoserver: No Spring WebApplicationInitializer types detected on classpath

texts:
Introduction:

We created a GeoServer instance within the Microsoft Azure Cloud on a scalable virtual machine set with an external storage disk mounted to a Linux (Ubuntu 16.04) file system.

System specification:

Ubuntu 16.04 (xenial)
Geoserver 2.12.0
Tomcat 8.04 with 4GB Memory
7GB memory for the system

On this storage we moved the GeoServer data directory to another location, in order to have it available for each of the virtual machines. Right now we have about 120000 layers and each day ~4000 new layers will be create.
We stored raster layers on the storage and all the vector files stored in a PostgreSQL database which is running on a virtual machine.

Problem:

In case we need to restart the virtual machine or the tomcat web server on which GeoServer is deployed, the web server and GeoServer are not available anymore and we receive a time out.

Question:

Is this error due to the huge amount of data, i.e. because GeoServer needs to initialize all the layers?

Or could it be because there is an error in the configuration?

Or simply because of a wrong layer?

Error Message:

In all the log files we can not find any error message except this one:

  "No Spring WebApplicationInitializer types detected on classpath"

Log file entries or any other system specs can be provided if necessary.


texts: Making a rectangular vector shapefile that is a perfect square in QGIS

texts:
I'm having trouble making a square vector shapefile, using "Make Rectangle from Extent" (or anything really).
I've googled for hours, regrettably the older plugins aren't compatible and of course I tried using SHIFT and mouse, but nothing.


texts: Error using GDAL to Export Raster to GeoTIFF

texts:
I am correcting and cropping GeoTIFF DEM data using GDAL 2.4.0 to obtain the image raster. After doing my manipulations, I have the raster I want (checked by plotting with plt.imshow()), but while exporting/saving to a GeoTIFF the last hundred or so rows are cut off. Here is the exporting section of my script, let me know if you have any ideas as to why this is happening.

# Export and Save
print("Exporting file...")
crop_tiff = driver.Create(filename, ds_array.shape[1], ds_array.shape[0], 1, gdal.GDT_Float32) #Create new GeoTiff
crop_tiff.GetRasterBand(1).WriteArray(ds_array) #Write data
crop_tiff.GetRasterBand(1).SetNoDataValue((noData))
crop_tiff.SetGeoTransform(new_gt)
crop_tiff.SetProjection(proj)
crop_tiff.FlushCache() #Flush and save.
print("Saving complete.")

My (correct) raster:

The exported geoTIFF with error:


texts: How to transform GPX-tracks into elevation-tracks with any GIS?

texts:
I have a GPS track in GPX format available from a recent bike tour and I need and want to do some analysis on the tracks. I'm wondering whether there is any way to transform the GPX data into an elevation model/graph like this (blue):

I created this image above using the german platform komoot.de where you can upload your GPX tracks but it's not customizable or in any way editable/scalable/exportable.

Are there any tools to achieve this? (The pink speed graph is optional.)


texts:
How can I use wildcards (*) in the ArcGIS Query Builder? It cannot refine my work in Select By Attribute function.

'AA03-FE-P006R'
'AA03-FE-P007R'
'AA03-FE-P006L'
Right (Asset_Code,1) = 'L'

This returns the following error:

There was a problem selecting
An invalid SQL statement was used.

Is there a way to tackle this problem?


texts: Remove parts of layer using another image layer

texts:
I need to obtain the flood water extent during a flood. I carried out a supervised classification and obtained the flood water extend, but I need to remove the part where water is everyday present (lakes, rivers etc...).
I have already an image layer with rivers etc. (taken using updateMask on a landcover image). So I need a command tool that removes from the classification output layer the part of "everyday water".


texts: Extracting points from polygonz geometry in PostGIS using Python

texts:
I have a 1282 buildings as 14684 polygonz surfaces in Postgis. I want to create grid on these surfaces. So, for this purpose I need to extract vertex points for every polygonz geometry in database. To access database I am using pyscopg2 adapter of postgresql.

How can I extract vertex coordinates from polygons? Because I will use these points to create new ones on these surfaces


texts: Deleting or replacing existing table in ArcPy gives ERROR 000601?

texts:
I'm doing an interface with ArcGIS 10.2 ando Python 2.7 scripts.
I can create new tables with arcpy, but when I run a second time, to replace created tables I need to delete the existing tables to create news with the same name. So I was using a code that gives me error, because I think that delete function doesn't delete the table, as I thought. I thought that problem could be because os memory cache, so I used a function to clear it, but it doesn't work..

My Python code:

tab_cg_r="F:\ArcGIS\Trab\Model\Result_otim\C_R_otim.dbf"
arcpy.env.workspace = "F:\ArcGIS\Trab\Model\Result_otim"
arcpy.ClearWorkspaceCache_management()

if arcpy.Exists("C_R_otim_view"):
    arcpy.Delete_management("F:\ArcGIS\Trab\Model\Result_otim\C_R_otim.dbf")
    #arcpy.DeleteFeatures_management("F:\ArcGIS\Trab\Model\Result_otim\C_R_otim.dbf\C_R_otim_view")

arcpy.env.workspace = "F:\ArcGIS\Trab\Model\Result_otim"
arcpy.ClearWorkspaceCache_management()

arcpy.CreateTable_management('F:\ArcGIS\Trab\Model\Result_otim', "C_R_otim.dbf")

# Process: Add Field
arcpy.AddField_management(tab_cg_r, "Barr", "Text", "", "", "50", "", "NON_NULLABLE", "NON_REQUIRED", "")
arcpy.AddField_management(tab_cg_r, "Pt_M", "Float", "", "", 10, "", "NULLABLE", "NON_REQUIRED", "")
arcpy.AddField_management(tab_cg_r, "Longitude", "Float", "", "", 10, "", "NON_NULLABLE", "NON_REQUIRED", "")
arcpy.AddField_management(tab_cg_r, "Latitude", "Float", "", "", 10, "", "NON_NULLABLE", "NON_REQUIRED", "")
arcpy.DeleteField_management(tab_cg_r, 'Field1')
##
rows_t_cR = arcpy.InsertCursor("F:\ArcGIS\Trab\Model\Result_otim\C_R_ot.dbf")
for x in range(0, (len(N_name_LR))):
    row = rows_t_cR.newRow()
    rows_t_cR.insertRow(row)

arcpy.MakeTableView_management("F:\ArcGIS\Trab\Model\Result_otim\C_R_otim.dbf", "C_R_otim_view")

Error:

ERROR 000601: Cannot delete F:\\ArcGIS\Trab\Model\Result_otim\C_R_otim.dbf.  May be locked by another application. Failed to execute (Delete).

How can I do this?


texts: How to split every arc in a shapefile exactly in half?

texts:
I have a line shapefile containing several thousand arcs of varying length, representing a road system.  I need to split each arc exactly in half along it's length.  The resulting output would thus have two arcs of equal length for every input arc.  I have ArcGIS 10.4 and the OSGEO4W64 suite available.

The Arc Split command in the editor menu only works with one arc at a time, which would be too time consuming.  The Grass tools v.split.vert and v.split.length do not split each arc in half.


texts: Error adding layer to control on web map using Leaflet

texts:
I want to add GeoJSON data to my map, but get an error:

  Uncaught TypeError: Cannot read property 'setZIndex' of undefined

$.ajax({
  url:'load.php',
  type:'POST',
  data:{state:"",lga:"",raw:""},
  success:function(response){
    if(queryLayer){
      map.removeLayer(queryLayer);
    }

    queryLayer = L.geoJSON(JSON.parse(response), {
      pointToLayer: function(feature, latlng){
        var str = "
" + feature.properties.raw_name + "
";
        str += "
 State:" + feature.properties.state + " LGA: " + feature.properties.lga + "
";

        if(feature.properties.raw_marker !== null &&
          feature.properties.raw_marker  !== undefined &&
          feature.properties.raw_marker  !== ""){
            var customIcon = L.icon({iconUrl: "../"+feature.properties.raw_marker,iconSize:  [28, 38], popupAnchor:  [-3, -15]});
            return L.marker(latlng, {icon: customIcon})
                    .bindPopup(str)
                    .on("mouseover",function(){this.openPopup();})
                    .on("mouseout",function(){this.closePopup();})
                    .on('click', function(){searchData(feature);});
        } else {
            return L.marker(latlng)
                    .bindPopup(str)
                    .on("mouseover",function(){this.openPopup();})
                    .on("mouseout",function(){this.closePopup();})
                    .on('click', function(){searchData(feature);});
        }
      }
    }).addTo(map);
      //map.fitBounds(queryLayer.getBounds());
  }
});

overlayMaps = {
  "Industies ": layerIndustries,
  "Raw Materials": queryLayer
};


texts:
Looking for info on how to add web mapping services from the Ohio Department of Natural Resources website to QGIS.  I've tried nearly a dozen different things online and still can't get results.  Don't normally ask for help in places like this, but decided to attempt this route for fear that it was impossible (permissions issues, etc.). Link to data I want to add is posted below:

https://gis.ohiodnr.gov/arcgis/rest/services/OIT_Services/odnr_landbase/MapServer


texts: Creating Digital Elevation Model (DEM) from Google Earth Image?

texts: I am very new to GIS and given the task to create DEM's of agricultural area. I have studied the advantages of DEM in agriculture now i just want to know how i should start to develop the DEM's ? How i can create the Digital Elevation Model (DEM) from Google Earth Images ??


texts: Most efficient way of having a team work on the same project based in Google Earth Engine?

texts:
I have a team that want to work with and edit the same group of scripts in GEE. What's the best way of working collaboratively on a project? I know you can share links to scripts, but is there a way to just have all people working on a single account in unison?
I came across this:
https://developers.google.com/earth-engine/guides/service_account
Is this what I'm looking for?


texts: Closing Visual Basic Dialog From Mapbasic?

texts:
How to close visual basic application from mapinfo using mapbasic?
The visual basic application was ran using -  Run Program


texts: Can Openlayers style vector polygons with every vertex of the polygon represented as a small circle or dot?


texts: reusing cached tiles with leaflet, mbtiles and mbtiles-php

texts:
I am using Leaflet and infostream's fork of mbtiles-php to serve MBTiles stored on my server.  I'm using a Leaflet layer group (and a layer control) to serve two MBTiles files.  When I toggle between the two layers using the layer control at the same zoom level, my local cache is rebuilt rather than reusing the existing tiles.

In the Leaflet layer group example, toggling between the two layers reuses the locally cached tiles, although I assume that the example tileset is not in MBTiles format.  In the examples that I've seen through MapBox (using MBTiles but with the ModestMaps library), the locally cached tiles are also being reused.

My information on reuse of caching come from clearing the cache (using Chrome) and then examining the developer tools network tab to see the tiles being built (or not built).

Am I missing some customization of mbtiles-php that would allow reuse of tiles?  I've seen reference to mbutils, but I'd prefer to keep the tiles in MBTiles format.


texts: Unable to run freshly updated QGIS 3.14 on Ubuntu 18.04 using libprotobuf-lite version greater than 10

texts:
Context
(see bottom EDIT for the fix, thanks to ThomasG77)
After having run my daily updates using; apt update && apt upgrade, on Ubuntu 18.04 I've seen that QGIS 3.14 was newly shipped and installed. That's cool!
But now, I'm not able to open it according to this error:
$ qgis
/usr/bin/qgis.bin: error while loading shared libraries:
libprotobuf-lite.so.10: cannot open shared object file:
No such file or directory

But I actually have more recent protobuf-lite libraries:
$ find /usr -iname "*libprotobuf-lite*"
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.15.0.1
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.15
/usr/share/doc/libprotobuf-lite10
/usr/local/lib/libprotobuf-lite.so
/usr/local/lib/libprotobuf-lite.so.18
/usr/local/lib/libprotobuf-lite.a
/usr/local/lib/libprotobuf-lite.so.18.0.0
/usr/local/lib/libprotobuf-lite.la

This is my apt source file for QGIS:
$ cat /etc/apt/sources.list.d/qgis.list
deb http://qgis.org/debian bionic main
deb-src http://qgis.org/debian bionic main

And If I try to reinstall it:
$ apt-get install qgis python3-qgis qgis-plugin-grass
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-qgis is already the newest version (1:3.14.0+28bionic).
qgis is already the newest version (1:3.14.0+28bionic).
qgis-plugin-grass is already the newest version (1:3.14.0+28bionic).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y

That's the result:
Setting up qgis-providers (1:3.14.0+28bionic) ...
/usr/lib/qgis/crssync: error while loading shared libraries: libprotobuf-lite.so.10: cannot open shared object file: No such file or directory
dpkg: error processing package qgis-providers (--configure):
 installed qgis-providers package post-installation script subprocess returned error exit status 127
dpkg: dependency problems prevent configuration of qgis:
 qgis depends on qgis-providers (= 1:3.14.0+28bionic); however:
  Package qgis-providers is not configured yet.

dpkg: error processing package qgis (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-qgis:
 python3-qgis depends on qgis-providers (= 1:3.14.0+28bionic); however:
  Package qgis-providers is not configured yet.

dpkg: error processing package python3-qgis (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of qgis-server:
 qgis-server depends on qgis-providers (= 1:3.14.0+28bionic); however:
  Package qgis-providers is not configured yet.
 qgis-server depends on python3-qgis (= 1:3.14.0+28bionic); however:
  Package python3-qgis is not configured yet.

dpkg: error processing package qgis-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                No apport report written because the error message indicates its a followup error from a previous failure.
 No apport report written because MaxReports is reached already
                                                               dpkg: dependency problems prevent configuration of qgis-plugin-grass:
 qgis-plugin-grass depends on qgis (= 1:3.14.0+28bionic); however:
  Package qgis is not configured yet.

dpkg: error processing package qgis-plugin-grass (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 qgis-providers
 qgis
 python3-qgis
 qgis-server
 qgis-plugin-grass
E: Sub-process /usr/bin/dpkg returned an error code (1)

Question
Is this a known issue?
How can I fix it?


texts: Deleting small gaps (slivers) between polygons?

texts:
I try to delete the slivers that appeared when I have merged some polygons.

I have two different cases:

For the CASE 1, no problem I fill the gap with:

CREATE OR REPLACE FUNCTION sliver_killer(geometry,float) RETURNS geometry AS
$$ SELECT ST_BuildArea(ST_Collect(a.geom)) as final_geom
FROM ST_DumpRings($1) AS a
WHERE a.path[1] = 0 OR
(a.path[1] > 0 AND ST_Area(a.geom) > $2)
$$
LANGUAGE 'sql' IMMUTABLE;

UPDATE merged SET geom = sliver_killer(geom,50::float);

A function that fill all the gaps smaller than x square meter.

BUT for the CASE 2, when the small gaps are "open" I can't manage to fill those gaps.

I have try something like: buffer(1) followed by buffer(-1)  but of course I obtain some rounded corners. Did someone have a true solution ?


texts: Selecting a point and auto selecting a polygon in another layer in QGIS 3.14

texts:
I'm using QGIS 3.14 Pi and here's my scenario.  I have a layer of points and each points contain a numerical value code, let's say it's 123.  There may be multiple points with the same code value.  In another layer, I have polygons, each with a unique code.  What I want to do is select (click on) a point and have the polygon in another layer with the matching code value select also.  The points may or may not be inside the polygon.
Many years ago in MapInfo I had an MBX that would do this, so I imagine there's a QGIS plugin that would do the same, I just don't know what to call it.


texts: Thick border in Natural Earth rasters without water?

texts:
I downloaded the Natural Earth Data rasters at 10m resolution. These come with or without water. I prefer to use the version without water for some reasons.

However, in these versions, I find that even small islands turn up as blotches and land-masses which have a strait between them become joined as seen in the images below from their download page:

I suspect that the border of the bodies is being drawn with a thick pen or something.

Is this a bug, or made so for some valid reason?


texts:
I like Leaflet a lot. But I want to ask how to remove white sides in the popup? I manage to turn of padding but it only removed top and bottom, but sides still stand. I will insert a image and it will be easier to understand.

I mark sides with yellow color and I need to delete them and (x) close button should be on image. What am I doing wrong here?
The map is made using basic Leaflet JS tutorials.

My CSS:

#map {
  height: 680px;
}

.custom .leaflet-popup-tip,
.custom .leaflet-popup-content-wrapper {
    background:rgb(255, 255, 255, 0.90);
    color: white;
    padding: 0 0 0 0; /*Deleted top and bottom white sides!*/

}

.card-text {
    font-size: 11px;
    color: black !important;

}
.card-title {
    color: rgb(9, 65, 139) !important;
}
.container{
    width:450px;
}
.imgar{
     padding: 5px 5px 5px 5px;
}
.imgar:hover{
     background:rgb(9, 65, 139, 0.8);
     padding: 5px 5px 5px 5px;
}

My customJavaScript:

/*Custom popup design*/
var customPopup_d = "

PreviousNext

 Kapsētas ieejas vārti

Sākotnējais nosaukums – Rīgas Jaunie kapi. 1925. gadā šajos kapos tika apglabātas dažādas personas, kuras nepiederēja pie nevienas draudzes. Oficiāli kapsētu atklāja 1929. gadā, kad tajā tika apglabāts latviešu dzejnieks Rainis (īstajā vārdā – Jānis Pliekšāns). Pēc tam kapsēta tika pārdēvēta par Raiņa kapiem.

 Aizsaules iela 1a

 1929. gads

";

/*Custom options*/
ar customOptions =
        {
        'maxWidth': '300',
        'className' : 'custom'
        }
/* bind the popup to marker.*/
marker.bindPopup(customPopup_3,customOptions);


texts: How compile/install php-mapscript on Ubuntu 16.04

texts:
I need to upgrade from Ubuntu 14.04 to 16.04 but php5 is not officially supported on Ubuntu 16. I install php5.5 by ondrej repo https://askubuntu.com/a/756186/483814
but when I try to install php5-mapscript on it i get error :

root@ubuntu16:~# apt-get install php5-mapscript
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5-mapscript is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php5-mapscript' has no installation candidate

Therefore i try to compile and install php-mapscript from scratch but i don't find any updated and working manual.

So if somebody done it before or have general knowledge about mapserver compilation or if know how to install it from repositories please help.


texts: how to make an intersection between a shapefile and A WMS layer in QGIS 2.8.1

texts:
I am using QGIS 2.8.1

I think what I want to do is an intersection between a shapefile and A WMS layer, both in vector format.

I have 1 small vector layer that consists of different forest stands, identified by a number.
I want to combine this with WMS-layers, for example this one from https://www.dov.vlaanderen.be/geoserver/dov-pub-bodem/bodemtypes/wms? , that contains information about soil types.

What I want is a table that contains for each forest stand the corresponding information from the WMS layers, for example the soil type.
It is possible that 1 forest stand contains 2 soil types, then I have to know the proportion of the area of each soil type compared to the size of the forest stand.
It would be even better if the result was a new shapefile, similar as my original shapefile, that contains the information about the soil type and that showed where a forest stand consists of different soil types. (from this I can directly make the table I mentioned above)

This is different from a "spatial query" because I am not looking for a specific soil type.


texts: QGIS count objects, merge polygon standing close together

texts:
I have to count objects. At first I binarized the grid and separated the object of interest.
Now I have the problem, that some objects consist of several polygon fragments. These fragments must be merged without enlarging all other polygons. As an example in the figure, the object in the middle consists three small polygons. These must be merged without changing the other polygons. I am looking for a tool to connecting polygons, that are in a defined distance to each other (for example 3 pixels)


texts: Splitting polyline feature in sql server 2012?

texts:
In the below image I have one point(in blue color) and polyline(in black color).

Using the below sql server 2012 comment i got the nearest path(in red color) between polyline(black) and the point(blue).

DECLARE @pnt geometry, @line geometry;
set @pnt=(select (geometry::Point(81.878517616233,25.443095946868,4326)))
set @line=(SELECT geom from Routes a where ((geometry::Point(81.878517616233,25.443095946868,4326)).STDistance((geometry::Point(a.x1, a.y1,4326)))*111.325) < 2.00 order by (geometry::Point(81.878517616233,25.443095946868,4326)).STDistance((geometry::Point(a.x1, a.y1,4326))) OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY)
print '@pnt== '+cast (@pnt as varchar(max))
print '@line== '+cast (@line as varchar(max))
select 0 AS id, '' AS name,@pnt.ShortestLineTo(@line)--.STBuffer(1)
AS geog
union all
select 0 AS id, '' AS name,
@pnt.ShortestLineTo(@line).STIntersection(@line)--.STBuffer(15)
 AS geog

**@pnt and @line will be in below format**

@pnt== POINT (81.878517616233 25.443095946868)
@line== LINESTRING (81.879984 25.443716000000109, 81.879499000000123 25.443758, 81.879224000000136 25.443786, 81.878727 25.443791, 81.878339 25.443813, 81.878115 25.443826000000115, 81.877997 25.443838, 81.87786 25.443848, 81.877609 25.44387300000011, 81.877387 25.443895, 81.877159 25.443925, 81.876638 25.443987000000106, 81.876532 25.444003)

Can anyone guide me to solve the below queries

how to get the latitude and longitude of the intersected red line and black line?
how we can split the black line with a latitude and longitude?
how we can remove the short length polyline from the result?


texts: SAGA-GIS 2.3.1 Segmentation Fault on launch

texts:
I recently installed QGIS, GRASS, and SAGA-GIS-LTR onto a Manjaro (Arch Linux-based) system in order to make use of their newer libraries. While most of the software is working fine I did need to perform a workaround for GRASS to make use of the newest libraries such as GDAL (e.g. creating a symlink pointing to the newest version ln -s libgdal.so.13 libgdal.so.12).

Using the Arch User Repository, I installed SAGA-GIS-LTR and it seems to be recogized/callable from QGIS 3.0.2. Unfortunately, none of the algorithms have been working. SAGA will run the processes, signify that there's an output file and then crash without a stacktrace in the QGIS processing window.

I checked into it further and found that in my terminal the saga_cmd tools have a segfault and core dump on launch. The gdb (gnu debugger) stack trace is as follows:

   #####   ##   #####    ##
  ###     ###  ##       ###
   ###   # ## ##  #### # ##
    ### ##### ##    # #####
 ##### #   ##  ##### #   ##
____________________________

SAGA Version: 2.3.1

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6c491e6 in __strlen_sse2 () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff6c491e6 in __strlen_sse2 () at /usr/lib/libc.so.6
#1  0x00007ffff6c619c4 in __mbsrtowcs_l () at /usr/lib/libc.so.6
#2  0x00007ffff7687b6f in wxMB2WC(wchar_t*, char const*, unsigned long) ()
at /usr/lib/libwx_baseu-3.0.so.0
#3  0x00007ffff7633b25 in wxMBConv::ToWChar(wchar_t*, unsigned long, char const*, unsigned long) const () at /usr/lib/libwx_baseu-3.0.so.0
#4  0x00007ffff76344b0 in wxMBConv::cMB2WC(char const*, unsigned long,unsigned long*) const () at /usr/lib/libwx_baseu-3.0.so.0
#5  0x00007ffff764402e in wxString::ConvertStr(char const*, unsigned long, wxMBConv const&) () at /usr/lib/libwx_baseu-3.0.so.0
#6  0x0000555555560b0d in wxString::ImplStr(char const*, wxMBConv const&) ()
#7  0x0000555555560c43 in wxString::wxString(char const*) ()
#8  0x00007ffff7a493cb in CSG_String::CSG_String(char const*) ()
at /usr/lib/libsaga_api-2.3.1.so
#9  0x00007fffe64b3cf4 in CPROJ4_Base::_Init_Projection(CSG_Parameters&) ()
at /usr/lib/saga/libpj_proj4.so
#10 0x00007fffe64ae9a5 in CPROJ4_Base::CPROJ4_Base(int, bool) ()
at /usr/lib/saga/libpj_proj4.so
#11 0x00007fffe64be02a in CPROJ4_Shapes::CPROJ4_Shapes(int, bool) ()
at /usr/lib/saga/libpj_proj4.so
#12 0x00007fffe647ce3b in Create_Module(int) () at /usr/lib/saga/libpj_proj4.so
#13 0x00007fffe647d27b in MLB_Initialize () at /usr/lib/saga/libpj_proj4.so
#14 0x00007ffff7ad7cc6 in CSG_Module_Library::CSG_Module_Library(CSG_String const&) () at /usr/lib/libsaga_api-2.3.1.so
#15 0x00007ffff7ad9e66 in CSG_Module_Library_Manager::Add_Library(wchar_t const*) () at /usr/lib/libsaga_api-2.3.1.so
#16 0x00007ffff7ada341 in CSG_Module_Library_Manager::Add_Directory(wchar_t const*, bool) () at /usr/lib/libsaga_api-2.3.1.so
#17 0x0000555555562e3a in  ()
#18 0x0000555555562f17 in  ()
#19 0x0000555555561e3c in  ()
#20 0x0000555555561cd3 in  ()
#21 0x00007ffff6bd506b in __libc_start_main () at /usr/lib/libc.so.6
#22 0x000055555555b17a in  ()

I'm wodnering where the issue is. Was SAGA-GIS-LTR not compiled properly? Am I missing specific libraries? Is this the result of a known bug?


texts: QGIS raster tool closing on parameter input

texts:
I'm trying to run the Merge tool on some rasters using Qgis 3.8 and when I add the layers as inputs, the tool just automatically closes... everytime, no matter which parameters I'm checking or unchecking.  It doesn't show an error, it doesn't try to run the tool, the window just vanishes.  It doesn't matter if I load from the layers in the layers panel or add them from files.  As soon as I hit ok to add the input layers, the window is just gone.

Has anyone run into this behavior before and know a fix?


texts: OpenLayers Problem | Unable to zoom Layer

texts:
I am trying basic examples of OpenLayers with my own Geoserver. When I tried to replace WMS with own local WMS path, I am unable to zoom layer after a specific scale.

var map;

function init(){
    map = new OpenLayers.Map('map_element', {});
            var wms = new OpenLayers.Layer.WMS(

        'OpenLayers WMS',
        'http:/localhost:7000/geoserver/test/wms',
        {layers: 'test:builtup'},
        {}
    );

    map.addLayer(wms);
    if(!map.getCenter()){
        map.zoomToMaxExtent();
    }
}

Please help me with possible error.


texts:
I have an OpenLayers 3 application. When using a box to select features from GeoServer WFS layer (request=GetFeature) I get inaccurate results see image below. The layer is served from a PostGIS DB. However I have the same data in a shapefile served via the same GeoServer and when I change to that layer I get only one feature selected in the same example like the picture below.

Any help here would be good as I am not sure where the problem is it seems to me that the problem is in PostGIS but not sure. Any idea even how to troubleshoot this further would help.

BTW. This happens randomly in many locations this is not the only problem spot. And it seems to happen more on as I zoom in closer.

The query passed to PostGIS looks like this:

WHERE  "the_geom" && ST_GeomFromText('POLYGON (

Picture below shows that the query is not doing an intersection (which is what I expect) but rather an intersect with features' extents. The green BBOX selected those three yellow lines above it.

How do I change/fix this?

How do I get GeoServer to use ST_Intersects function?


texts: Python crashes while using CopyFeatures in ArcPy?

texts:
I'm using Python 2.7.8 and ArcGIS Desktop 10.3.1 to automate some of the ArcGIS workflows with Python scripts. My code started crushing with no error message as follows:

The main issue was that there was no indication on the line, where it crushed or on the reason.


texts: How to do an Overall Minimum Bounding Rectangle from a Python List of MBRs?

texts:
I've converted an ESRI GDB file over to a PostgreSQL DB and went through all the layers now expressed as tables.

I originally looked here but realized that having ~ 49 tables / layers would get hairy:  Getting geometry from multiple tables using PostGIS?

Rather than doing the above,  I stored the bounding box via ST_Extent for each layer into a Python list.

Is there a way to iterate through the list and get an overall bounding box quick and easy?


texts: Lidar Dataset for Toe and Crest Detection

texts: I have read a paper on Terrain Toe and Crest Feature Detection and Labelling forAutonomous Mining and started working on building the code for this. But I am unable to find the dataset used in the paper.


texts: Exporting photos from Survey123 GDB file with custom filenames?

texts:
I have a Survey123 Survey that I've been using to collect data with multiple pictures on each datapoint.

Each datapoint has a barcode to correspond with a physical sample taken from each point. I would like to export the photos out of the survey data, which I have done by creating a script in ArcMap, using the code below from this article:

import arcpy
from arcpy import da
import os

inTable = arcpy.GetParameterAsText(0)
fileLocation = arcpy.GetParameterAsText(1)

with da.SearchCursor(inTable, ['DATA', 'ATT_NAME', 'ATTACHMENTID']) as cursor:
    for item in cursor:
        attachment = item[0]
        filename = 'ATT' + str(item[1])
        open(fileLocation + os.sep + filename, 'wb').write(attachment.tobytes())
        del item
        del filename
        del attachment

However this does not allow me to rename the file using the barcode that is associated with that datapoint. So when the photos are exported, they are no longer associated with the relevant data.

I would like to tell the SearchCursor function to also take the sample_id field from the data table and add that to the filename. When I add the sample_id to the array inside the SearchCursor function like this:

with da.SearchCursor(inTable, ['DATA', 'ATT_NAME', 'ATTACHMENTID', 'sample_id']) as cursor

I get the following error: RuntimeError: A column was specified that does not exist.

I would like help in calling the sample_id field into the function properly so it can be added to the filename variable.


texts: How to extract the data from a GML file to a shapefile format? or select only few features from a large GML file?

texts:
I have a very big GML file on buildings in Denmark. (I could only download a 'whole country' in one file, so it is big as 17GB, no.of features over 1million). I only need a very few of them in a small local area (40km2 and 20k features). How can I extract this? I am not familiar with GML format. (I tried to do this with select feature> save selected features> to a shapefile (I deselect lots of attribute columns, and kept only 3). But it is keep running for hours, almost 12). How can I make this done? Is there any other way?
QGIS 3.14


texts: Accessing GPS from QGIS 2.14.1/Python 2.7 /Windows10

texts:
I would like to access the device described at QGIS live GPS tracking /recommended hardware (GPS USB stick) via QGIS/Python.

A gps module does't seem to be part of the standard installation of python 2.7 coming with QGIS 2.14.1 installed via OSGeo4W installer (allthough i read somewhere that gps module ist part of the standard Python installation).

Platform: Windows10

>>> import gps
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named gps

However, trying to install some related modules (gps, gps3, gpsd, GPSReader) via OSGeo4W shell gives me errors like

C:\Users\Jochen\Downloads>pip install gps3
Collecting gps3
C:\OSGeo4W64\apps\Python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
C:\OSGeo4W64\apps\Python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Could not find a version that satisfies the requirement gps3 (from versions: )
No matching distribution found for gps3

But

C:\Users\Jochen\Downloads>pip search gps3
C:\OSGeo4W64\apps\Python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
C:\OSGeo4W64\apps\Python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
gps3 (0.1a)  - Python2.7- Python3.4 gpsd interface

lists the gps3 module for example.

I simply need lat/lon from gps, which modules to install and how? Or any other hints of how to achieve this?

Some things I found in this context:

https://trac.osgeo.org/osgeo4w/wiki/ExternalPythonPackages

How to install 3rd party python libraries for QGIS on Windows?

https://gist.github.com/wolfg1969/4653340


texts: Label data clusters by nearest metropolitan area?

texts:
When using ArcGIS Optimized Hotspot Analysis, I get two outputs. A raster like the image below, and the point incident data categorized by the various confidence thresholds for hot/cold spots.

Let's say the lower left red hotspot represents Denver, Colorado. How can I have ArcGIS automatically label these points of interest without manually reviewing each city on the map across the country?

Using the point data, would I utilize boundary areas for major cities of interest to label points based on which region they are in?

I could also use a proximity analysis if the metropolitan areas are expressed as points.

Using the raster data, how would I identify concentrated areas?

Is there a method to convert the raster to clusters and then repeat the process above?


texts: Text box with automated coordinate reference system in use on Qgis

texts: Using an expression, is it possible to automatically fill a text box placed on the map (in the composer) showing the reference coordinate system of the project? If possible, how would that expression be like?


texts: A lot of Island nations, like Japan and Indonesia, have many islands within the same country.  Other islands, like Borneo are part of multiple countries. I am looking for a shapefile that gives the island name, preferably in WGS84. I am only interested in islands in SE Asia and nearby Pacific Islands.


texts: How to define an indicator variable for pixels within certain distance of borders?

texts:
I have a polygon shapefile including 7000 polygons of different shapes that cover the whole world. I also have small pixels that cover the whole world.
Now, for every border between every pair of polygons, I need to define a variable indicating the pixels that are within 100km of the border. How would you do this using ArcMap?


texts:
I want my CSV file load on the map, and catch my current location at the same time.
Now, I can't load CSV successfully.

This is my code:

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="shortcut icon" type="image/x-icon" href="docs/images/favicon.ico" />

<link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css"
      integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
      crossorigin="" />

This is my CSV file (one of part):

SiteName,SiteEngName,County,TownShip,SiteAddress,Lon,Lat,PublishAgency
蘭嶼,Lanyu,臺東縣,蘭嶼鄉,台東縣蘭嶼鄉紅頭村2號,121.558342,22.036933,交通部中央氣象局
橋頭,Qiaotou,高雄市,橋頭區,高雄市橋頭區隆豐北路1號,120.305689,22.757506,行政院環境保護署
鞍部,Anbu,臺北市,北投區,台北市陽明山竹子湖路111號,121.529669,25.182628,交通部中央氣象局


texts: Editing property portalHostname in ArcGIS Portal?

texts:
I've inherited an ArcGIS Portal site which was set up some time ago and in which people can successfully create maps and apps and link to them but there's a problem with using the save as option when trying to make a copy of an existing map.  The saved copy is given an invalid URL which means it then can't be opened.  It looks like this is probably a problem with the original configuration of the Portal.  If I go to the ArcGIS Portal Directory page at ...myportal.../sharing/portals/self I can see that there is a property called portalHostname which looks like it has a typo in it which is what I'm seeing in the generated URLs.  It shows up formatted like this: /\foo.com\bar\home.  This should really be foo.com/bar as I can see it in a separate installation that works fine.

Does anybody know how this property can be changed?

I'm not seeing any way to update it even when logged in as an administrator.


texts: How do I use the Natural Earth SQLite DB with QGIS?

texts:
I just downloaded the Natural Earth data in SQLite format from http://www.naturalearthdata.com/downloads/. I had assumed that this would be a SpatiaLite database, but it appears not to be! QGIS is failing to recognize it as a spatial database. OGR supposedly supports reading geometries even when stored in a plain SQLite database, but maybe QGIS doesn't use OGR for SpatiaLite?

The SQLite database does have geometry_columns and spatial_ref_sys tables. Is there some way to convert it to a full SpatiaLite database?


texts:
I am curious as to what GIS server software is out there. I have used a few different ones and am building a list of them. If you know of any others please mention it below because I would like to check it them out. I have listed the software that I am already aware of below.

GIS Server Software:
Name || Source || License
MapServer || Open || MIT-style license
GeoServer || Open || GNU GENERAL PUBLIC LICENSE
TileStache || Open || BSD License
TileCache || Open || BSD license
Mapnik || Open || LGPL (Lesser General Public Licence)
ArcGIS for Server || Closed || ESRI
A Custom Server Built on GeoTools || Open || LGPL
MapZoom || Open || ???
GLG Map Server || Closed || ???
Deegree || Open || LGPL
Geomajas || Open || AGPL
Mapguide Open Source || Open ||LGPL
GeoMedia Map Publisher || Closed || Intergraph
MapViewer || Closed || Oracle
Mapbender || Open || GNU GPL and Simplified BSD license
Hopefully that list helps others who are also looking for options. Also if I have mistakenly added one please let me know. I haven't tried most of packages on the list so if you have used any of them please let me know if you would recommend it and how your experience with the software was.

Question 1: Do you know of any other GIS Map Service Software?

Question 2: How was your experience with a GIS Map Service Software package?


texts:
I have one big layer which contains many polygons. This layer is a shapefile and I want to convert it to be many layers, each layer containing one polygon, and those polygon layers should be saved as KML. I have tried to use the tool ''Convert Format'' as I was advised by other people but I can't understand how to make it into KML and all I get is a new layer called ''converted'' and I can't find the difference.

What did I miss?

The end goal is to have many KML filles in the end, one KML layer per polygon


texts: Removing layers and schema locks with ArcPy?

texts:
I am creating a code that adds fields to a large set of shapefiles. I want to be able to open these shapefiles and edit the fields and then have them removed from the map document. I would like this because the amount of shapefiles that appear on the map document while the code is running is too large and ArcMap crashes.

Here is my code below:

for fc in arcpy.ListFeatureClasses():

    arcpy.AddField_management(fc, "C_TYPE", "TEXT") #add new field to each shapefile

    arcpy.AddField_management(fc, "C_UNIT", "TEXT") #add new field to each shapefile

    arcpy.AddField_management(fc, "INTERVAL", "LONG") #add new field to each shapefile

Below is what I want to remove:

Too many contours get accumulated in the document.

Is there any way I can add a piece of code that can remove this?


texts: What kind of coordinate system has values like 555,19 - 251,48?

texts:
I am trying to identify a coordinate system used to give positions to caves in France.

The Emergence du Ressel is at 555,19 - 251,48 (decimal coordinates 44.56194, 1.77167) and Source de Landenouse is at 562,54 - 243,17 (decimal coordinates 44.48763, 1.8657).

I am unable to identify the (xxx,yy - xxx,yy) coordinate system.  How do I convert from that?


texts: What is mapinfo precision on coordinates

texts:
I have some roads on Mapinfo and looks OK, all nodes seem connected at 0.01 m Zoom.

If you try to export it to mid/mif you can see the same coordinates (-63.869036 11.039044)on all 3 lines.

Line -63.869036 11.039044 -63.868923 11.038725
    Pen (1,2,5263440)
Pline 3
-63.869593 11.040682
-63.869389 11.040049
-63.869036 11.039044
    Pen (1,2,16711680)
Line -63.869036 11.039044 -63.868698 11.03901
    Pen (1,2,16711680)

But in QGis you can see there is a difference and the nodes aren't exactly the same

The maps are save using oracle spatial. But my guess the problem radicate on MapInfo use some kind of grid of 10x10 cm and snap the nodes there. But still save it with more than 6 decimals in db. And QGis can understand more than the 6 decimals MapInfo use.

So how can I solve this so my MapInfo maps doesnt look broken on QGis.


texts: How to get the altitude of the vector shapes from DTM raster layer?

texts:
I have a vector layer containing thousands of vector shapes/polygons and a raster layer with DTM. Every shape has its own OBJECTID in attribute table. I would like to get the altitude of every shape, weighted mean of the altitude would be the best. I suppose there should be used a script or something similar to count weighted mean of altitude of all pixels inside the polygon. I use Qgis 1.7.3.

Thanks in advance.


texts: Animating two layers with differenet time span locks

texts: In ArcGIS Pro 2.4, I am trying to animate two identical layers but make the time span lock independent of each other. The underlying layer is cumulative and grows with each passing day, while the overlying layer displays just the new features for that day. I cannot figure out how to make their timespan locks different from each other. I;d like one (overlying) to be 24 hours, and the underlying layer to be open ended so that the beginning never changes. I can only change the timespan globally.


texts: Identifying /vectorizing / classifying cliff bands ArcMap

texts:
I am working in ArcMap 10.5. I'm trying to identify cliffbands throughout my county, and to assess their approximate height. I've found a source of 1 meter resolution LIDAR data, which I have converted to slope. Many of the cliff bands I've found look like this where the cliff's width spans multiple pixels:

I'm trying to find some way to automate a process where a vector is drawn which follows these cliff bands, then determines the elevation change one or a couple meters to either size, so I can then classify them by cliff height.

I'm still pretty new to GIS so I don't know if this is doable or not.


texts: Standard Terminology for User's and Producer's Accuracy

texts:
In the literature I see terms such as,

User's accuracy  Pr( Y = c | X = c);
Producer's accuracy  Pr( X = c | Y = c);

where X is the estimator of a particular land use, Y is the random variable associated with the true unobserved land use, and c is a class in a finite set of classes (the support of X and Y).

Now, where I have a bit of confusion is that the User's accuracy and Producer's accuracy above are exact.  But in a large number of papers's, products, and software these quantities are reported as estimates of the above quantities.

Is there standard GIS terminology to separate the parameters (1. and 2.) from the estimates for the parameters?  Such as Actual User's Accuracy?, should the estimates of (1. and 2.) be called the estimated User's and Producer's accuracy respectfully? or is there some other terminology I have missed?


texts: Remove Layers only if layers already exist using PyQGIS

texts:
I have written a code that imports the different Layers from a folder to QGIS. The problem is that when I run the code again, the layers are duplicated and so on.
If I try to remove the layer at the beginning of the code with:
QgsProject.instance().removeMapLayers([layername.id()])

The first time I run the code, I wont work since the layers do not exist yet.
To check with layers are in the project, I used this command:
for layer in QgsProject.instance().mapLayers().values():
    print(layer.name())

With this I become a list with the following existing layers:
ne_50m_coastline
ne_50m_graticules_30
ne_50m_ocean
ne_50m_rivers_lake_centerlines

Is there a way to remove the layers only if they already exist in the project?


texts: Asking user to input signed integer for UTM zone: bad idea?

texts:
I need to ask my user some informations about the data he provided to my software, or the format in which he wants to export.
In particular I could have to ask which UTM zone (1 to 60, north or south) to use.
I am thinking of taking positive integers to be north zones, negative to be south zones.
Examples:

1 means UTM zone 1, north
-1 means UTM zone 1, south

Is this a bad idea ? If not, does the meaning of the sign seems logic to you or should I swap it ? Do you know of any existing software that does use a signed integer to represent a UTM zone ?
The only alternative I am thinking of is to have two fields: one positive integer and one boolean (such as "isNorth").


texts: Making polygons from interpolated points in QGIS

texts: I need to know the extension of the area of a lagoon according to depth classes. I started from a point shapefile containing depth values and used the interpolation plugin and I obtained a raster file. I used the contour function, but I can't convert lines to polygons. I tried the polygonize tool on the raster file, but this function only makes intervals between the polygon of 1,0, whereas I need intervals of 0,5 m.


texts: Why did Esri create .zlas compressed LiDAR files instead of adopting .laz?

texts:
I am talking about the Esri Optimized LAS file format for compressed LiDAR files (.zlas).

While the uncompressed format (.las) from ASPRS was adopted by practically  the entire Remote Sensing and GIS industries (including Esri) and made interoperability among software/platforms an enormous advantage for LiDAR data users, it seems it did not go the same way for compressed LiDAR files.

Is there any technical documentation (from Esri or third parties) comparing .zlas and rapidlasso's early format .laz, which shows advantages from .zlas over .laz?

I am trying to understand why Esri created .zlas instead of adopting the early format .laz (open source).


texts: Calculating distance between points only within same polygon in QGIS

texts: I am using QGIS 3.10 and have shapefile that contains multiple polygons (1615 polygons to be precise). In order to calculate the "compactness" of the shape of each polygon I want to calculate the average distance between random points within each polygon. Therefore, I use the research tool "Random Points inside Polygon", which creates points within each of the polygons (e.g. 100 per polygon). However, I can't find a way to easily compute the distance between the points only within the same polygon. If I calculate the distance matrix, this would give me the distance between every random point irrespective if it is inside the same polygon or not (1615 x 100 points). Is there a way to tell QGIS to only compute the distance between points if they share the same value/feature  (e.g. the polygon ID)?


texts: Number of segments in SpatialLinesDataFrame

texts:
After importing a spatial lines dataframe with readOGR, I would like to determine the number of line segments (nodes) in each line.  I cannot find a practical way to simply export the lengths as a vector.

routes@lines will get me to the line slots, but then how does one get the length of each one?

For example, in the sample data below, we see that the first line is composed of 93 segments, the second line composed of 170 segments, the third 91 segments, and so on.

In the end, I'd like a vector of 1657 numbers representing the length of line segments in the SpatialLinesDataFrame

Is there a quick solution?

> class(routes)
[1] "SpatialLinesDataFrame"
attr(,"package")
[1] "sp"
> str(routes)
Formal class 'SpatialLinesDataFrame' [package "sp"] with 4 slots
  ..@ data       :'data.frame': 1657 obs. of  3 variables:
  .. ..$ start_time: Factor w/ 1631 levels "2016/09/09 00:00:02",..: 1 2 3 4 5 6 7 8 9 10 ...
  .. ..$ duration  : int [1:1657] 786 1248 738 786 651 660 616 889 408 475 ...
  .. ..$ difftime  :Class 'difftime'  atomic [1:1657] 2 4 19 67 92 119 170 202 206 213 ...
  .. .. .. ..- attr(*, "units")= chr "secs"
  ..@ lines      :List of 1657
  .. ..$ :Formal class 'Lines' [package "sp"] with 2 slots
  .. .. .. ..@ Lines:List of 1
  .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot
  .. .. .. .. .. .. ..@ coords: num [1:93, 1:2] -79.9 -79.9 -79.9 -79.9 -79.9 ...
  .. .. .. ..@ ID   : chr "0"
  .. ..$ :Formal class 'Lines' [package "sp"] with 2 slots
  .. .. .. ..@ Lines:List of 1
  .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot
  .. .. .. .. .. .. ..@ coords: num [1:170, 1:2] -79.9 -79.9 -79.9 -79.9 -79.9 ...
  .. .. .. ..@ ID   : chr "1"
  .. ..$ :Formal class 'Lines' [package "sp"] with 2 slots
  .. .. .. ..@ Lines:List of 1
  .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot
  .. .. .. .. .. .. ..@ coords: num [1:91, 1:2] -79.9 -79.9 -79.9 -79.9 -79.9 ...
  .. .. .. ..@ ID   : chr "2"


texts:
Is there any way to load a postgresql style for a vector layer using python?
There is a function:
loadNamedStyleFromDb (const QString &db, const QString &theURI, QString &qml).Does it support loading of postgresql styles?


texts: Moving .pdf as a raster freely without referencing in QGIS

texts:
If I import a .pdf as a new raster layer, but the referencing is off.

Is there a tool in QGIS to grab and hold on to the pdf so i can move it freely to my desired location without having to worry about referencing it correctly to my coordinate system?

Similar to grabbing a picture in windows word and dragging it around in the document with the courser.


texts: Deleting Multiple Field from a Feature class in ArcObjects

texts:
I am trying to delete all fields from a feature class except 4 Fields "FID", "Shape", "OBJECTID" and "SUBTYPECD"

With below code:

            IGPUtilities2 gpUtils = new GPUtilitiesClass();
            IFeatureClass featureClass = gpUtils.OpenFeatureClassFromString(@"FCpath\Land.shp");
            IFields2 fields = featureClass.Fields as IFields2;
            IField2 nameField = null;

            for (int fieldIndex = 0; fieldIndex < fields.FieldCount; fieldIndex = fieldIndex + 1)
            {

                nameField = fields.Field[fieldIndex] as IField2;

                if (nameField.Name != "FID" && nameField.Name != "Shape" && nameField.Name != "OBJECTID" && nameField.Name != "SUBTYPECD")
                {

                    featureClass.DeleteField(nameField);

                }

            }

it is working but doing a strange behavior, it only deletes half of total  Field count

for example if there are 50 Fields it will delete only 25.
could not understand why this is skipping fields in deleting.


texts: How to change the QGIS edit cursor and node icons?

texts:
Two things I really dislike at QGIS, are the "fat" node icons (when editing lines) and the cursor which cover the object below and make it impossible to accurately move a node.  Is it possible to change that? Or is it worth to give a feature request a try?

I realy like JOSM in that way (you can see the line oriantation, the middle between two nodes with the possibility to add another with a single click and there are just dots for every node - perfect!):

QGIS line edit:


texts:
Using QGIS 2.18.14, add vector layer, open a shapefile, gives:

Invalid Data Source: FILE.shp is not a valid or recognized data source

This FILE.shp was OK on QGIS 2.12. Same result for other .shp files as well as other vector files like .gpx and .gmt. There was no problems reading those files in QGIS 2.12. Reading raster files is OK.

I'm running this on Linux, Fedora 27, 4.13.16-302.fc27.x86_64

This is not a problem on another Fedora 27.

All has been updated (dnf update).

I have not been able to Google a solution to this problem.

Any ideas how to solve this problem?


texts: QGIS - .OSM Attributes Table not allowing editing

texts:
I was sent an .osm file that has both shape/polygon/point layers in, but when I open up the attributes table to one of the layers

there is no way of selecting the toggle edit mode

as it is greyed out

Is there a way to turn the function back on?


texts:
i need run this code in my nodeJS application:

//Dates of Interest
var start = ee.Date("2014-10-01");
var finish = ee.Date("2018-05-01");

///--------------------- Landsat Collection ---------------------------------------///
var landsat = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA')
.filterDate(start, finish)
.filterBounds(roi);

// Year-Month-Day Extract function
function ymdList(imgcol){
    var iter_func = function(image, newlist){
        var date = ee.Number.parse(image.date().format("YYYYMMdd"));
        newlist = ee.List(newlist);
        return ee.List(newlist.add(date).sort())
    };
    return imgcol.iterate(iter_func, ee.List([]));
}

var ymd = ymdList(landsat);
print(ee.List(ymd).reduce(ee.Reducer.frequencyHistogram()));

But I do not know which function to use in place of "print ()", can anyone help me?


texts: Accurate Transformation of Gauss Kruger to WGS84 and ETRS89 using PROJ.4

texts:
I have to transform Gauss Kruger coordinates to Long/Lat coordinates in WGS84 and ETRS89. I have really no knowledge about all these coordinate systems and their transformations. My background is just software engineering. I just have to do this, because our system only supports Long/Lat coordinates in WGS84 and ETRS89, but a few sub systems deliver only Gauss Kruger coordinates, so I need to transform them. I have to integrate the transformation in a Java application.

I made some research on my own an I tried using the Java library of PROJ.4, but I do not get accurate results.

I used it as follows:

proj +proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs

For example, for

  N: 5705784, E: 2944378

I get

  Long: 12.377177, Lat: 51.314087

But the result should be:

  Long: 12.375598, Lat: 51.312832

Is this difference normal?

How can I get more accurate results?

Other libraries are also fine.


texts:
I am new to QGIS and I'm using QGIS 3.8 on a Windows machine. I'm creating a commuter flow map using a virtual layer similar to the one Anita Graser has created here. When I try to add in a legend all the flow lines in the legend are displayed at exactly the same width and does not represent what is in the map.

How do I resolve the issue?


texts: osmconvert - errors while merging maps in Windows 10 - unknown file format, could not open input file: .osm.pbf

texts:
I've donwloaded the following maps:

andorra-latest.osm.pbf       https://download.geofabrik.de/europe/andorra-latest.osm.pbf
azores-latest.osm.pbf        https://download.geofabrik.de/europe/azores-latest.osm.pbf
cyprus-latest.osm.pbf        https://download.geofabrik.de/europe/cyprus-latest.osm.pbf

And I am using osmconvert to merge maps. I read this answer  to merge maps. So my command of merging the above maps looks like this:

.\osmconvert andorra-latest.osm.pbf --out-o5m | .\osmconvert - azores-latest.osm.pbf | .\osmconvert - cyprus-latest.osm.pbf -o=all.osm.pbf

However, the osmconvert shows the following errors after running the above command:

osmconvert Error: unknown file format: standard input
osmconvert Error: could not open input file: .osm.pbf

However, the merging perfectly works in Windows 7 and Windows Server 2016 Standard

Does anybody know how to solve this error?


texts: How to calculate an expression for a field using PyQgis?

texts:
I would like to create one button to calculate one expression for example the relative frequencies for each field.

How can I do it?

I'm beginner user of PyQGIS.


texts:
I'm looking for historical traffic data on a decently large city.
Specifically I need data points that can be used to infer the distribution of vehicle speeds across each road, but I don't want the data to be pre-processed (i.e., it should be coming in the form of individual samples, instead of pre-fit distributions to the data).
It doesn't really matter where the data is from, any major city should be fine -- I just need the the traffic pattern to be interesting for analysis.

Is there any source from which I can obtain such data for free and without too much difficulty?
(Ideally it wouldn't be too difficult to map the roads to those from OpenStreetMaps.)


texts: Using Python script inside QGIS Graphic Modeler and iterating over all features

texts:
I created a graphic model which simply creates multiple vector attributes. All attributes are empty to be filled manually. Only one attribute column (let's call it KEYS), needs a different process and I'm kind of stuck at that point. I was able to come up with a short Python script that requests random numbers from random.org API. Script works, and I'm able to print out random numbers as a list.

What I couldn't achieve is to get those numbers to be written to KEYS column for every feature. I am aware of the graphical modeler tool called Advanced Python Field Calculator. What would be the way to achieve this?

I previously used

lyr = iface.activeLayer()
fts = lyr.getFeatures()
lyr.startEditing()
for f in fts:
    f['KEYS']='API LIST SHOULD ITERATE HERE'
    lyr.updateFeature(f)
lyr.commitChanges()

For something that did not need to iterate over features (it just writes whatever string in the 'API LIST SHOULD ITERATE HERE' part to KEYS column.

Finally I am pasting the full script I was able to come up with (doesn't work).

import requests
lyr = iface.activeLayer()
fts = lyr.getFeatures()
reqData = {
    "jsonrpc":"2.0",
    "method":"generateStrings",
    "params":{"apiKey":"myapikeygoeshere",
    "n":10,
    "length":20,
    "characters":"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
    "replacement":True
    },
    "id":539
    }

output_file = open
response = requests.post('https://api.random.org/json-rpc/2/invoke', json = reqData)
response.raise_for_status()
json = response.json()
data = json['result']['random']['data']
print(data)
print(sorted(data))

lyr.startEditing()
for f in fts:
    f['KEYS']='API LIST SHOULD ITERATE HERE'
    lyr.updateFeature(f)
lyr.commitChanges()

How do I get that lists content to be written to features in a specific column?


texts: Iterate Workspace not working in ArcGIS Pro ModelBuilder

texts:
I created a model in ArcGIS Pro that will delete features (ex. drainage areas) that intersect with unfeasible landcover classes within a raster (ex. impervious). So I used the following model structure: Reclassify --> Raster to Polygon --> Select By Location (Intersect) --> Delete Features.

This model worked fine when I tested it on one geodatabase's data - but when I try to Iterate Workspace to apply the model to all 73 geodatabases, it cannot figure out where the input feature data is. Each geodatabase has the same data naming conventions within it but with different geodatabase id numbers at the end (ex. M3_drainage_huc_#). So the input features I use for Select by Location look like this ex: %Path%Name%M3_drainage_huc_%HUCNumber%

Any ideas as to why this might be happening and/or ways to work around this issue?


texts: How can I rename multiple feature classes (each different name) using Python?

texts: I have a geodatabase including (cnty06,cnty07,cnty08,cnty09...) that I'd like to rename to (c06,c07,c08,c09...). I can use the ModelBuilder (or script from ModelBuilder) to complete this task. Is there a way to use Python to complete the same task?


texts: Adding a data dictionary to Trimble R1 reciever through ArcGIS Online

texts:
I don't even know how to properly google this effectively, so maybe someone can help me on here. My company purchased a Trimble R1 GNSS Receiver. The data is managed through ArcGIS Online. I have a data dictionary that I need to use, but I can't figure out how I am supposed to upload it in ArcGIS Online. I have been creating Feature Layers to collect other data with generic data dictionaries - I use Field Notes Template currently.
Is there a way to upload a data dictionary to ArcGIS Online to use with ArcGIS Collector on my phone?


texts: Adding scripts to Processing toolbox via PyQGIS

texts:
Is there a way for adding new Processing scripts into Processing toolbox using PyQGIS?
In the GUI, I can click on "Add script to toolbox", but I want to add scripts using PyQGIS.

QGIS version: 3.16


texts: Understanding 3D visualization difference between ArcScene and ArcGIS Pro?

texts:
For research on (3D) noise mapping, I calculated the noise levels that reach the facades of buildings. The first picture shows the houses in 3D that I have used to determine the facades for the noise calculations.

With the software program GeoMilieu (a spatial noise calculation program) I calculated on vertical grids with an distance interval of 1 meter on all facades. This resulted in the following output (a shapefile opened in ArcScene):

The small gaps between buildings are caused by the fact that the interval is 1 meter, and only intermediate values could be interpolated, leaving the edges empty of calculated noise data.

However, when I open this exact same shapefile in ArcGIS Pro, I get a totally different visualization:

I have no clue how this difference could happen.

It is not something with the symbology (I tried everything there)
Both shapefiles have the exact same amount of Polygon ZM objects in the attribute tables.
The 'white' missing parts in the ArcGIS Pro visualization cannot be selected or identified, in ArcScene clicking on the exact same part of a building (even though 'visualized') does not result in a selection or identification.
The white parts are always the same parts and are not 'flickering' or changing when panning around in the 3D modus (no rendering issues)


texts:
I am new to GIS. I'm a sailor and 3D printing enthusiast.

What I want is to  print a 3D representation of my sailing area.

I've acquired the raster files for my navigation charts and they consists of .kap and .bsb which is what is required for QGIS.

I have the raster files in KAP and BSB format. However when I open the KAP files in QGIS I see only 6 or 7 layers. When I open a NOAA file in the same format, I see there are over 30 layers.

I also installed the DEMto3D plugin to generate the STL files to send to the printer.

I'm not sure that the data set contains enough details to allow me to do what I what. I end up getting a file with no depth.

Running QGIS 2.18.23 on Mac


texts: What system do these coordinates use? (from LinkedGeoData.org)

texts:
I have extracted these coordinates from geolinkedata And I don't know what system they are using:

(-15.4400797 28.131791000000003)

What I know is that they correspond with these WGS84 Coordinates:

(39.4723047, -6.3734381)

Introduction:

I am trying to use the SPARQL interface of linkedgeodata (2) to match some streets names I know, with instances of streets in their SPARQL Endpoint. To do so, I need to filter all the streets to keep only those that are placed in the surroundings of Cáceres.

If the coordinates of the streets in the SPARQL interface of linkedgeodata (2) were in WGS84 I wouldn't have any problem, because I understand those coordinates and I know how to work with them.

The problem is that I really don't know what system they are using, that's why I searched a street manually:

http://linkedgeodata.org/page/triplify/way230844225

whose first node is:

http://linkedgeodata.org/page/geometry/node337348441

Which has the following coordinates:

(-15.4400797 28.131791000000003)

Then I searched this same street in the OpenStreetMap (which is where the data of linkedgeodata comes from):

https://www.openstreetmap.org/way/32934574#map=18/39.47217/-6.37171&layers=QN

I saw the coordinates in wgs84:

(39.4723047, -6.3734381)

Problem:

This approach I used was possible because I knew this street beforehand, so it is not replicable to all the other street names.

What I need:

I need to know what kind of coordinates are  (-15.4400797 28.131791000000003)  to convert all the other streets' coordinates automatically to WGS84, the format I understand and the one I feel comfortable working with.

NOTE: As my reputation in this web is 1, I can only post 1 link in the whole post, thereby the weird links, sorry for the inconvenience.

(2): http://linkedgeodata.org/sparql


texts: Calling variable filename within Con function in ArcPY?

texts:
I want to replace the even pixel values of a raster from 1 and rest with 0. Since, I have 100+ raster files therefore, I am calling filenames in loop.

I copied the python snippet after applying con operation on a single file that worked fine. However, it fails in the script and shows error as,

NameError: name 'fin' is not defined  Failed to execute (RasterCalculator).

Here, fin is the variable name.

import arcpy

Path = "Path/to/folder/"

for year in range(2010,2016):
    for day in range(1,369,8):

        fin = Path + 'Raster'+ str(year) + "_D" + str(day).zfill(3) + ".tif"
        out = Path + 'Processed_Raster'+ str(year) + "_D" + str(day).zfill(3) + ".tif"
        arcpy.gp.RasterCalculator_sa("""Con(Mod(fin,2) == 0,1,0)""", out)

How to resolve this error?


texts:
This quest is an extention of a question that I made earlier today but since it's migration to GIS I haven't been able to comment on my older post.  My earlier post is : Mapping Kansas City based on X and Y Coordinates in R

I have found a more specific coordinate system known as STFID.  From what I have researched about STFID the larger the number the more specific of a locale the point equals.  Each STFID contains 15 digits, which I believe is sufficient enough to account for each block in Kansas City, MO.

Is there a way that I can map information in R when using this STFID value?


texts: Unable to delete a symbol from symbol collection in annotation feature class?

texts:
I am trying to delete a symbol in the Symbol Collection for an Annotation FeatureClass in ArcCatalog.  From what I can tell, there is always one symbol for an annotation featureclass, which should be (0) Default.

In this instance I want to keep that (0)Default and delete (1)Default_12.  Unfortunately when that symbol is selected, delete is grayed out.  It is not grayed out on (0)Default though.

When viewing the attribute table, every record points to (0)Default in both the AnnotationClassID and SymbolID fields.

Is there some method I can use to delete this?


texts:
Hello I#m quite new to GDAL. I have some Geotiffs that I want reproject.
I tried that with one file and it works great, but because the TIFF has to be slightly rotated for the conversion I have some black areas after that. This is Ok but I have not 1 I have arraound 100 Tiff files and when I built a simple loop with a gdal_warp command for every file I have 100 files with black areas. Is there another command or option where it takes the missing parts from next file ?


texts: How can I extract Moran's I from buffered pixels withins raster

texts:
I have a raster with NDVI and I have a dataframe with coordinates I want to extract stats from at a 125m radius.
extract(NDVI,coordinates,method='simple',buffer=125,fun=mean)

this works for most of my needs, but I also need a Moran's I for each coordinate buffer.
extract(NDVI,coordinates,method='simple',buffer=125,fun=Moran)

I get the following error message, presumably because it needs a raster to work on which the data no longer is:
Error in (function (classes, fdef, mtable):
  unable to find an inherited method for function ‘cellStats’ for signature ‘"numeric"’

Is there a way to do this? I have attempted to recreate a new raster from only the pixels I want using the rasterfromcells function, but found it to be a dead end.


texts: Displaying in-database image on the map with ArcGIS

texts:
I have an SQL database that contains a table with a coordinate, as well as a blob that contains an image associated with that location, as well as other columns expressing the width and height (in mm) of the area represented by the image.
I'm trying to have these images displayed at their location on a map.
I have been able to connect ArcGIS to my database and add the table to the map, so right now, ArcGIS displays a point ("single symbol") at the coordinates it extracted from the table.
But I'd want it to display the image from the blob column instead, like I accomplished easily with QGIS.
In QGIS, it was as simple as:

creating a layer from that database table.
add a "raster image marker" (with "'base64:'||to_base64(attribute('LayoutImage'))" as the expression)
set the "Width" to point to my "Width" column and select "milimeters" as the scale.

Done. All images display properly on the map.
But how to do that with ArcGIS Pro?


texts:
I am using QGIS 3.10.0 A Coruna.
I would like to label a building layer with with its building number. However, sometimes I have 2-3 buildings with the same number, and I would like to override the labeling by typing in a SQL-Command asking it to make sure that every value is only used once, and that the label is positioned in the middle of the buildings.

I cannot sum up the building into a multipart, because they have, apart from the building number, different attributes I need to keep.
Also, I thought about adding a column, where I use the value just once. The problem is that there are often changes within the project, and with an SQL-Command changes could be done automatically.

Is there a IF CASE WHEN THEN that can solve this problem?


texts: Migrating script from tool to geoprocessing service?

texts:
I have a script I've written and converted to a tool in ArcMap 10.4.1.  The script goes out to a web service, pulls in content, and then loads results into a point feature class within a file geodatabase.

I'd like to publish this tool as a geoprocessing service on my organization's ArcGIS Server (also 10.4).  However I would like the output to be geojson not a feature class so anyone could use it with or without ArcMap.

I've looked around but most of the use cases for publishing geoprocessing services assume that consumers will be working within an ArcMap client.  The users of this script would not be, and I want them to be able to parse results in whatever way they want (create a shapefile, KML, csv, pipe it into other services, whatever).

I can easily publish the service through the ArcGIS Server publishing wizard, but afterwards, no matter what payload I give it in the web-based parameters screen, the json output is empty.  Clearly I'm missing some modifications to make this work.

Given the non-availability of intermediate/advanced arcpy books, I need either a nudge in the right direction or some advice on how I can structure my parameters within the script, in a generic way, to configure them to output a geojson string instead of writing a file.


texts: Wrong parameter value error when passing a raster to clip in iteration loop in PyQGIS

texts:
The overall aim of this is to clip a raster (rlayer), feature by feature of a shapefile (vlayer). Then run univariate stats on each clipped DEM. Passing the answer to a table for output.

However I have fallen at the first hurdle and cannot get clip to work. Example error:

Unable to execute algorithm
Wrong parameter value: <qgis._core.QgsRasterLayer object at 0x000000002455D9D8>

My code as of the moment is:

#Load the required modules
from qgis.core import*
import qgis.utils
import processing
import os

#Load administrative polygons
vlayer = (iface.addVectorLayer
("C:/Users/geol-tdi/Documents/UK_NUTS.shp",
"nutspoly",
"ogr"))
if not vlayer:
    print "Vector layer failed to load!"

#Load raster for analysis
rlayer = (iface.addRasterLayer
("C:/Users/geol-tdi/Documents/Rasters/UKwheatPEC80div50.tif",
"WheatD"))
if not rlayer:
    print "Raster layer failed to load!"

#Iteratively analyse admin polys.
vlayer.selectAll()
features = vlayer.getFeatures()

for feature in features:
    vlayer.setSelectedFeatures([feature.id()])
    print "Feature ID %d: " % feature.id()
    processing.runalg('qgis:clip',rlayer, feature, None )
    vlayer.removeSelection()

vlayer.removeSelection()

I have tried variations such as naming the selected feature before passing it to the algorithm but that fails as well. Output is currently set to NONE to allow testing/pass the result to the univaraite stats alg when I get there.

I am aware this is likely a simple problem/mistake, but I am relatively new to this.

Note that I have already tried v.rast.stats from the processing toolbox, it fails to write any output to the shapefile, for reasons unknown.


texts: From a script tool using ArcPy, can I store a point object in a BLOB field and retrieve that point later?

texts:
I am trying to write an ArcPy script tool that will store a point object in a BLOB field that I have created.  I don't know if that is even possible.  If it is, how do I do it, and how can I then retrieve and update that point later?  It is probably possible to do it through ArcObjects (which I would rather do), but I am restricted to an arcpy script tool by client specs.  I am rather new at the arcpy thing (much more comfortable with ArcObjects).

I should ask:  is there a way to access ArcObjects natively from within a script tool, like the ThisDocument hook that was available in VBA?  If so, I could justify using ArcObjects, as long as I didn't have to go through comtypes (which is what I usually do with standalone Python automation scripts).


texts: Saving output from splitvectorlayer processing as shapefile with PyQGIS

texts:
I'm working on a plugin wich works on both QGIS 2 and QGIS 3. This plugin can perform a qgis:splitvectorlayer if the end user wants to.

As .gpkg is the default format in QGIS 3 and i don't want end user to changer their default settings, I want to be able to save splitvectorlayer output as a shape. I just want gpkg files to be converted to shape file in the same folder (p in my code).

I have to use shape format because my plugins relate to a third application that is only compatible with shape files.

couche = self.dlg.mMapLayerComboBox_2.currentText()
champ = self.dlg.mFieldComboBox.currentText()
path = self.get_enregistrement()
p = path + "/" + datetime.datetime.now().strftime('%Y-%m-%d_%H-%M-%S') + "_" + couche + "_" + champ
os.makedirs(p)

split = processing.run("qgis:splitvectorlayer", {'INPUT':self.dlg.mMapLayerComboBox_2.currentText(),'FIELD': self.dlg.mFieldComboBox.currentText(), 'OUTPUT' : p})
split_output = split['OUTPUT']
couches_sep = QgsVectorLayer(split_output, "separation", "ogr")
_writer = QgsVectorFileWriter.writeAsVectorFormat(couches_sep, "UTF-8", "ESRI Shapefile")

After many attempt, this is the only one that doesn't throw me an error but still i don't have my gpkg files converted to shape.


texts: WPS request builder missing in GeoServer

texts: I'm using GeoServer 2.10.1 and I need to use gs_clip function but I am not able to find WPS request builder in the GeoServer Demos.


texts:
I don't know if this question fit to this site but i will try: i want to export maps to JPG files with this code:

import arcpy,os,sys,string
import arcpy.mapping
from arcpy import env

env.workspace = r"G:\PROJECTS\bneyBrakZafonMegorim\gis"
for mxd in arcpy.ListFiles("*.mxd"):
    print mxd
    mapdoc = arcpy.mapping.MapDocument(r"G:\PROJECTS\bneyBrakZafonMegorim\gis\\" + mxd)
    arcpy.mapping.ExportToJPEG(mapdoc, r"G:\PROJECTS\bneyBrakZafonMegorim\gis\out\\"+os.path.basename(mapdoc.filePath).replace ('.mxd','') +".jpg",resolution=120)
    print 'ExportToJPEG'
    mapdoc.save()
del mxd

Now, the code worked fine till this morning- the maps exported to JPG files but the date and the date time of the export action didn't changed into the accurate time (today) in the windows (7 professional) operation system. This is my date time now:

and when i export the map i get this date time in the windows operation system:


texts: Doing histogram to compare areas between two years using Google Earth Engine

texts:
I want to do a simple visualization to summarize the total burned area in California between 2019 and 2020. Particularly I want to do a histogram or a column chart to show two columns, one for each year, showing the burned area in hectares. I should know how to do this but I have problems to find out.
My code below.
//Map.addLayer(Outline_image,[],'Outline, Image');
var California = ee.FeatureCollection("TIGER/2018/States")
  .filter(ee.Filter.eq("Name","California"));

// Identify datasets
var MCD64A1 = ee.ImageCollection('FIRMS').filterDate('2019-08-01', '2019-09-08');
MCD64A1 = MCD64A1.select('T21');
print("MCD64A1 2019", MCD64A1);
var MCD64A1_ = ee.ImageCollection('FIRMS').filterDate('2020-08-01', '2020-09-08');
MCD64A1_ = MCD64A1_.select('T21');
print("MCD64A1 2020", MCD64A1_);

// Plot preview
var firesVis = {
  min: 296, max: 500, opacity: 0.6,
  palette: ['red', 'orange', 'yellow'],
};
var firesVis_ = {
  min: 304.29998779296875, max: 504, opacity: 0.6,
  palette: ["002bff","5ae8ff","85ff89"],
};
Map.setCenter(-122.3663, 38.0288,9);
Map.addLayer(MCD64A1.max().clip(California), {}, 'Fires2019');
Map.addLayer(MCD64A1_.max().clip(California), {}, 'Fires2020');

var Outline_image = MCD64A1.count().gt(0);
//creating an image that has 1 wherever there has been a fire, 0 else
print("Outline_image", Outline_image);

var Outline_image_ = MCD64A1_.count().gt(0);
//creating an image that has 1 wherever there has been a fire, 0 else
print("Outline_image_", Outline_image_);

var Outline_feature = Outline_image.reduceToVectors({geometry: California, scale: 500});
print("Outline_feature", Outline_feature);
var Outline_feature_ = Outline_image_.reduceToVectors({geometry: California, scale: 500});
print("Outline_feature_", Outline_feature_);

// create a ee.FeatureCollection for all fires within California in a scale of 500 m
var city_outline = ee.Image().byte().paint({
  featureCollection: Outline_feature,
  width: 2
});
var city_outline_ = ee.Image().byte().paint({
  featureCollection: Outline_feature_,
  width: 2
});

Map.addLayer(city_outline,[],'Outline, Feature');
Map.addLayer(city_outline_,[],'Outline, Feature');


texts:
I have these two SQL Server 2008 R2 queries:

SELECT COUNT(*) FROM OIS_NOA_Buffers WHERE geog.STIntersects(geography::Point(35.25934, -120.64432, 4326))=1;
SELECT COUNT(*) FROM OIS_NOA_Buffers WHERE geom.STIntersects(geometry::Point(35.25934, -120.64432, 4326))=1;

The first returns a 1 and the second a 0. Both geog and geom are SRID 4326.

Geog geometry was derived from Set geog = Geom.STAsText()

Why wouldn't they both return 1?  (The point is under the polygons.)


texts: Referencing a compiled help file (CHM) from a python toolbox (PYT)

texts:
I have a python toolbox and the client wishes to have the side help pane show help. The only way I know of to do this is reference a chm help file. That option is grayed out for python toolboxes (.pyt) but not for toolboxes with scripts (.tbx, the route I don't want to go).

Does anyone have any insight or have accomplished such a feat?


texts: Applying symbology changes to all feature classes using ArcPy in ArcGIS Pro?

texts:
I'm using this code to remove all decimal places within the symbology results of Graduated Colors. I can get it to apply to one feature class, but I can't figure out how to get it to apply to all of them (I have a total of 15).

Here is the code I'm using:

p = arcpy.mp.ArcGISProject("CURRENT")
m = p.listMaps()[0]
lyr = m.listLayers("BCBS*")[0]
sym = lyr.symbology
if sym.renderer == "GraduatedColorsRenderer":
    breaks = sym.renderer.classBreaks
    for b in breaks:
        b_int = b.label[0:-7]
        b.label = b_int
lyr.symbology= sym

All the feature classes begin with "BCBS" so I thought that BCBS* would apply the desired results to all the feature classes but it didn't. Then I realized that [0] was only applying it to the first feature class, but I still can't figure out how to apply it to all feature classes that begin with "BCBS"


texts: Directional spread of a raster from a point

texts:
I've created a cost distance raster from a set of points and a cost raster using arcgis pro.

I want to know whats the main direction of all the cost cells. I tried to use a watershed, but i'm not sure if thats the right heading. What method would be most usefull?

Update
I tried the euclidean direction, but I cant seem to get it right, as there is NaN cells around the cells.


texts: Output of Processing Algorithm Doesn't Show Up in Layers Panel

texts:
I'm writing a PyQGIS Processing plugin that takes a series of inputs and uses them to run other PyQGIS processing plugins that I wrote. The problem I'm having is that the layers my plugin returns don't show up in the layers panel, similar to this guy's problem. How do I resolve this issue?
Here's my processAlgorithm method:
def processAlgorithm(self, parameters, context, feedback):
    #unpack parameters arguement

    pin_dropper_alg_params = {
        #like 20 input params
        QScoutPinDropperAlgorithm.DROPPED_PINS_OUTPUT: "memory:"  # I promise I read this somewhere
    }

    # this processing algorithm produces a vector layer of pin geometry type
    pin_drop_out = processing.run("QScout:droppins", pin_dropper_alg_params,
                                  context=context, feedback=feedback, is_child_algorithm=True)

    pin_drop_out = pin_drop_out[QScoutPinDropperAlgorithm.DROPPED_PINS_OUTPUT]

    vals_raster = self.parameterAsFile(parameters, QScoutValueGrabberAlgorithm.RASTER_INPUT, context)

    # VALUE GRABBER PARAMS
    grab_alg_params = {
        QScoutValueGrabberAlgorithm.RASTER_INPUT: vals_raster,
        QScoutValueGrabberAlgorithm.POINTS_INPUT: pin_drop_out,
        QScoutValueGrabberAlgorithm.POINTS_WITH_VALUES_OUTPUT: parameters[self.DROP_AND_GRAB_POINTS_OUT]
    }

    # this processing algorithm produces a vector layer of pin geometry type
    points_layer_id = processing.runAndLoadResults("QScout:valuegrab", grab_alg_params,
                                                context=context, feedback=feedback)
    points_layer_id = points_layer_id[QScoutValueGrabberAlgorithm.POINTS_WITH_VALUES_OUTPUT]
    points_layer = QgsProject.instance().mapLayer(points_layer_id)

    # GRID AGGREGATOR PARAMS
    grid_w = self.parameterAsDouble(parameters, QScoutGridAggregatorAlgorithm.GRID_CELL_W_INPUT, context)
    grid_h = self.parameterAsDouble(parameters, QScoutGridAggregatorAlgorithm.GRID_CELL_H_INPUT, context)
    ag_idx = self.parameterAsEnum(parameters, QScoutGridAggregatorAlgorithm.AGGREGATION_FUNCTION_INPUT, context)

    # this is a bit wonky
    fields_to_use_list = map(lambda f: f.strip(), fields_to_use.split(","))
    ag_fields_list = points_layer.fields()
    regexes = "|".join(map(lambda r: "(%s)" % r, [ROW_REGEX, COL_REGEX, VINE_REGEX, PANEL_REGEX]))
    ag_fields_list = filter(lambda f:
                       (not fields_to_use or f.name() in fields_to_use_list)
                       and not re.match(regexes, f.name())
                       and (f.type() == QVariant.Int or f.type() == QVariant.Double),
                       ag_fields_list)
    ag_fields = ",".join(map(lambda f: f.name(), ag_fields_list))
    # for field in ag_fields_list:
    #     ag_fields.append(field)

    grid_ag_alg_params = {
        # some input params
        QScoutGridAggregatorAlgorithm.AGGREGATE_GRID_OUTPUT: parameters[self.DROP_AND_GRAB_GRID_OUT]
    }

    # this plugin produces a vector layer of polygon geometry type
    grid_alg_out = processing.runAndLoadResults("QScout:gridaggregator", grid_ag_alg_params,
                                                context=context, feedback=feedback)

    ag_layer_id = grid_alg_out[QScoutGridAggregatorAlgorithm.AGGREGATE_GRID_OUTPUT]

    return {self.DROP_AND_GRAB_POINTS_OUT: points_layer_id, self.DROP_AND_GRAB_GRID_OUT: ag_layer_id}


texts: Converting lat lon into co-ordinates (in ft of m)

texts:
I have a set of latitude and longitude of a series of points which specific the trajectory of a vehicle.
If I consider the first point as the origin (0,0), is it possible to convert the trajectory into a set of points with co-ordinates as (X ft, Y ft)? If yes how?

I would prefer to have the mathematical formula if possible.

I also have a related question. Does the conversion depend on the map projection I am interested in? If yes, the projection I would be interested in is Mercator projection with datum of WGS84.


texts:
I created a polygon using ST_UNION. However, it shows some lines inside that don't make sense, as you can see below.

How can I create the union poly without those lines or remove it from the poly created?


texts:
I've got a parcel feature class in ArcGIS 10. Some of the parcels were in the shapefile when I got it. Others I've added after importing the shapefile to a feature class in a personal geodb.

I want to change the font color to white. The code below works for the features I've added, but not for the ones that already existed. For those, the label displays with the  code displaying also, and no color change. I don't know why the code would work for some features but not others.

The only difference I can think of is that the original shapefile that I received was probably created in ArcGIS 9, maybe earlier.

Any suggestions on how to get them all to display with the formatted label? Thanks.

Function FindLabel ( [F_NAME], [L_NAME] , [Min_Owner] , [Exp_Date] , [Option_Yrs]  )
  If Not IsNull( [Min_Owner]) Then
    FindLabel = "<CLR red='255' green='255' blue='255'>" & [Min_Owner] & vbnewline & [Exp_Date] & " + " & [Option_Yrs] & "</CLR>"
  Else
    FindLabel = [F_NAME] & " " & [L_NAME]
  End If
End Function


texts: Leaflet Maps trouble on personal webpage

texts: I created a personal webpage on notepad++ and created links to 5 different leaflet maps on it. it works fine when you run it from notepad++. The problem is when I used FileZilla to put my files onto the school server, the leaflet map links on my webpage do not work. If I click on the link it just shows the map title not the actual map. I get errors sayin... Mixed Content: The page at 'https://tigerweb.towson.edu/sphill16/map1.htm' was loaded over HTTPS, but requested an insecure stylesheet 'http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css'. This request has been blocked; the content must be served over HTTPS.


texts:
I am working with the leaflet api.Where i have added custom control for marker.

And i have a button which tends to remove all markers.

Problem

Through wrapping, i have to remove all markers but function not working....Browser not giving any console error, so i am in dark, didn't fully understand the structure of api.

Script

            var markers = new L.FeatureGroup();
            map.on('click', function markerPlace(e) {
                //L.marker(e.latlng, { icon: markerIcon, draggable: true }).addTo(map);
            marker = L.marker(e.latlng, { icon: markerIcon, draggable: true }).addTo(map);
                markers.addLayer(marker);
                map.off('click', markerPlace);
            });
        }).addTo(map);

    //onClick this button we have to remove all marker
    <button id="removeMarker">Remove Markers</button>
    $('#removeMarker').click(function (e) {map.removeLayer(markers) });

If someone have idea about that please help or any kind of reference will be appreciated.Thanks for your time


texts: I want run JSP code in GeoServer 2.2.3.  I put page JSP in data_dir/www but it did not run, however an HTML page runs fine in the same folder.


texts: Knowing TYPE parameters accepted values for RQGIS?

texts:
I'm trying to use RQGIS interface with QGIS to create a polygon grid. One of the required parameters is TYPE.

Where can i know the type of parameters to this algorithm? and to others?

From

data

Code:

neto  <- readRDS("/path/") #download data from link

# Finding QGIS algoritms
dir_tmp <- "/my/path/"
my_env <- set_env()
find_algorithms(search_term = "grid")
params <- get_args_man(alg = "qgis:creategrid", qgis_env = my_env)

params$TYPE <- "polygon"
params$EXTENT <- nnetpro
params$HSPACING <- "10" does it accept numeric?
params$VSPACING <- "10" does it accept numeric?
params$CRS <- "EPSG:31983" #does it work with CRS("+init=epsg:31983")?
params$OUTPUT <- file.path(dir_tmp, "g10m.shp")

out <- run_qgis(alg = "qgis:creategrid",
                params = params,
                load_output = params$OUTPUT,
                qgis_env = my_env)

Error in run_qgis(alg = "qgis:creategrid", params = params, load_output = params$OUTPUT,  :
Error: Wrong parameter value: polygon


texts: Complete map of Oceania (physical, from satellite,...) to use as background

texts:
I need to use a map to show a cartographic output based on raster elaborations. Specifically, I want to use this map as background to overlay over it some cells of my rasters layers.

The type of map is not mandatory, it can get from satellites or any other source that give back a nice graphich representation of my study area.

For example, I found this one attached in the post, but it does not include a portion of my interest. This happens for all other maps I found.

Any suggestion for finding online a map complete of East and West Oceania?


texts: Debugging AttributeError: 'module' object has no attribute 'core'?

texts:
I'm having a problem to get my python scripts running in ArcMap.
I keep getting this message no matter what script i use.

  Executing: Script1
  Start Time: Thu Dec 05 15:37:50 2013
  Running script Script1...

  Traceback (most recent call last):
    File "C:\Users\Flori_000\Documents\Aptana Studio 3 Workspace\ArcGIS\wk.py", line 11, in
      import arcpy
    File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy__init__.py", line 24, in
      from arcpy.toolbox import *
    File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\toolbox.py", line 351, in
      from management import Graph, GraphTemplate
    File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 22, in
      import _management
    File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy_management.py", line 14, in
      import _graph
    File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy_graph.py", line 27, in
      import numpy
    File "C:\Python27\lib\site-packages\numpy__init__.py", line 142, in
      import add_newdocs
    File "C:\Python27\lib\site-packages\numpy\add_newdocs.py", line 9, in
      from numpy.lib import add_newdoc
    File "C:\Python27\lib\site-packages\numpy\lib__init__.py", line 13, in
      from polynomial import *
    File "C:\Python27\lib\site-packages\numpy\lib\polynomial.py", line 11, in
      import numpy.core.numeric as NX
  AttributeError: 'module' object has no attribute 'core'

  Failed to execute (Script1).
  Failed at Thu Dec 05 15:37:50 2013 (Elapsed Time: 0,40 seconds)

To make sure about my scripts i also converted a tool made with the ModelBuilder to PythonScript but the results were the same.

Does someone have any idea what this is all about?


texts: BBox missing when converting TIGER to GeoJSON

texts:
I can't get the bounding boxes of polygons if TIGER/Line shape files when converting them to GeoJSON using FWTools. The other default information is present and there is no difference between the GeoJSON files created with or without -lco WRITE_BBOX=YES. Here is the command line I used:

ogr2ogr -f GeoJSON myF.json myF.shp -lco WRITE_BBOX=YES


texts:
Can anyone provide me with some information on hosting a LeafLet web map, created with the QGIS2Leaf plugin for QGIS, on Dropbox. I have used Droppages, however the webmap does not come in, it is a totally blank page. When I preview the page as a file, it is an interactive webmap. I have looked at the following post:
    Where to host private CartoDB/Leaflet web app  however it does not provide any insight.


texts:
Following on from GDAL/OGR Geometry Type Python, what is the best way to determine if a vector geometry is any kind of line or point or whatever?

For example, I'm using this technique at the moment,

# check geom type is supported
vector_lyr = vector_ds.GetLayer()
ftr = vector_lyr.GetNextFeature()
geom = ftr.GetGeometryRef()
geom_type = geom.GetGeometryType()

if geom_type in (ogr.wkbLineString, ogr.wkbMultiLineString):
    do_line_stuff()
elif geom_type in (ogr.wkbPoint, ogr.wkbMultiPoint):
    do_point_stuff()
else:
    raise NotImplementedError(
        'Geometry Type {} is not supported'.format(geom.GetGeometryName()))

but it feels like it doesn't cover all geometry types. What if it's a curve, or a ring, or a geometry collection? Should I just list all the possible types in the if statements above, or is there a better way? There doesn't seem to be a catch-all is_line() method.