texts:
Is it possible to keep the name of an image when you merge them to form an ImageCollection

In the below example the images 'constant1' and 'constant2' become '0' and '1'

// Create arbitrary constant images.
var constant1 = ee.Image(1);
var constant2 = ee.Image(2);

// Create a collection by giving a list to the constructor.
var collectionFromConstructor = ee.ImageCollection([constant1, constant2]);
print('collectionFromConstructor: ', collectionFromConstructor);


texts: I'm trying to snap points to lines in PostGIS for use in QGIS, but cannot get it to work.  I have one line in my line table (although it was created by merging multiple lines together) and about 600 points in my point table so would rather not do this manually.


texts: Cannot Add Machine to ArcGIS Server Cluster

texts: After almost year of success, SQL database failed to register in ArcGIS Server.  Traced problem to secondary/failover server in cluster.  Deleted secondary server from cluster and database now registers fine.  Cannot add secondary machine back in.  set up that secondary machine as own server and can add database fine.  But cannot add to original setup.  Can run ArcGIS Server manager of original on secondary machine, but cannot log onto secondary ArcGIS Server manager from anywhere else (i.e. http://ip.address.machine2:6080/arcgis/manager/site.html) fails.  Can ping on network, log onto, etc.  ipconfig /all returns virtually identical results for each machine.  Ports look fine on each, no firewall.  Can telnet to primary, but not secondary - possible troubleshoot aid?


texts: How to build ArcGIS Flex Viewer app for remote server?

texts:
I'm trying to help a co-worker set up an ArcFlex Viewer app using the Application Builder. I'm a bit puzzled by the settings screen:

It's asking for a web server base folder (local path) and a web server base folder URL (web path). What should I enter for the local path if this is going to be hosted on a remote server? It's a free hosting service, so I don't really have access to the local path there other than .../my_user_name/public_html.


texts: Extracting zeros from numpy array and creating a new raster

texts:
The following code reads in several .tif files from an input folder, converts them to numpy arrays and adds them together. All input files are binary:

inputFolder = "/home/usr/Desktop/BufferFolder/"
outputFolder = "/home/usr/Desktop//BufferFolder/Addition"
template = gdal.Open("/home/usr/Desktop//BufferFolder/Template.tif")
rows = template.RasterYSize
cols = template.RasterXSize
if template is None:
print 'Unable to open template file'
    sys.exit(1)
templateArray = np.array(template.GetRasterBand(1).ReadAsArray())
mainArray = 0 * templateArray

os.chdir(inputFolder)

def findRasters(path, filter):
    for root, dirs, files in os.walk(path, filter):
        for file in fnmatch.filter(files, filter):
            yield os.path.join(root, file)

count = 0
for raster in findRasters(inputFolder, '*.tif'):
    (infilepath, infilename) = os.path.split(raster)
    openraster = gdal.Open(infilename)
    rasterToArray = np.array(openraster.GetRasterBand(1).ReadAsArray())
    mainArray = mainArray + rasterToArray
    count = count + 1

I am interested in the 0 values from mainArray. How can I output these values into a separate raster in the outputFolder?


texts: Extract Multivalues to Points giving Error [000000_12301899]?

texts:
I am trying to run Extract Multivalues to Points in ArcMap 10.6 but I am getting an error code 000000_12301899. Below is a screenshot from the Results dialogue.

Also here are the inputs. The DEM is in Albers_Conical_Equal_Area projection whilst the feature class is in NAD_1983_California_Teale_Albers.

Does anyone have any advice on resolving this issue?


texts: Query in QGIS is significantly slower, than in pgAdmin

texts:
So, I've a table in postgresql, that is joined to other spatial table.

If I've run a simple query in pgAdmin, let's say SELECT * FROM table1 WHERE "area" > '5000' and it takes less, than 1s to output a result.

Completely different story is in QGIS.

I'm developing plugin, that needs to fetch some data by query. The code is simple, more less like this:

table1 = iface.activeLayer()

attribute = 'area'
size = 5000

q = "\"{}\" > '{}'".format(attribute, size)

expr = QgsExpression(q)
result = table1.getFeatures(QgsFeatureRequest(expr))
ids = [i.id() for i in result]

and it works just fine, but performance is the issue. It takes about 15-20s to run the same query, where in pgAdmin took less than 1s.

How is that possible? Is that normal, that QGIS is that slow?

At first, I thought about that join is making QGIS so slow, but I can't figure out, why it's not affecting pgAdmin, if that is the case?

My spec:
QGIS 3.4.8
PostgreSQL 10.7
PostGIS 2.5.2
pgAdmin 4

EDIT:
Removed 'AND' typo as @Joseph mentioned.


texts: Creating numpy array with grid cell area in GDAL/rasterio?

texts:
I want to create a numpy array of size 2160 * 4320 with each grid cell containing the size of a 5' grid cell on earth.

Is there a python library or function to do this?

I am using GDAL and rasterio.


texts:
I am having a hard time creating viewsheds on Mars. Originally, I thought it was a coordinate system projection error, so I created a custom projected coordinate system for Mars, went to this site, and made sure all my parameters were correct: http://chrisherwig.org/hirise/Data%20Processing/2012/10/21/mars-map-projections/ (the information that I found most helpful is in the red print and you have to slide the bar to see the parameters they use for the Mars Equirectangular Spatial Reference data). I set my projected coordinate system to Equidistant_Cylindrical, not Plate_Carree, and set the false easting, false westing, central meridian, and the standard parallel1 to 0 (I also made another map with a central meridian set to 180 and all the rest to 0 like the one in this link that uses 180 as its central meridian). However, when I went to check the coordinate systems after I projected them to make sure they were correct, I found that ArcGIS had automatically set their projected coordinate system to Plate_Carree. I didn't understand why it was doing this until I went to re-project it and discovered that the only difference between the Equidistant_Cylindrical projection and the Plate_Carree projection is that the Equidistant_Cylindrical projected coordinate system had an option for using a "Standard_Parallel_1" (it automatically sets this parameter to 60 too). I then realized that since I've been setting the Equidistant_Cylindrical projected coordinate system's "Standard_Parallel_1" to 0, it had just been getting rid of that field all together. That meant that it just projected the data in Plate_Carree since Plate_Carree doesn't have a "Standard_Parallel_1" parameter.
I also noticed that this happened only with rasters I used. When I created a custom projected coordinate system for my shapefiles, it acutally made the projected coordinate system I created (the projection was Equidistant_Cylindrical, not Plate_Carree). So, I went ahead and made viewsheds using the shapefiles in this coordinate system and the rasters in the other, and I inevitably got the same questionable viewsheds as I had when I only used the Plate_Carree projection.
Are my projections why my viewsheds are messed up?
The data I am using as my parameters for the viewsheds are hands down correct, and I've read through PDS documents from the NASA website explaining what all the information means.
Explaining what I mean by viewsheds being incorrect:
In the image below, the viewsheds way off to the right should be were the ones off to the left are located (they're kinda small, next to the blue dot, and almost barely visible). Those ones off to the left are also located further west of a bank they are supposed to be on. I know they are incorrect because I am looking at images from the mastcam of the rover, and I am locating the geologic feature I see in the images on this map. The viewsheds are supposed to represent what we see in the images.


texts: Google Earth Engine export for asset too large?

texts:
I am currently trying to export a rather large Sentinel-2 EVI raster of the northern coast of Cuba. The error that keeps getting returned is:

  Failed to contact Earth Engine servers. Please check your connection,
  firewall, or browser extension settings.

I've tried to alter the code as well as log out and log back in, check wifi, quit my browser etc. but something tells me this is likely a size issue.

Heres a link to the code:
https://code.earthengine.google.com/5279bd02489d430997b9e70cc751d17b

Heres a link to my area of interest to use as an import (irma80Buff):
https://code.earthengine.google.com/?asset=users/hancturner/irmaBuffers/irma_buff_80


texts: white outlying tiles in GeoServer MBTiles layer

texts:
I've been working on this issue for a while, and have found a workaround, but would still like to put the question out there.  I have been using TileMill to create tile sets for a polygon, outside the borders of which I'd like transparency.  If I export an mbtiles file and serve it as an overlay with the GeoServer MBTiles plugin, the following image is the result (the baselayer is OSM):

What I assume is happening is that TileMill doesn't create full blank tiles for the areas that have no data in them, and GeoServer interprets those missing tiles as opaque white.  My question is: is there a way to get GeoServer to display those non-tile areas as transparent?

I'll describe my workaround: using information from this thread I found that I can get the desired effect by bypassing GeoServer altogether, and serving the unpacked tiles as an OpenLayers XYZ layer (the link describes how to avoid the pink error tiles).  This is fine with me, but I'm still wondering if GeoServer can be used.

I also tried unpacking the tiles, adding blank "filler" tiles where necessary, and then repacking the tiles with mb-util.  However, GeoServer hasn't been able to serve the repacked tiles correctly yet so I haven't gotten very far in that direction.


texts:
I have 3 shapefiles, two of them wihtout the Z Co-ordinates elevation but 1 of them has a Z co-ordinate elevation. I can load two ShapeFiles into my SQL Server Database which does not have Z Co-ordinates. But I am having issue loading the Z Co-ordinate file into the database.

I have been reading different forums and got a suggestion that I need to trim the Z coordinates(chnage 3D to 2D) to load into the database. I was just wondering how can I achieve this? Can anyone suggest free tools or any method to do the same?


texts:
In this project (using QGIS 3.18.1) the filter "veg_actu1" = '600000' or "veg_actu1" = '601000' or "veg_actu1" = '601100' or "veg_actu1" = '602000' or "veg_actu1" = '603000' does not work properly (white areas should be rendered)

If the filter is replaced by regexp_match(veg_actu1, '(600000|601000|601100|602000|603000)') or by
case when "veg_actu1" in ('600000','601000','601100','602000','603000') then 1 end it works fine. What am I missing?
Here is a link to the project: https://drive.google.com/file/d/1slBl3b2Pd8yqDFqE4RW7L3bstAujg7dU/view?usp=sharing
If only this rule is on, display is correct.


texts: How can I import ALOHA .pas plume file into QGIS?

texts: I am trying to find a way to import ALOHA's plume model (.PAS) into QGIS? I have not been able to find anything showing how to accomplish this outside of using ESRI-based tools.


texts: How can I aggregate 1kmx1km cells into ones of 50km by 50km in Arc Map?

texts:
I have a map with cells on 1 square kilometer and need to aggregate them in 50 by 50 kms.

I have tried Aggregate polygons and Aggregate and have not been successful.


texts:
My problem might be somewhat similar to the following one: Retrieving lost data from QGIS. However, I need some further clarifications:

I was working with a project in QGIS. Suddenly, an error message with the title "Krasch dumpad" (Crash dumped) shows up (see pic 1 below).

I then closed everything, restarted my computer and opened up the program again. When I tried to enter/open the same project, I recieved the following error message (see pic 2). The error message says: "error occurred while parsing element on line 1 column 1 for file C:/Users/H..."

Have I lost the project and need to redo all the operations for this project (all of my analysis in QGIS)?


texts: Setting relative paths to temporary files in ModelBuilder using ArcGIS

texts:
I have create a model in modelbuilder using ArcGIS where everything works on my PC but whenever I try run it on a different PC issues arise due to the model trying to save the temporary files to my PC. Please note that the model is set to use "relative paths".

How do I get the model to also use relative paths for temporary files so that the model can run on other PC's?


texts: PyQGIS Loading Project Layers not working

texts:
I'm trying to make some map tiles (with a transparent background) showing the speed limit in different areas of the UK.  I've successfully managed to do this using the QGIS GUI on Windows 10, but I'd now like to automate the process so I can easily keep the tiles up to date with changes to OpenStreetMap.

I've managed to get the process running in a docker container and it all runs through without any errors, but all of the generated tiles are blank (unlike when I run it with the QGIS GUI).  The way the script works (after producing a bunch of .osm files for different speed limits), is to load the project (.qgs) that I had previously created in the QGIS GUI on Windows 10 and then run the qgis:tilesxyzdirectory process with the same parameters that were used in the GUI.

I suspect that the problem is in loading the project; I found a bit of code in the processing algorithm that creates a list of layers.  The result of findLayers() is a list of QgsLayerTreeLayers, whereas the result of layerOrder() is a list of QgsVectorLayers, so the check that the entries in layerOrder appear in the visible list produces no results and hence self.layers gets set to [].  Of course I might be completely wrong about the problem and, even if I'm right, I have no idea what to do about it.  I'd like to be able to load a QGIS project as it allows me to use the GUI for styling.

The complete project containing the docker container details and all the generation scripts is on bitbucket here.  After building with docker-compose build, I run it using docker-compose up.  The actual python script for generating the tiles from the project is here.

The bash script that runs the overall process is here.

Can anyone see what I'm doing wrong?


texts: Can I use QGIS to query the Planet Labs Scenes API?

texts: I'd like to use QGIS to explore and download Planet Labs imagery. Is there any way to do that?


texts: Extract Polygon Data from Google Maps / CartoDB

texts:
I am looking to extract the polygons on this website http://goo.gl/vXhDSG

I am not sure how to do that as I can't see any references to a geo JSON file.

I can see that they are using CartoDB http://www.cartodb.com/


texts: QGIS - Automatically apply QML styles to Vector Layers within a VRT

texts:
I have created a VRT file that contains two vector files, one being made up of polygons, the other one points. My VRT file is as follows:

<OGRVRTDataSource>
  <OGRVRTUnionLayer name="test">
    <OGRVRTLayer name="poly>
        <SrcDataSource>C:\polygonfile.tab</SrcDataSource>
    </OGRVRTLayer>
    <OGRVRTLayer name="point">
        <SrcDataSource>C:\pointfile.tab</SrcDataSource>
    </OGRVRTLayer>
  </OGRVRTUnionLayer>
</OGRVRTDataSource>

I am wondering if it is possible to automatically apply two QML styles that I have already created for these layers? When I load in the files individually, the QML file with a matching file name is automatically applied, however this is not the case if I load them in through the VRT.


texts: Failure in importing geojson data in Postgresql

texts:
I am new to both PostgreSQL and GeoJson. While following some of the tutorials online and some answer over here I wrote this line to import my geojson file:

ogr2ogr -f "PostgreSQL" PG:"dbname=In user=postgres" "C:\Users\hp\Downloads\red\map.geojson" -nln locations -append

But this line produces a syntax errorERROR:  syntax error at or near "ogr2ogr"

I also followed the instructions on this answer Store GeoJson with Feature Collection

The data is shown but only on running the query given in the answer above. But how do I store this data. I am not able to find it by doing select * from table
_name.
Also the answer given on the above link shows data as expected but It is only shown the data and not storing it.

If anyone can help me insert the geojson file either by using the ogr2ogr or by helping me to insert data in table by using the link above.


texts: Load and display a layer from SQL Server using PyQGIS

texts:
I'm having a go at using pyqgis from within the QGIS python console to load a layer from SQL Server and display it. I feel like I'm part way there but I'm having a real issue getting the layer to display.

I've loaded the layer, it appears in the layers dock but nothing appears in the map window (even after selecting zoom to layer extent and checking styles). What's also weird is that if I open attributes there is data in there and I can save the layer as a shapefile, reopen it and it appears fine. Is there something I'm missing? Here's my code:

from PyQt4.QtCore import QFileInfo,QSettings
from qgis.core import QgsRasterLayer, QgsCoordinateReferenceSystem
from qgis.gui import *
from PyQt4.QtCore import *

s = QSettings()
oldValidation = str(s.value( "/Projections/defaultBehaviour", "useGlobal" ))
s.setValue( "/Projections/defaultBehaviour", "useGlobal" )

uri = "MSSQL:server=My_Server;database=My_Database;tables=dbo.My_View;trusted_connection=yes"
vlayer = QgsVectorLayer(uri, "my_table", "ogr")

vlayer.setCrs( QgsCoordinateReferenceSystem(4326, QgsCoordinateReferenceSystem.EpsgCrsId) )

s.setValue( "/Projections/defaultBehaviour", oldValidation )

QgsMapLayerRegistry.instance().addMapLayer(vlayer)


texts: Slope at a point on a Line (LineString) using Shapely and python

texts:
I've got a method for making cross-section points along a shapely LineString object that I'm not totally happy with.

My strategy is:

Create regular points every 50cm along a LineString
Create an offset point 1cm away from the 50.1cm point
Use these two points to find a slope

# Get 50cm spaced points
points = [linestr.interpolate(dist) for dist in np.arange(0, linestr.length, 0.5)]

# Get points at 50.1cm
_offsetpts = [linestr.interpolate(currDist+0.001) for currDist in np.arange(0, linestr.length, 0.5)]

# Use these two points to do rise/run and get a slope
slopes = [((points[idx].coords[0][1] - _offsetpts[idx].coords[0][1]) /
           (points[idx].coords[0][0] - _offsetpts[idx].coords[0][0])) for idx, pt in enumerate(_offsetpts)]

It works but it's not very elegant and I worry it will break for edge cases (like when 1 extra cm runs over the edge of the line)

Does anyone know a better way to get the slope of a line a known distance along a LineString object using python and shapely?


texts: Geotools set a style for a map, but not work

texts:
I use the example of the official website to load the shpfile file, but the style only works in the frame, it does not work in the jMapPane.
public void openShpFile(JMapPane mapPane) throws Exception {
    File file = JFileDataStoreChooser.showOpenFile("shp", null);
    if (file == null) {
        return;
    }

    FileDataStore store = FileDataStoreFinder.getDataStore(file);
    SimpleFeatureSource featureSource = store.getFeatureSource();
    MapContent map = new MapContent();
    map.setTitle("Quickstart");

    Style style = SLD.createSimpleStyle(featureSource.getSchema());
    Layer layer = new FeatureLayer(featureSource, style);
    //GTRenderer renderer = new StreamingRenderer();
    map.addLayer(layer);
   // mapPane.setRenderer( new StreamingRenderer() );
    mapPane.setMapContent(map);
}

An example of the official website is as follows:
public static void main(String[] args) throws Exception {
    // display a data store file chooser dialog for shapefiles
    File file = JFileDataStoreChooser.showOpenFile("shp", null);
    if (file == null) {
        return;
    }

    FileDataStore store = FileDataStoreFinder.getDataStore(file);
    SimpleFeatureSource featureSource = store.getFeatureSource();

    // Create a map content and add our shapefile to it
    MapContent map = new MapContent();
    map.setTitle("Quickstart");

    Style style = SLD.createSimpleStyle(featureSource.getSchema());
    Layer layer = new FeatureLayer(featureSource, style);
    map.addLayer(layer);

    // Now display the map
    JMapFrame.showMap(map);
}

The result is that I can display it, but there is no toolbar. I want to ask how to display the toolbar or set the style in jMapPane. It seems that the GTrender method has no effect. The picture is the official result.

my result：I just want to show the map and toolbar in the lower right corner, but it didn't work, only the map, no toolbar


texts: Problem with clob data type when running ogr2ogr command

texts:
Using ogr2ogr, I transferred data from the oracle database to the postgres database. However, the table "table" contains attributes that have a "clob" as a data type, which were not created. Is there any way of casting the "clob" data type into the data type that supports postgres at the og2ogr command. Example ogr2ogr command:

ogr2ogr -f "PostgreSQL" "PG:dbname=xx host=xx.xx.xx.xx port=xxxx user=xxxx password=xxxx" "OCI:xxxx/xxxx@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = xxxx)))(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = xx))):sema.table" -nln table1 -overwrite -progress -a_srs EPSG:32634 -lco "SCHEMA="sema1"


texts: QGIS 3, How to stop script from running automatically

texts:
I have written a python script in the QGIS editor which works as expected when I launch it from there.

import processing
import os
from PyQt5.QtWidgets import QFileDialog
from qgis.core import QgsVectorLayer, QgsProject, QgsCoordinateReferenceSystem
from qgis.utils import iface

root = QgsProject.instance().layerTreeRoot()

#Insert DummyLayer and set it to active so the layers from the
#model import don't have to be moved in the layer tree
DummyLayer = QgsVectorLayer("Point?crs=EPSG:4326", "DummyLayer", "memory")
QgsProject.instance().addMapLayer(DummyLayer, False)
node_DummyLayer = root.insertLayer(0, DummyLayer)
iface.setActiveLayer(DummyLayer)

# Add group for csv-file import to project
root = QgsProject.instance().layerTreeRoot()
QSgroup = root.insertGroup(1,"QS")

# User Dialog to pick Import_QGIS folder
Folder_Path = QFileDialog.getExistingDirectory(caption="Choose folder 'Import_QGIS'.")

# Folder_Path for uri
Folder_Path_uri = "file:///"+ Folder_Path + "/"

# Make a tuple with the csv-filenames, first 3 letters are numbers
i=0
my_tuple=[]
for file in os.listdir(Folder_Path):
    First3Letters = file[0:2]
    try:
        int(First3Letters) < 300
        #print(file)
        my_tuple.append(file)
        i+=1
    except:
        continue
iNum = int(i)

#Importing the csv-files
for x in range(iNum):
    try:
        uri = Folder_Path_uri + my_tuple[x] + "?type=csv&delimiter=,&detectTypes=yes&xField=X_Pos&yField=Y_Pos&crs=epsg:25832&spatialIndex=no&subsetIndex=no&watchFile=no"
        mem_layer = QgsVectorLayer(uri, my_tuple[x][:-4], 'delimitedtext')
        QgsProject.instance().addMapLayer(mem_layer, False) # needs to be False to avoid duplicate layers in group and outside the group
        # add layer to group
        QSgroup.addLayer(mem_layer)
        mem_layer.loadNamedStyle(r"C:\Users\mystyle.qml")
        # Show Feature Count
        root = QgsProject.instance().layerTreeRoot()
        myLayerNode = root.findLayer(mem_layer.id())
        myLayerNode.setCustomProperty("showFeatureCount", True)
        mem_layer.triggerRepaint()
        x+=1
    except:
        break

# Getting data from the model
# User Dialog to pick folder where the 3 files Form* are stored

from processing.modeler.ModelerDialog import ModelerDialog

Folder_Path = QFileDialog.getExistingDirectory(caption="Choose folder 'QS'.")
sForm1 = Folder_Path + "/Form1.xlsx"
sForm2 = Folder_Path + "/Form2.xlsx"
sForm3 =  Folder_Path + "/Form3.xlsx"

#Launching the model
dlg = ModelerDialog()
dlg.loadModel('C:/Users/myModel.model3')
processing.runAndLoadResults(dlg.model, {'form1':sForm1,'form2': sForm2,'form3':sForm3,'CRS':QgsCoordinateReferenceSystem('EPSG:25832'),'native:mergevectorlayers_4:Border 1':'memory:','native:mergevectorlayers_6:Border 2':'memory:',
'native:mergevectorlayers_7:Plots':'memory:','qgis:createpointslayerfromtable_1:Trees':'memory:'})

#Remove DummyLayer
root.removeLayer(DummyLayer)

I thought the script was ready to be added to the tool box. I saved it on my hard drive. I clicked the scripts icon and "add script to tool box".
Doing so, the script is immediately executed.
If I go along and fill in the user dialogs with valid entries, the script gets correctly executed, but is not added to the tool box.
When I restart my computer and launch QGIS, it also auto-executes the script.

Why is QGIS running the script and not adding it to the script tool box?

EDIT:
I have reinstalled QGIS 3.4 and the problem has not changed.
I have tried to add a different script with just a few lines of code, but its not added to the tool box  either. The script symbol is not showing up either.

EDIT:
I went to a colleague and tried to add the script to the processing tool box and the result was the same:
QGIS is running the script (maybe to check the code?) and in my case launching the 2 user dialogs. However, the script does not get added to the tool box.


texts: Iterating in ModelBuilder combining different fields?

texts:
I want to use 2 fields of my shapefile to work with in my modelbuilder. One field is the Category, that comprises up to 10 different categories of environmental quality and another is the Season, that comprises the 4 seasons of the year.

I want to use model builder to iterate between my fields to generate different shapefiles with the following output:

SHP1: Category1_Summer
SHP2: Category1_Winter
SHP3: Category1_Fall
SHP4: Category1_Spring
SHP5: Category2_Summer
...

To do that I'm using Select and Copy tool. But how to use the iterator in order to combine the two fields?


texts: How to use the QGIS Linear Referencing Plugin?

texts:
I'm having trouble getting the Faunalia Linear Referencing Plugin set up properly in QGIS 1.8.  I've gotten to the point where I can do the Calibration, but I get a few warnings about missing lines, or lines with no start/end points.

Basically I don't understand what is needed to do the calibration properly.  I need more details about what the field schema should be in the input line and point layers.  It is unclear what is meant by "Route must have exactly the same identification for lines and calibration points..."

At this point the calibration "successfully" finishes, but when I use the "Info" tool on line segments all the labels come back as "0.0".

Any insight from your experience much appreciated!


texts:
I'm using the newest version of ArcGIS Collector for Windows on a Surface 3 Tablet.

I'm trying to download my webmap to do some offline data collection, and it has worked prior to today.  Today each time the download progress indicator gets about half way done and then fails. I've uninstalled and reinstalled the program, tried to download at different scales even connected the tablet directly to the ethernet via a usb/ethernet cable...but no luck.

Any thoughts about what might be going on?  Like I said, this was working fine yesterday and there has been no change/update since then to windows or arcgis collector since then that I'm aware of downloading or installing.


texts:
I would like to use gdal_polygonize and gdalinfo in java.
This site says: "Note that  OSGeo4W includes a gdal-java package and a Java runtime making it fairly easily to build local Java applications using GDAL." But how?


texts: I have two raster files, one for risk areas A,B,C,D and second for land uses rice, crop, soyabean (1,2,3). What is the command that gives number of cells in each risk class that grow 1,2 or 3. I am looking for a matrix like output that has risk categories in rows and land use crops in columns.


texts: R Shiny / leaflet map: Projection problem in creating map in Plate Carree projection

texts:
I'm trying to create an R Shiny map using the leaflet package to display input layers in the Plate Carree projection rather than the default Spherical Mercator projection. I've input OSM and WMS tile layers in EPSG 4326 but the OSM and other layers do not overlay (see attached image).

Based on the setView coordinates the OSM map would seem to be correct, and the problem lies with the NASA GIBS data layers?

library(shiny)
library(shinydashboard)
library(shinyjs)
library(shinyBS)
library(leaflet)
library(magrittr)
library(leaflet.extras)
...

srtmTilesURL <- "https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/SRTM_Color_Index/default/31.25m/{z}/{y}/{x}.png"
astergTilesURL <- "https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/ASTER_GDEM_Greyscale_Shaded_Relief/default/31.25m/{z}/{y}/{x}.jpeg"
astercolTilesURL <- "https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/ASTER_GDEM_Color_Shaded_Relief/default/31.25m/{z}/{y}/{x}.jpeg"

server <- function(input, output, session) {
  output$map <- renderLeaflet({
    crs4326 <-  leafletCRS(
      crsClass = "L.CRS.EPSG4326")
    leaflet(options= leafletOptions(crs=crs4326)) %>%
    setView(lng = 110, lat = 9, zoom = 4) %>%
    addWMSTiles("http://129.206.228.72/cached/osm/service?",
               options = WMSTileOptions(format = "image/png", transparent = TRUE),
               group = "OSM (default)",
               layers = "osm_auto:all",
               layerId = "OSM WMS - osm-wms.de",
               attribution = "") %>%
    #addProviderTiles(providers$Stamen.Toner, group = "Toner") %>%
    #addProviderTiles(providers$Stamen.TerrainBackground, group ="Terrain Background") %>%
    addTiles(urlTemplate = srtmTilesURL,
             options = tileOptions(noWrap = TRUE, continuousWorld = TRUE, tms = FALSE, opacity = 1, tileSize =256),
             group = "SRTM DEM (col)",
             layerId = "SRTM_Color_Index",
             attribution = "") %>%
    addTiles(urlTemplate = astergTilesURL,
             options = tileOptions(noWrap = TRUE, continuousWorld = TRUE, tms = FALSE, opacity = 1, tileSize =256),
             group = "ASTER DEM (grey)",
             layerId = "ASTER_GDEM_Greyscale_Shaded_Relief") %>%
    addTiles(urlTemplate = astercolTilesURL,
             options = tileOptions(noWrap = TRUE, continuousWorld = TRUE, tms = FALSE, opacity = 1, tileSize =256),
             group = "ASTER DEM (col)",
             layerId = "ASTER_GDEM_Color_Shaded_Relief") %>%
    addLayersControl(
      baseGroups = c("OSM 4326", "SRTM DEM (col)", "ASTER DEM (grey)", "ASTER DEM (col)"), options = layersControlOptions(collapsed = TRUE))
})


texts: What's a good way to create inner-outlines in either ArcGIS or Adobe Creative Suite?

texts:
I am making a map where I need to create inner outlines, based off of an older map my work did:

That was done in ArcGIS, and while I know how to do it there, I don't think it looks good enough, I would like to do that inner outline as more of a soft gradient. I use Illustrator CS6 fairly often with my maps for the finishing touches but I don't have any formal training. I mostly try stuff until it looks right. After doing some playing around, I was able to come kind of close like the picture below:

I did that by making the region's fill brown, and selecting the Inner Glow tool (mode: normal, opacity 80%, blur 0.3 in, edge). However, problem with that is that the white part of the region is a white fill, so if I layer it on top of my map I won't be able to see all the stuff on the map underneath it. If I make the white fill "no fill" I lose the inner glow effect.

Any suggestions on how to create that effect on the inside of the border in Illustrator or even ArcGIS desktop? I exported my map from ArcGIS as a pdf, and opened it up in Illustrator to work on this.


texts: Making radial flow map showing curved lines over short distances (20km) using ArcGIS for Desktop?

texts:
Esri have provided instructions on how to make a radial flow map but I think the curved lines will only be produced over a long distance, like half the globe.

For short distances (20km) a geodetic line will probably still look pretty straight. To keep using this process for a radial flow map over short distances, then, I thought we could edit the datum settings so the earth is smaller, hence you'll get a nice curved line for a small distance. Anyone know how to do this?

Alternatively, is there another tool in ArcGIS Desktop 10.0 to use for making curved lines? I have 90 points that I need to connect up to 54 points, would be good to automate it rather than having to draw the lines manually.


texts:
I have 24 layers I want to save on QGIS which all happen to be Tiff files (rasters).  I am wondering how to run code to complete this task.

myDir = 'C:\temp'
layers = layers = iface.mapCanvas().layers()
pipe = QgsRasterPipe()
for layer in layers:
   extent = layer.extent()
   width, height = layer.width(), layer.height()
   renderer = layer.renderer()
   provider=layer.dataProvider()
   crs = layer.crs().toWkt()
   pipe.set(provider.clone())
   pipe.set(renderer.clone())
   file_writer = QgsRasterFileWriter("%s\\%s.tif" %(myDir, layer.name() ))
   file_writer.writeRaster(pipe,
                       width,
                       height,
                       extent,
                       layer.crs())

This is the code I have currently to try and run.


texts:
I would like to study the spatial dependency in my dataset of a variable (crop yield) spread across a country with 250 sites.

A first guess was to use a variogram on the data. However, I am not sure if the distribution of the sites is appropriate to perform a variogram analysis.

What are the assumptions made on the data to perform such analysis, and how might the clustering structure be problematic?


texts: How to filter relation members in Overpass

texts:
My final goal is to get country borders from OSM via Overpass API.
I know my country's relation object id - http://www.openstreetmap.org/relation/59065 - and can get its details with the following query:

[out:json];
  rel(59065);
out body;

The relation members list contains ways (which comprise the country border) as well as some other nodes and relations.
How can I filter relation members to leave only way elements?


texts: Cannot publish service with editable layer

texts: We have several services published, up and running for our on-line viewers.  However, we are trying to publish a service containing our bus stops, that can be brought up on a mobile device for editing in the field.  We have a user set-up called "webedit" and the layer in the mxd is pointing to this datasource.  When publishing, we check "Feature Access" and "Mobile Data" under the Capablilities.   Start Service automatically is checked. Upon analyzing, only minor errros are reported - data extent, tags, summary, draws at all scales, things that shouldn't be deal breakers. It shows as published, but then gives the message that the service did not start and that it must be started thru server manager.  When this is attempted, we get a rather non-descript "failure to start service".  The last time we tried, we discovered we needed a GlobalID, and this has been added to the table. The error logs are no help either.  All our other services publish fine.  Any ideas?


texts: How do I get the path of a layer file (.lyr)?

texts:
In C#, how do I get the path of a layer file? I can get the datasource and name of the layer but I need to get the path to the .lyr file. I want to record the path so my extension can copy and load the .lyr file later.

This gives the path to the datasource (.mdb geodatabase in my case) that the .lyr file references:

var dataset = (IDataset) map.Layer[0];
var name = dataset.Workspace.PathName + "\\" + dataset.Name

Using that info plus the FeatureClass name I can open the layer and get the layer's polygons on the map but it is not the same as opening the .lyr file.


texts: Varying result of ST_ClosestPoint() depending on ST_DWithin() distance parameter

texts:
I have a table containing a streetnetwork as MultiLineString and a table which contains buildings as points. Both in EPSG:31467.

Basically I want to match buildings onto the streetnetwork by taking the closest point to a building on the network as the match.

In a function I am iterating through all of the buildings. When the following block of code is reached, the geometry record of one building is in variable build_geom_rec.

i := i + 1;
EXECUTE 'SELECT ST_AsText(ST_ClosestPoint(streets.geom, $1)) FROM ' || streets_tbl || ' streets WHERE ST_DWithin(streets.geom, $1, 100)' INTO closest_point USING build_geom_rec;
build_geom_tex := ST_AsText(build_geom_rec);
RAISE NOTICE 'entry: % date: % area: % building: % closest_point: %', i, date_area.datum, date_area.bezirk, build_geom_tex, closest_point;

I use ST_ClosestPoint() to find the closest point of the current building on the streetnetwork and ST_DWithin() in order to take only those parts of the streetnetwork into account which lie within a certain distance. The determined closest point is stored as text in variable closest_point. At the end of the iteration I print out the coordinates of building and closest point.

Here is the problem: Depending on the distance parameter used in ST_DWithin I get different results as closest point on the street network for the same buildings.

Example outputs for one building using ST_ClosestPoint and ST_DWithin with distance parameters: 30, 100, 500

distance parameter 30:
building: POINT(3395776 5885985) closest_point: POINT(3395770.95003767 5885967.03787269)
distance parameter 100:
building: POINT(3395776 5885985) closest_point: POINT(3395756.94892761 5885912.03597038)
distance parameter 500:
building: POINT(3395776 5885985) closest_point: POINT(3395701.1594 5885589.6837)

In the following visualization you can see that all of the determined closest points lie on the streetnetwork, they just lie further away from the building with increasing distance parameter.

Apparently only parameter 30 returns a result as I did expect it. But since there are also buildings which lie further away from the streets, I need to use a larger radius for ST_DWithin.

Question:

Is something wrong with my query? Do I use ST_DWithin() in a wrong way?

I hope it's just something simple that I am missing here.

Accepted Answer:

MickyT's answer explains what I was doing wrong and suggests a working solution.

user30184's solution is actually even more convenient because here EVERY point gets a match on the streetnetwork and besides it is faster than the solution using ST_Distance():


texts:
I was following this tutorial to learn how to setup and run OpenTripPlanner : https://github.com/marcusyoung/otp-tutorial/blob/master/intro-otp.pdf

Everything goes well, until I want to start the server with this command :
java -Xmx2G -jar otp.jar --router current --graphs graphs --server

I get this on loop :

http://localhost:8080 shows nothing, tried the next command that selects different ports but the same thing happens.

Any idea how to resolve this problem?


texts: Calculation and labeling of partial distances in tracks

texts:
Google Translate:
I have a school route shape (continuous polylines). How to calculate (and label on the map) in the QGIS the partial distances of stretches between locations, intersections of other roads, bridges, and other points of interest?

Original title and body:

Calculo e rotulação de distancias parciais em trilhas

Tenho um shape de rotas escolares (polilinhas contínuas). Como calcular (e rotular no mapa) no QGIS as distâncias parciais dos trechos entre localidades, intersecções de outras estradas, pontes, e outros pontos de interesse?


texts: Leaflet search and popup at other position

texts:
In leaflet I want the popup on another position then the standard.
So I created a div in which the popup-information is opens.

countryLayer = L.geoJson(countryLayer, {

         onEachFeature: function (feature, layer){
           layer.on({
                click: function showResultsInDiv() {
                    var d = document.getElementById('popup');
                    d.innerHTML = "";
                        for (prop in feature.properties){
                        d.innerHTML += prop+": "+feature.properties.COUNTRY+"<br>";
                        }
                    console.log(d.innerHTML);
                }
            }); }

});

This is working fine. I click an object and the popup opens in the top-right corner.

However I am also using the search plugin  by stefanocudini (https://github.com/stefanocudini/leaflet-search)
When I search I want the popup to open automatically in the div.
Unfortunately I can´t get this to work. I can seach and the location is giving, but the popup does not open.

The search-control code I use is:

var searchControl = L.control.search({
    layer: countryLayer,
    initial: false,
    propertyName: 'COUNTRY',
    zoom: 15
});

searchControl.on('search:locationfound', function(e) {

    if(e.layer._popup)
        e.layer.openPopup();

}).on('search:collapsed', function(e) {

        streetsLayer.eachLayer(function(feature, layer) {   //restore feature color
            streetsLayer.resetStyle(layer);
    });
});

map.addControl( searchControl );  //inizialize search control

Hope someone can help me solve this issue


texts: Extracting list of addresses in particular region from OpenStreetMap (OSM) data?

texts:
I need to extract all addresses in particular region from OpenStreetMap (OSM) data.

Is it possible to do this?


texts: QGIS3 Separately rotate the orientation of individual composer atlas maps?

texts:
Is it possible to rotate each individual atlas detail map separately?

In creating an atlas for a long linear feature (rivers) to be output in engineering-style pages (11 x 17), it is nice to include as much and as consistent of an amount of the linear feature in each separate detail map as possible.  Having the map oriented to N is not a particular priority.  I understand how to rotate my whole canvas in the main app, and how to rotate a map rectangle within composer, but neither of these addresses the goal exactly.

My use case example is below. Each yellow polygon covers a 15 miles section of river.  I want to rotate each atlas panel to 'flat' according to the bottom of the polygon, so that in each panel the visible river feature extent will be as-wide horizontally as possible.


texts: Combine multiple adjoining parts of a single feature

texts: In QGIS, one polygon feature resulted from merger of several adjacent polygons. This one new polygon feature has a single line through it that I would like to eliminate. When hovering over individual nodes in edit mode a balloon displays polygon number, ring number, and vertex number and in this case the adjacent parts of the new polygon have polygon numbers 0 or 1. How do I combine the polygon parts of this new single polygon feature?


texts: Reproject tfw without creating a new raster file

texts:
I have a quite big amount of georeferenced .tif with their .tfw in one folder. The orignal CRS is Gauss-Krueger, and now I want to reproject them to UTM.
My approach so far is to use gdalwarp:
"C:\Program Files\QGIS 3.14\bin\gdalwarp.exe" -s_srs EPSG:31467 -t_srs EPSG:3044 -multi -co TFW=TRUE -wo NUM_THREADS=ALL_CPUS "%mypath_import%!infile!" "%mypath_rasterUTM%!outfile!"

Ergo, I get a lot of new TIFFs and the process needs a lot of time. Is there a way to just reproject the .tfw into UTM coordinates? I think it's quite a waste of processing power/disk space to create a whole new TIFF!


texts: Why does running the SAGA Upslope Area tool in QGIS result in a 0 (zero) to 0 (zero) histogram and an all black layer?

texts:
I am using QGIS in order to delineate a watershed, and am using 1/3 arcsecond DEMs.  I have created a Filled DEM using the SAGA Fill Sinks xxl (Wang & Liu) tool.  Next I ran the SAGA Channels and Drainage Basins tool, where the Channels were the only useful result.  From here, using the Coordinate Capture plugin I was able to exact a coordinate point on the most downstream part of the channel (or river in this case) that I am trying to create the watershed of.

From here, I ran the SAGA Upslope Area tool using the Filled DEM raster and the (x,y) coordinate I just captured.  The resulting layer that I created, however, was all black and the histogram distribution is min=0 and max=0.  Why does this Upslope Area Layer not give me a result in which the min = 0 and the max = 100 and the resulting layer shows me the Upslope portion above that point in white and everything else in black?

What would the sources of my problems be? How do I fix them?


texts: Spatial Downscaling of global temperature in R?

texts:
I am interested in spatial downscaling of global temperature to grid cell.

What I have is a vector of future annual global temperature values which I would like to downscale to (hopefully) 0.5°.

Is this possible in R?

year  Temperature
2016  0.8630774
2017  0.8924077
2018  0.9221504
2019  0.9522887
2020  0.982807
2021  1.013691

I have read about the gstat, spataEco, and gdalUtils packages for statistical downscaling using regressions.

Could someone guide/provide me with an example of downscaling the global data to a finer scale using covariates such as altitude, slope, aspect etc?


texts: Selection by location: select what is at the left of another layer

texts: I would like to know if there is a way to select the part of a layer that is located at the left (or at the west) of another layer. I thought it would work with select by location, but I don't know how to do it.


texts: QGIS 3.6 composer set to extent of map view map?

texts:
I can't find the option to set my map composer to the extent of the map view map in QGIS 3.6 as I could in QGIS 2.x version.

Is there some way to set this option in 3.6 version?


texts: Disabling appending of WMS parameters in geting legendurl image?

texts:
I used QGIS WMS to connect to our image server but it is displaying an error:

  Returned legend is flawed

Our image sever is using our own image render protocol in legendurl to display image:

However, QGIS is appending/overloading WMS parameters to the legendurl for the GetGraphicLegend. Is there a way to disable the WMS parameters overloading in QGIS.


texts: Weird (longer) route from using cost_s as cost in pgRouting?

texts:
I am currently developing application that want to use the fastest time to arrive as parameter for the routing. And i know that pgRouting has 'cost_s' column which calculated from length_m and maxspeed column. The algorithm i use on my application is A*, and i import the osm file with osm2pgrouting.
I can implement the parameter on the algorithm, but i think the result is weird, here's the normal result with cost column as cost:

The code i use is this:

SELECT a.seq AS seq, b.gid AS gid, b.name AS name, a.cost AS cost, b.the_geom AS geom, b.source, b.target, b.x1 AS x, b.y1 AS y FROM pgr_astar('
    SELECT gid::integer AS id,
         source::integer,
         target::integer,
         cost::double precision AS cost,
         reverse_cost::double precision AS reverse_cost,
         x1, y1, x2, y2
        FROM ways',
    116452, 60644, true, true) AS a LEFT JOIN ways AS b ON (a.id2 = b.gid) ORDER BY a.seq;

And here's the route from using cost_s column as cost parameter:

The code i use is this:

SELECT a.seq AS seq, b.gid AS gid, b.name AS name, a.cost AS cost, b.the_geom AS geom, b.source, b.target, b.x1 AS x, b.y1 AS y FROM pgr_astar('
    SELECT gid::integer AS id,
         source::integer,
         target::integer,
         cost_s::double precision AS cost,
         reverse_cost::double precision AS reverse_cost,
         x1, y1, x2, y2
        FROM ways',
    116452, 60644, true, true) AS a LEFT JOIN ways AS b ON (a.id2 = b.gid) ORDER BY a.seq;

How can be the route with cost_s parameter(which using shorter time to arrive) take farther/longer route than the normal cost route?


texts: Possibility of changing the rulers positions in QGIS layout?

texts: Is there any possibility of swapping the rulers in the QGIS-Layout section in a way that my zero point would be located in the bottom left of my screen? Maybe it would feel a bit easier to set my guidelines when calculating where to put them.


texts: Defining and Projecting .asc raster files while maintaining that file format?

texts:
I need to preprocess a large number of .asc raster files for use in a species distribution model. The model i am using has the requirements that the raster files used are projected into WGS84 and are of the .asc format. This is causing me a issue as the raster files i have need to be projected into BNG before they can be used in ArcGIS Desktop and because most of the tools in ArcGIS will convert a .asc to a Tiff which means i then have to convert it back at the end.

My current workflow is as follows:

Define the projection of the .asc files
Project to WGS
If this has changed the file type then convert back to a .asc

I am aiming to develop the workflow in ArcGIS Desktop to batch process all of the raster files.

What would be the most efficient (least number of processes/tools used) method to define and re-project the raster files while maintaining the .asc format?


texts: Display /Label number values of change in QGIS?

texts:
I have this map view with the difference of crime from one year to another which I created using the Field Calculator.
How can I add Values of change Labels to each part?
53% , 17% etc for each field so, one can see the change also in percent.


texts:
I'd like to have my map display in equirectangular mode rather than the default mercator. How can I do this? Here is my code:

<link rel = "stylesheet" href = "http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"/>


texts:
Does anyone know a function to determine if a Point exists within a polygon?

Edit: I'm using C# with ArcEngine10.


texts: How to calculate/record attachments' file names using Field Calculator?

texts:
I have a point feature class containing attachments corresponding to jpg files (sometime more than one jpg per feature).
I would like to use the "field calculator" to calculate/record a new field that would contain file paths or names of attachment files.
Does someone know how to do that?
I am new to Python and VB script...


texts: How to simplify a self intersected / self overlapped polyline using ArcObjects?

texts:
I have a self intersected polyline, how can I break it into 5 records stored in the same table using arcobjects? (splited by vertices and the intersection point)

Here is what I have got and it doesn't change a thing:

            IFeatureCursor mFeatureCursor = mFeatureClass.Search(null, false);
            IFeature lineFeature = mFeatureCursor.NextFeature();

            while (lineFeature != null)
            {
                IPolyline polyline = lineFeature.Shape as IPolyline;
                ITopologicalOperator2 topoop = polyline as ITopologicalOperator2;
                topoop.IsKnownSimple_2 = false;
                topoop.Simplify();
                lineFeature = mFeatureCursor.NextFeature();
            }


texts: Creating point at midpoint of polyline with ArcPy?

texts:
I have a polyline shapefile (that contains multiple lines) and am trying to create a point at the midpoint of each line using Python. I am currently using the ET Geowizards tool 'PolylineToPoints' which does exactly what I want it to... but I am trying to avoid using ET Geowizards (as it is causing other issues).

Is there a way to do this in Python using Arc tools and functions?


texts: QGIS map composer changing legend position when exporting atlas as images

texts:
I am having an issue when exporting atlas map series to image. In each map the position of the legend is jumping around by a few cm. I have the position referenced under item properties to the bottom right corner which I thought would mean the legend expands and contracts upward and left as the legend contents change between maps. Instead the whole legend seems to move around sometimes covering up other information.

Is this a known bug?


texts: Select by Attributes Where Clause how to get current date?

texts:
I am trying to build a where clause for a select by attributes operation in ArcGIS.  I have a feature class that has a date field that has dates in it.  I wish to construct a where clause that selects records from 65 years ago or more.  I want this to be generic, where the clause computes the 65 years from whatever today's date is without actually entering today's date.  In other words, I do NOT want to enter something for a where clause like this:

"date_field" >= date '1945-09-22'

I want to have a where clause like this:

"date_field" >= curdate() - 65 years

The problem is that I can't figure out how to write this where clause.  There is nothing in the ArcGIS documentation on composing where clauses with dates that includes obtaining the current date programmatically as opposed to entering a specific date.

Help?  Any input is appreciated.


texts: Error 'Invalid geography. Antipodal edge...' with Postgis

texts:
I have a table in postgis like this

CREATE TABLE locations (id int, name VARCHAR(255), pos geography(POINT, 4326));

with a couple of points. E.G.

INSERT INTO locations (name, pos) VALUES ('freiburg', ST_GeographyFromText('POINT(7.86 48.0)'));

But importing the table as a layer in Qgis results in multiple errors

Query: DECLARE qgisf0_0 BINARY CURSOR FOR SELECT
st_asbinary(st_force_2d("pos"::geometry),'NDR'),"id" FROM
"public"."locations" WHERE "pos" && st_makeenvelope(-180,-90,180,90,4326)
returned 7 [ERROR:  Invalid geography. Antipodal (180 degrees long) edge
(180 -90,180 90) detected, add a point between to make two edges that span
less than 180 degrees.]

and nothing gets drawn.

My QGis is 1.9.0, postgis 2.0.3


texts: Combining points into polygons with range of values using ST_ClusterDBSCAN and ST_ConvexHull

texts:
I tried to create polygons with similar depths based on values from point data.
I got some help to start with in this question Combining points into polygons with range of values using PostGIS
Since the data points is in wgs84 (4326) I set the max_distance to 0.003 in ST_ClusterDBSCAN(geom, 0.003 , 3). The problem is that I get many polygons that overlap each other, first I thought that this was a problem that could be solved by iterating over them and delete the overlap with ST_Difference. So I wrote a Python script and did this, but then I realized that it was both polygons with high and low depth values that overlapped.

Any idea how I can improve the generation of polygons from the data points or obtain a better result with the polygons that I got?


texts: How to surround a Polygon object with a corridor of specified width?

texts:
I'd like to build a corridor surrounding a polygon, so that the corridor's outer bounds all have the same distance to the inner bounds. Like this:

I've made this lousy graphic in Paint, since I don't even know how this operation is called. I hope you get the idea. To avoid confusion and misplaced suggestions: the outer polygon is NOT a scaled version of the inner. I know I need some transformation for this, I just don't know what kind of.

I'm implementing it in Python, I thought of shapely library, but I'm not sure if that's the one to do it, less so which method might be useful. Thanks in advance


texts: Integrate sidebar with Python generated Leaflet map?

texts:
I have this map: link

It was generated through Python code, not via JS directly. I want to add the Leaflet sidebar plugin within it, but it doesn't seem to work. As you can see in the github repo here, I followed the instructions, but the sidebar doesn't even seem to open. I feel this is because I used Python and not JS in the first place, thus the names of the variables are now different from those than the sidebar.

The original HTML file I got from Python was:

    <!DOCTYPE html>

        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.5.1/dist/leaflet.css"/>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>
        <link rel="stylesheet" href="https://rawcdn.githack.com/python-visualization/folium/master/folium/templates/leaflet.awesome.rotate.css"/>

                <meta name="viewport" content="width=device-width,
                    initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.fullscreen/1.4.2/Control.FullScreen.min.css"/>

        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.1.0/MarkerCluster.css"/>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.1.0/MarkerCluster.Default.css"/>

And the script of the map after the body. To make the sidebar, I added the links to stylesheets and scripts, downloaded those that were necessary and added in the script of the map, at the end, as the documentation stated:

 var sidebar = L.control.sidebar('sidebar').addTo(map);

I have tried everything, but I don't know anything about JS and something is clearly missing. What am I doing wrong?


texts:
I am working on a prototype for a web-based trip planner and need to have a geocoding function (for the start and destination adresses), up and running the "easy" way.

My area that the prototype is covering is apprx.2*4 sqkm. Which option is the fastest and easiest (to learn) as I have very limited time? I have been looking into gisgraphy (downloading and geocoding in the database), nominatim/Mapquest etc. I prefer not be constrained to use a specific map provider, like Google or yahoo.

However, if necessary it is possible to change geocoder later on... for now I need the "quick fix"

Thanx!


texts: Copying set of points perpendicular along polyline

texts:
I have a polyline which represents the middle of a river. Perpendicular to this polyline there is a layer with a set of points. These points all have an "X" and "Y" coordinates as well as a height relative to sea level and represent the profile of the river.

However, these points are only present at one point. I want to copy this set of points to multiple locations along my polyline so that I can interpolate these points and get a DEM to load into a simulation programme that needs river cross-sections as input.

How to copy the point layer perpendicular along the polyline given a set interval (e.g. a meter between each set of points is sufficient)?

The points are lying on the same line, but I think the visualisation of QGIS makes it look like they are not.


texts: Arcgis area solar calculation low value issue

texts:
The output from the arcgis area solar radiation tool for my DEM looks unrealistically low for instantaneous calculation. Here is the example 12PM and 6PM respectively.

The parameters for the run can be found here:

The subset of the dem used here in this example(8mb) can be found here

Although the shadow patterns looks realistic but the values are very unrealistic. Ideally the value should be around 1000 w/m2. Any help in interpreting the values of the ArcGIS output?


texts:
I've acquired an extensive collection of HDF5 files of Net Ecosystem Exchange data with daily temporal resolution. It seems that QGIS cannot open the file type by just dragging and dropping (while ArcGIS can).

One thing I tried was SAGA Mosaic Raster Layers with the following inputs

But this fails with the window, "Unable to Execute Algorithm," saying "Incorrect parameter value for GRIDS" which I believe refers to the input grids (the HDF5 files).

I've also tried an approach to convert HDF5 to TIFF with GDAL Translate, but it won't accept the HDF5 file.

What approach can I take? My ultimate goal with this is to aggregate the data into monthly by averaging the daily data.

Thanks!


texts:
I'm sure this is pretty basic, but is there a way to print a certain indexed portion of each segment in an array? For example, if I have the numpy array:

([1,2,3], [4,5,6], [7,8,9])

I'd like to print out 3,6,9.


texts: Global Mapper - .SP1 conversion to Shapefile

texts: Does anyone know how to convert an .SP1 file to an shapefile from Global Mapper to ArcView 10.1?  The .SP1 is a GPX file.


texts: Overlay the big map image with Google Maps API

texts:
I put the image on my website with overlay option in Google Maps API. But the map image which is overlayed is too big: 2.85 MB. I can't resize it, so I wonder is there an option to put it somewhere on my server, not some tinypic or similar servers because they resize it? I need direct link to the image.
Coding is:

var oldmap = new google.maps.GroundOverlay(
          "http://i39.tinypic.com/map.jpg",
       imageBounds);this:

I put tinypic link just for example.

Thank you.


texts: Dealing with negative buffers in ArcGIS Desktop when original polygon is narrower than buffer width?

texts:
I am having problems creating a negative 75m buffer with polygons which have regions narrower than 150m. To add some context, I have polygons which are created automatically out of enginnering data which are then defined as potential high-risk flooding areas. These geometries are notorious for their unwieldlyness. I have to use these Polygons in a 1:50000 scale map - but am not permitted to generalize...which is rather short-sighted. Below is a screenshot:

There are holes and very narrow areas making inside buffering impossible.

I need to buffer the polygons with a 62m buffer as we have a strict symbology guideline. My workaround was to convert the polygons to lines and buffer them. This works to a certain extent. The only problem is the line orientation. The Polygons need to be buffered inside. If I buffer lines I have to stipulate whether the line will be buffered to the left or right. This is not the same for each line and thus I have to work with each line individually to find out it's orientation.

Is there a workflow to somehow force the buffer to be produced and then dissolve and clip it with the original polygon outline?

I am using ArcGIS Desktop 10.6.


texts: How to reproject base layers in QGIS once OpenLayers layers are removed?

texts:
I recently discovered the wonders of the OpenStreetMap maps, however now all my projects have all gone curved.

Is there a way to go back to how they were set originally.

Opposite to this question:

How to reproject base layers in OpenLayers?

So basically how to reproject base layers once OpenLayers layers are removed.


texts: QGIS Python Script - Python.exe Stopped Working

texts:
I purchased this book called Building Mapping Applications with QGIS and I am trying to work through one of the exercises. There is one script that I try to run that crashes python, generating the error message "python.exe has stopped working".

import sys
import os
from qgis.core import *
from qgis.gui import *
from PyQt4.QtGui import *
from PyQt4.QtCore import Qt

#############################################################################

class MapViewer(QMainWindow):
    def __init__(self, shapefile):
        QMainWindow.__init__(self)
        self.setWindowTitle("Map Viewer")

        canvas = QgsMapCanvas()
        canvas.useImageToRender(False)
        canvas.setCanvasColor(Qt.white)
        canvas.show()

        layer = QgsVectorLayer(shapefile, "layer1", "ogr")
        if not layer.isValid():
            raise IOError("Invalid shapefile")

        QgsMapLayerRegistry.instance().addMapLayer(layer)
        canvas.setExtent(layer.extent())
        canvas.setLayerSet([QgsMapCanvasLayer(layer)])

        layout = QVBoxLayout()
        layout.addWidget(canvas)

        contents = QWidget()
        contents.setLayout(layout)
        self.setCentralWidget(contents)

#############################################################################

def main():
    """  Our main program.
    """
    QgsApplication.setPrefixPath(os.environ['QGIS_PREFIX'], True)
    QgsApplication.initQgis()

    app = QApplication(sys.argv)

    viewer = MapViewer("/path/to/shapefile.shp")
    viewer.show()

    app.exec_()

    QgsApplication.exitQgis()

#############################################################################

if __name__ == "__main__":
    main()

I don't know a whole lot about Python with QGIS so I'm not too sure what is causing python to crash. I am positive that all of the modules are importing correctly because if I define my paths and then import the modules in the script using the OSGeo4W Shell, there are no error messages.

This is how my paths are defined:

SET OSGEO4W_ROOT=C:\OSGeo4W64
SET QGIS_PREFIX=%OSGEO4W_ROOT%\apps\qgis
SET PATH=%PATH%;%QGIS_PREFIX%\bin
SET PYTHONPATH=%QGIS_PREFIX%\python;%PYTHONPATH%

Given all of this, I think there has to be something wrong in the script. However, when I check the script using http://pep8online.com/ there are no errors that I can fix that will result in python not crashing.


texts: What time it takes for Sentinel-2 images to be uploaded from source hub to Earth Engine?

texts: Is it possible to calculate a time it takes for Sentinel-2 image (i.e L1C) to be uploaded from source hub to Earth Engine servers? I guess 'system:time_start' is not an ingestion time but rather an image acquisition time


texts: Dividing polygons into equal sub-regions based on population using QGIS?

texts:
I'm using demographic data in California by census tract, and I'd like to be able to group those census tracts into 4 regions with an equal population in each region. Any recommendations for how to do this in QGIS?

I'd like to be able to do something like the process FelixIP takes in the answer to this question but I don't completely understand all of the steps: Grouping village points based on distance and population size using ArcGIS Desktop?

Any clarification to that answer as well?


texts: Choosing Projected Coordinate Sytem for Australia in ArcGIS Desktop?

texts:
I have a data from Australia which has the Geographic Coordinate System of GCS_GDA_1994 but has no Projection System.

I need to calculate (Geomerty) the area/length in part of my model but for that we need a Projected Coordinate Sytem.

The idea is to create a GP Tool in Portal out of it.

I have tried possible projections but I do not know which one is the correct one


texts: Calculating anisotropic cost distance using two cost surfaces (uphill and downhill costs) and a DEM

texts:
I have two cost surface rasters, one representing the costs of going either uphill or level and the other representing costs downhill. Using these plus a DEM and a vector layer for the source point, is there a way to calculate an anisotropic Cost Distance using ArcGIS Desktop?
In similar projects, I would typically use the Path Distance tool and a table for uphill and downhill costs but the costs vary by location and do not perfectly correlate with slope values.


texts: pyqgis Python API work together with arcpy Python API in the same standalone script

texts:
I create a simple bat file to create standalone scripts using pyqgis.
and that bat work nice .

I follow this manual
now I want to use and arcpy together in the some script but I don't know how to define correct paths for the arcpy to work together with pyqgis Python api.

Any idea how to do this with this bat file ?

Practical is two different pythonpaths can i work together ?

I have windows 10 and ArcGIS 10.5.

Here the bat for pyqgis API:

set OSGEO4W_ROOT=C:\PROGRA~2\QUANTU~1
call “%OSGEO4W_ROOT%“\bin\o4w_env.bat
call “%OSGEO4W_ROOT%“\apps\grass\grass-6.4.2\etc\env.bat
set GDAL_DRIVER_PATH=%OSGEO4W_ROOT%\bin\gdalplugins\1.9
path %PATH%;%OSGEO4W_ROOT%\apps\qgis\bin
path %PATH%;%OSGEO4W_ROOT%\apps\grass\grass-6.4.2\lib
path %PATH%;”%OSGEO4W_ROOT%\apps\Python27\Scripts\”
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis\python;
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\Python27\Lib\site-packages
set QGISPATH=%OSGEO4W_ROOT%\apps\qgis
start "PyCharm aware of QGIS" /B %PYCHARM% %*


texts: Working with polygons defined in the map window on Google EE

texts:
I am starting out in Google Earth Engine though I have familiarity with QGIS and Google Earth and GIS in general; coding is definitely the weak point for me.

When I define a polygon in the map window using geometry imports > new layer, what is the easiest way to get those coordinates - or in general, the layer, into a ee.Geometry.Polygon([]) type statement in the script editor window?   I also notice that so far I have not been able to get those polygons to behave as assets - is there a way to do that too so that they show up in my assets tab?  I have the sense that this is probably very easy or I am not approaching the problem in the right way, however I feel the map window is such an easy way to interact with the code that I feel there must be an easy way.

Ok, now I see that the layer is automatically defined in the var section at the header of the script above.  But it still might be nice to know if I can move those features or feature collections into the Assets tab of the Google EE console at left?


texts: List of features and layers based on edit date in ArcMap

texts:
I regularly update our GIS data using ArcMap to improve its accuracy, and due to our schema this involves editing multiple features across multiple layers.
Is there a way to extract a list of the updated features across multiple layers and export the list as say a spreadsheet?
The reason is that after I edit the data, other users need to update other aspects of our system to match as this is not done automatically (eg asset management software). Ideally I would obtain a spreadsheet that comprised the following columns:

Layer Name
OBJECTID
Attributes changed (not essential, but wishlist)

The feature tables generally include an OBJECTID and last edited date and time.  Ideally I could generate a list for all edits on a given day and user


texts: What formula does SQL Server 2008 use in STDistance?

texts:
I am analyzing the accuracy of the STDistance function for geographical objects in SQL Server 2008, in order to understand its behaviour better I need to find the underlying formula.

Does anyone knows which formula is used in SQL Server, haversine?


texts: producing a bathymetric map in qgis with limited depths measurements

texts:
i am new to your community and hope you to find tips on how to work with the following project.

i want to produce a bathemetric map (depths profile) of a water area. I do have aerial images and 3 cross sections with depth measurements.
at first i would like to "connect" the depth lines to receive contour lines as used in mapping elevation and form there on estimate the depth at places where no measurements are taken. i do really have an idea on how to start as i only have done some remote sensing before.
Please ask if i have not described it accurately enough.
Does anyone have suggestions on how to tackle this?

much thanks in advance!


texts:
I'm trying to restrict Extent to a map in 3857.  This seems like it should be very simple, but required me to write a BBOX function for my very vanilla OSM basemap example.  I've provided the code here: http://jsfiddle.net/4Jv4m/

Can someone tell me why there is still whitespace on the top/bottom of the map when you drag the map?  Just try dragging it up and down and you will see some whitespace.

I realize that transforming -180, -90 goes to -Infinity, but still I've no way to limit the extent to the world without possibly 'hardcoding' the 3857 compliant XY coordinates.  This is not an option as most GetCapability documents work in 4326 lat/lon, so I'd like my transformation function to correctly handle this scenario.


texts: Adding new field and calculating in PyQGIS

texts:
I'm trying to write a script using QGIS 3.4. What I want to achieve is an Excel-style calculation where I can create a new field "field2" and calculate the difference between a current and previous row of an existing field "field1".

However, I'm stuck at the first step which is creating the new field. Attached my sample code below. The first part is how I generated my layer from an interpolation process.

    # Interpolate
        mem_layer = QgsVectorLayer("Point?crs="+vlayer.sourceCrs().authid(), 'point', 'memory')
        mem_layer.startEditing()
        fields = [field for field in csvlayer.fields()]
        prov = mem_layer.dataProvider()
        prov.addAttributes(fields)
        mem_layer.updateFields()

        chainageIdx = csvlayer.fields().indexFromName(chainage_field)

        for line in vlayer.getFeatures():
            for feat in csvlayer.getFeatures():
                new_feat = QgsFeature()
                attrs = feat.attributes()
                new_feat.setGeometry(line.geometry().interpolate(float(attrs[chainageIdx])))
                new_feat.setAttributes(attrs)
                mem_layer.addFeatures([new_feat])
        mem_layer.commitChanges()

    # Calc 1
        mem_layer.startEditing()
        datetimeField = QgsField('DateTime', QVariant.Double)
        prov = mem_layer.dataProvider()
        prov.addAttributes([datetimeField])
        mem_layer.updateFields()
        fields.append(datetimeField)

        newdatetimeIdx = mem_layer.fields().indexFromName('DateTime')

        for feat in mem_layer.getFeatures():
            #mem_layer.changeAttributeValue(feat.id(),newdatetimeIdx, 1)
            feat.setAttribute(newdatetimeIdx, 1.0)
            mem_layer.updateFeature(feat)
        mem_layer.commitChanges()

    # Output
        (sink_points, dest_id_points) = self.parameterAsSink(
            parameters,
            self.OUTPOINTS,
            context,
            fields,
            QgsWkbTypes.Point,
            vlayer.sourceCrs()
        )
        features = mem_layer.getFeatures()
        for current, feature in enumerate(features):
            # Stop the algorithm if cancel button has been clicked
            if feedback.isCanceled():
                break
            # Add a feature in the sink
            sink_points.addFeature(feature, QgsFeatureSink.FastInsert)
            # Update the progress bar
            feedback.setProgress(int(current * total))

When I try to run this, I get a KeyError: '2' message which suggests that the field was not created hence it couldn't write the test value.


texts:
I have several geoTIFFs that I want to sum by band (6 different bands) but I can not access to the values to sum them.

I open the geoTIFF:

# work with raster data
library(raster)
# export GeoTIFFs and other core GIS functions
library(rgdal)

# Use stack function to read in all bands
data <- stack("2012-01-23.tif")

# view raster attributes
data@layers

# view attributes for one band
data[[1]]

Then I see only this information:

[[1]]
class       : RasterLayer
band        : 1  (of  6  bands)
dimensions  : 1800, 3600, 6480000  (nrow, ncol, ncell)
resolution  : 0.1, 0.1  (x, y)
extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
data source : C:\1. Documentos\2012-01-23.tif
names       : X2012.01.23.1

and I do not know how to access to the values inside each band. In some examples I have notice that after names there is another variable called values, but I do not have it.


texts:
See the bug I posted at GDAL for details and a sample image.

In summary I used the QGIS georeferencer plugin to georeference a plain image file, then use gdal2tiles on it but I get an error. I took the georeference plugin out of the picture and still get the same error. Is there something wrong with the commands?

gdal_translate -of GTiff -gcp 4461.4 1584.9 -75.8 45.45 -gcp 1415.4 1218.3 -75.95 45.52 -gcp 2279.6 353.9 -75.88 45.53 -gcp 3755.7 104.89 -75.80 45.52 original_rgb.png temp.tif

gdalwarp -t_srs EPSG:3857 temp.tif out.tif
gdal2tiles.py -z 11 out.tif tiles

If instead of the last line I use gdal2tiles.py -s EPSG:4326 -z 11 out.tif tiles, it works fine and the tiles are in the right place.


texts:
I have a problem when using some geoprocessing tools in ArcGIS 10.2, such as "Merge". The message that appears is an error has occurred in the script on this page. I've seen this is a quite common error, but I've tried all the options I've seen on different blogs and StackExchange answer and nothing has worked.

Things I've tried so far:

Establishing Internet Explorer as the default browser.
Establishing Microsoft Edge as the default browser.
Replacing the "Stylesheet" folder´s files as indicated on this link https://support.esri.com/en/technical-article/000011008
Repairing ArcGIS through the Desinstallation Procedure, but at some point this message appears -see pictures- (and can´t find this file) so I can´t continue.

Any suggestions?


texts: changing order of layers in legend interface " QGIS 2.6" as using layerTreeCanvasBridge() gives attribute error

texts: Want to bring the active layer to top of the legend interface layer list.


texts: Change polygon color on click with Mapbox

texts:
I have a gray layer to display multiple polygons on the Mapbox map. I'm attempting to change the color of only one of them when the user clicks on it to display the "selected" the polygon. I don't want interaction, that's why I'm not using the Draw library, just to show the selected polygon.

Is there any way to do it in just one layer?? I tried adding a boolean property called "selected" to each polygon property, but I didn't achieve to update the layer.

// Define polygons with properties
var features = [];
areas.forEach(area => features.push(turf.polygon(area.polygon, { id_area: area.id_area, name: area.name, selected: 'false' })));
features = turf.featureCollection(features);

map.on('load', function () {
    // Add polygons to map
    map.addSource('areas', {
        'type': 'geojson',
        'data': features
    });
    // Layer settings
    map.addLayer({
        'id': 'polygons',
        'type': 'fill',
        'source': 'areas',
        'paint': {
            'fill-color': [
                'match',
                ['get', 'selected'],
                'true', '#64bdbb', // if selected true, paint in blue
                '#888888' // else paint in gray
            ],
            'fill-opacity': 0.4
        },
        'filter': ['==', '$type', 'Polygon']]
    });
});
// Click on polygon
map.on('click', 'polygons', function (e) {
    if(e.features.length) {
        var feature = e.features[0];
        if (feature.properties.id_area == id) {
            feature.properties.selected = 'true';
        } else {
            feature.properties.selected = 'false';
        }

        // How can I update the layer here to repaint polygons????

    }
});


texts: Open source alternative to Linkage Mapper & ArcGIS

texts:
I'd like to calculate least cost paths between fragments using a cost raster I created based on habitat suitability values.

I saw that most people use Linkage Mapper, but I don't have access to ArcGIS.
I also saw the gdistance function, but it is based on a DEM and I'd rather use my cost layer.

Is there an open source alternative to Linkage Mapper? Or can it be used without ArcGIS?


texts:
I'm using MapInfo 15.2 64-bit and I am trying to connect a PostGIS database to display it in MapInfo. I am using PostgreSQL 9.5 with PostGIS 2.2.2. I have seen all kind of suggestions on different forums recommending to use EasyLoader to create a map catalog to be able to make the DB tables mappable.

If I connect to the DBMS using directly OPEN DBMS function, I am able to view the tables within a browser, as they do not have a map catalog created yet, but the main important thing is that I am able to connect to the database. OPEN DBMS function recognizes the PostgreSQL ODBC Driver(ANSI) driver.

If I try to connect to the database using EasyLoader, the PostgreSQL ODBC Driver(ANSI) driver doesn't show up as an option to create a new data source.

Is there an software incompatibility that doesn't allow EasyLoader to view the PostgreSQL ODBC Driver(ANSI) driver?


texts: sDNA preparation network preparation fails

texts:
sDNA always fails when I run prepare network or integral analysis with a bit larger network system. I have to keep the model very small to complete process successfully.

How could I solve this?


texts: How do you update the maxFeatures setting of a WFS layer in OpenLayers

texts:
I have a WFS layer which a protocol in the definition. The protocol states that the maxFeatures returned should be 1 to avoid downloading a large amount of data.

I can update the value for maxFeatures using layer.protocol.maxFeatures and this registers as updating successfully but when I then call a layer.refress({force:true}); command the actual WFS request still appears to be limited to 1.

Is there a good example of how to modify a WFS protocol using javascript once the layer has already been loaded into the map?

Many thanks


texts: Clustering raster based on area of specific number of pixels

texts:
I'm currently looking at overflows of rainwater in a region and I want to find all the puddles, which have a restricted size and a minimum number of pixels in them and create a vector layer where each puddle has its own polygon.

I want to define the size of puddles from the raster layer and have determined that the minimum size of each polygon should be fx. 160 pixels.

My issue is that I can't just create a vector layer based on my raster layer for rainwater, since this results in one big polygon, due to roads cutting through the area, and I'm not interested in these.

I thought about creating a grid layer and count number of rasters within each grid, but this could potentially result in a number of puddles being undetected since the grid could cut through a puddle.

Is there another way to define a polygon size based on a clustering of raster data?


texts:
In leaflet what are the tools that are best for pop ups or other options such as enhanced click through and animation?

I would like to have multiple sets of data displayed as pop ups and then I would also like to have an option of a side bar to display more information once I click on a button with the pop up? I have tried using Jquery to do this but unsuccessful. Any ideas on how to achieve this?


texts:
my company is considering switching from using Bing Maps to an open data source mapping option like MapBox. We are also looking into options like Google Maps.

My only question is what the quality of data is like for OpenStreetMaps. Its hard to jump around maps and check for this. I have done a little of this and have seen places where it appears OpenStreetMaps has better data and vice versa, however this is a very small sample.

Does anyone have a good general view of how the data quality compares between OpenStreetMaps and options like Google or Nokia?

Thanks


texts: Shp is not valid or recognized data source, QGIS 3.10

texts:
I worked on this layer last night, and today I can't open it. This layer was linked to an excel spreadsheet. And perhaps even more interesting, I duplicated this layer and stylized it into a different theme. This layer was stored on external flash drive.

I will upload this layer:

https://www.mediafire.com/file/zr7cmcpxgdu3ype/GB.rar/file


texts: Preserving style when producing web maps with the QGIS qgis2web plugin

texts:
I used the qgis2web plugin to generate a set of static HTML files out of my QGIS project. This is how my layers look in QGIS:

So, there is only one layer of points and a basemap.

Very easily I converted this to a set of HTML files using qgis2web. Here is how the structure of the directory with its produced files looks like:

│   index.html
│
├───layers
│       layers.js
│       Supermarkets.js
│
├───resources
│       Autolinker.min.js
│       ol.css
│       ol.js
│       ol3-layerswitcher.css
│       ol3-layerswitcher.js
│
└───styles
        Supermarkets_style.js

Opening the index.html on a browser displays this good looking map:

The map has retained some parts from the style defined in QGIS such as the color of the points and the labels, but it has lost the graduated symbols of the points as you can see - the point circles have all the same size in the HTML page.

So, the question is obvious: Does anyone know how to preserve this part of the styling when producing web maps with the qgis2web?

Maybe by appending a SLD style file to some javascript code? If yes, where and how do I do that?


texts: How to show a 2.5D surface of raster above terrain layer in Cesium?

texts:
I'm developing an web application that will show surfaces of rasters and terrain. These rasters are on GeoTiff format. I learned from example cesium can show image overlays earth surface.

The question is: How to drape a GeoTiff on elevation value provided by its pixel (like the render way of terrain layer) ? Is it possible to add a constant elevation offset to this layer above terrain layer in Cesium ?


texts: QGIS _Distance from point to polygon- doubt

texts:
I want to calculate the distance between a shp of points and a shp with a few polygons.
I am using MMQGIS (Hub distances), a UTM coordinate system, and everything works fine, but I think it is giving me the distance from each point to the center of each polygon and, since the shp of the polygon represents water courses, I would like to obtain the distance of each point to the "surface" of the polygon.

Because there are points very close to the water but the distance I obtain is very far way.

Here:

The yellow polygon represents almost the whole river, and there are points very cloe to the river but the distance I obtain is, for instance, 5 km.

How do I do solve this?


texts:
I have a client asking to develop a system which provides API to consume data from their POI, PA and MPA datasets (in shapefile).

Essentially more like the existing Google Maps or HERE Map API which provides endpoints for users to get information like road speed limit, shop information, postal boundary, property prices, etc.

So for example, if a user wants to get all the speed limit information from point A to B, the API would return the result back to the user with JSON.

What are my options to do this?

Should I develop the system from scratch by maybe converting the shapefile to GeoJSON and then develop the API, or is there any opensource/paid solution already made that perhaps I can just upload the shapefiles, define which data is searchable and define the response template?


texts: How to get the selected value in a value map with Function Editor in QGIS 3.0.2?

texts:
I'm trying to automatically ("on-the-fly") add values to a value map widget depending on the value selected from another value map widget by using the Function editor in Expression dialog in the Layer properties - Attributes Form.

--- UPDATE (included 3 more images):

First, the user select a Livsmiljø from a value map (combo box/drop down list called LIVSMILJO), secondly he/she chooses Kalkinnhold from another value map (combo box/drop down list called KALKINNH).

I've managed to add values to the value map of the field (attribute) called 'KALKINNH' with this code (based on How to create predefined values in a field in PyQGIS):

from qgis.core import *
from qgis.gui import *
from qgis.utils import iface
from PyQt5.QtCore import *

@qgsfunction(args='auto', group='Custom')
def kalkinnhold(feature, parent):
    layer = qgis.utils.iface.activeLayer()
    fieldIndex = layer.fields().indexFromName( 'KALKINNH' )
    editor_widget_setup = QgsEditorWidgetSetup( 'ValueMap', {
                         'map': {u'hei': u'a',
                                 u'morna': u'b'}
                        }
                      )
    layer.setEditorWidgetSetup( fieldIndex, editor_widget_setup )

Now I'm trying to add an if condition (if the value map 'LIVSMILJO' is set to 1 then the 'KALKINNH' value map should have these values, else 'KALKINNH' should be populated with some other values).
Sadly, I'm not able to figure out how to do this.

from qgis.core import *
from qgis.gui import *
from qgis.utils import iface
from PyQt5.QtCore import *

@qgsfunction(args='auto', group='Custom')
def kalkinnhold(feature, parent):
    layer = qgis.utils.iface.activeLayer()
    fieldIndex = layer.fields().indexFromName( 'KALKINNH' )
    kjell = layer.dataProvider().fieldNameIndex('LIVSMILJO')
    if kjell == 1:
        editor_widget_setup = QgsEditorWidgetSetup( 'ValueMap', {
                         'map': {u'hei': u'a',
                                 u'morna': u'b'}
                        }
                      )
    elif kjell != 1:
        editor_widget_setup = QgsEditorWidgetSetup( 'ValueMap', {
                         'map': {u'spink': u'c',
                                 u'datt': u'd'}
                        }
                      )
    layer.setEditorWidgetSetup( fieldIndex, editor_widget_setup )

I've have tried different variants of if kjell == 1: and if kjell.currentValue() == 1:. The first alternative I believe just gives me the index (as an integer) of the 'LIVSMILJO' attribute (and not the actual value set in 'LIVSMILJO'). That's why I in the second alternative add currentValue(), but this fail since "'int' object has no attribute 'currentValue'".

Fair enough, but is there a way of getting the current value (chosen item) of the value map 'LIVSMILJO'? And in that way decide the content of another value map on-the-fly?


texts: Geoserver getfeatureinfo returns big number with exponential format

texts:
I have a Geoserver layer, which contains numbers on a million scale in one of the attributes.

If I query these features, I get back a number in this format: 4.1E7 instead of this: 410000000

Is there a workaround or setting for this?

I use PostgreSQL 9.3 as a backend, and it is a Geoserver 2.4.2.


texts:
I use QGIS 2.18.5 and I get in stuck with two polygons I cannot solve.

I want to make a new polygon from these two which looks like this:

I made thew new one:
Cut 1 polygon and paste to other layer. Used polygon to lines toolbox then explode lines, then deleted the lines which do not needed then used the add feature to connect lines. Last I dissolve new lines then convert lines to polygons. The new polygon looks like that I wanted to get in QGIS but when I use wayline converter which convert polygons to my tractor GPS it is only shows one polygon:

What could be the problem?

Look I deleted the line I do not need.

When I select Vertex Tool it appears the line I deleted earlier.

I think this is the main problem but I do not know how to remote it well..

I found it but is is not the result I wanted to get. :D
Look I want to this from 2 Polygons: I want that new polygons that is circled with red:

After used the Minimum Bounding as Minimum Oriented Rectangle I got this:


texts: Can I change the font type in all Text_Elements in a page?

texts:
I want to change all the font styles in a number of mxd's from "Lucinda Sans" or whatever the current one is to "Arial" without changing the font size.

I wrote a simple script to find/replace text but can't figure out how to change the font except by adding html code as in the example below (see image as well). But this doesn't change the root font and also I want it to change the font of all text strings in the Text and Legend elements. No need to search/replace any text.

Thanks in advance. Screen capture and Code are below

import os, arcpy, arcpy.mapping
oldText = arcpy.GetParameterAsText(0)
newText = arcpy.GetParameterAsText(1)
pdf = arcpy.GetParameterAsText(2)
mxd=arcpy.mapping.MapDocument("Current")

# Loop through each text element in the map document
for textElement in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"):

    # Check if the text element contains the out of date text
    if textElement.text == oldText:

    # If out of date text is found, replace it with the new text
        textElement.text = '<FNT name="Arial">' + newText + '</FNT>'

#while PDF = 1:
# Export the updated map to a PDF
#path = r'P:\2011\Job_031_TownPlanning_SeriesProduction\Working\draft_output\esri\2\wetland\'
#arcpy.mapping.ExportToPDF(mxd, newText + "-TownPlanning_Wetlands_Overlay_Ver2.pdf")

#arcpy.mapping.ExportToJPEG(mxd, outFile)
#outFile = newText + df.name + ".pdf"

# Clean up the MapDocument object by deleting it
del mxd

arcpy.RefreshActiveView()
arcpy.RefreshTOC()


texts: How should I read this file format in QGIS?

texts:
I would like to read text files with this structure:

FileHeader "WWW Object Text","Coordinate Document"
begin
    FileInfo "Application","XXX"
    FileInfo "SerialNo","XXXX"
    FileInfo "Author","xxxx"
    FileInfo "Company","xxxx"
    FileInfo "Description",
    FileInfo "Coordinate System","ZZZZZ"
end
PointList
begin
    Point "1",6619195.566,139583.0563,17.3598,"227",,
    Point "2",6619195.1951,139583.12,16.7636,"228",,
    Point "3.1CUL",6618174.0649,141818.0054,17.3889,"612",,
    Point "3.2CUL",6618176.6504,141817.6756,17.4405,"612",,
end
LineList
AttributeList

It seems simple, but I have not figured it out how to read it with Add delimited text layer. Does it belong to a known format?


texts:
I have several .lyr files (from an external organisation) which have different features specific to the shapefile the layer file was made for. I have combined the shapefiles and would now like to combine the layer files so that I have all the styles for all the features in the combined shapefile. I am struggling to find a away to do this, so I was wondering if anyone knows if this is possible?

I've found that by grouping layers, you can export a grouped layer, but that is not ideal, but might have to be my solution.


texts: Data Driven Pages, displaying each polygon within a ddp?

texts:
I have DDP index, and within each index several sets of polygons from another layer.For each index I would like to display each polygon within that index and export that to a PDF. I can pan to DDP index and set a constant scale in this case 1:24k.  I would like to use the index page for my extent and then for each polygon within that extent export a PDF only showing one polygon. An arcpy.mapping solution seems to be the best option.  as a page definition query seems to be limited to one query per index without much control of what is going to go into the query, other than the page index number.

Below is an illustration:

In this example 019 purple with grey boarders is the index,  I want to maintain the extent of the index and export a map for each blue polygon(10 and 1) which is stored in another layer


texts: Does ETRS89 and UTM use the same zone (longitude and latitude)?

texts:
I'm building an app for the european country Denmark exclusively and I need to retrieve some geospatial data from a (geo)server.

I'm currently trying to determine whether UTM and ETRS89 uses the same zone (lng, lat) or if it varies in Denmark especially?

An example for a UTM Zone for Denmark would be: 32U


texts: How to create one random point per grid cell? (i.e., systematic sampling with randomly placed points)

texts:
Using ArcMap, I have used the Fishnet tool to create a grid of 1km squares. I am looking to create random points so that there is one (randomly placed) point per grid cell, with a minimum distance of 150m between points. (for reference, see "Systematic Sampling with Random Point Placement about halfway down at http://www.quantdec.com/sample/ )

I understand I can use the Fishnet tool to place points in the center of the cells; however, I am looking for a random point distribution, with the only constraints being the minimum distance between and points limited to 1 per cell.

Also, there is a a layer with which I would like the points to overlap with. Once the points are generated, I know I can use the Intersect Tool to ensure the points remaining intersect with this layer; however, I am hoping to create as many points as possible and a lot of non-intersecting points will be lost if I do this.

To give you an idea, here is an image of a small area of what I am working with


texts: Seeking Python tools/modules/add-ins for GIS?

texts:
With ArcGIS 10, Python has become the de-facto scripting language for ESRI. While leading Open source software like QGIS, GeoServer, PostGIS all supports Python. Thus it became important to know/learn Python for GIS developers a well as users.

Can anybody make a list of such tools/modules/add-ins in Python that are crucial in GIS?


texts: Options for Bulk Download of Satellite Imagery

texts:
I am looking for some sources of Satellite imagery that I can bulk-download for offline use with mobile apps. I am willing to pay, but so far I am not finding any good solutions out there.

Something similar to Google Satellite image tiles.

Looking for providers that provide tile URLs in a format like the following:

http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg

Does anyone have any good providers out there for this sort of requirement?