texts:
I am a beginner in this field.
I am working with PostgreSQL, Qgis, and Q-field to collect data on the field.
As you know, I am searching for methods to keep security my database when I open a firewall to connect Qfield database on my phone to the PostgreSQL server.
If we connect the PostgreSQL database to Qgis has SSL, after that package Qgis project by Q-field plugin and send it to mobile. Is it work? Because I don't see any document talk about OpenSSL on mobile.
I see everyone prioritize choosing SSL. I also see other methods as password enhancement and configure settings with specific IP, but as you know, when I go to the field, I use 4g on my phone, this IP always changes every day.
So I want to know are there other methods to help security databases when opening a firewall to connect Q-field and PostgreSQL?


texts:
Does anyone have experience loading the pre-joined TIGER shape files and ACS 5 year data files by block group into CartoDB?

I have downloaded the data from http://www.census.gov/geo/maps-data/data/tiger-data.html by the 2007-2011 block group data, but the zip file isn't recognized in CartoDB.


texts: Listing feature names as attribute within polygon using QGIS?

texts:
I have a number of polylines in QGIS that correspond to seismic SEGY files, and want to subset the dataset using a box/polygon that I make in QGIS. Is it possible to get the feature names that are within the extent of the polygon?

Here is a picture of what I mean:

I would like to get a list or attribute of the linenames of all the features contained within the extent of that box.


texts: Using external IDE eclipse to develop python plugin for QGIS?

texts:
I am new to QGIS and coding for QGIS, but I have experience with C++ and Qt. I am reading the book "Python Programming CookBook" to learn how to develop a plugin to QGIS, however I am facing some problems with the setup of IDE eclipse as external editor to QGIS. I installed the plugin "script runner" on QGIS to run the eclipse editor. Until here it's working fine.

In the following steps from "QGIS Python Programming CookBook" it says to add pyqgis interpreter to eclipse as below:

Steps from the book:

1.Open Eclipse.

2.From the Window menu, select Preferences. On OS X, you must click on the Eclipse menu to find the preferences menu.

3.In the pane on the left-hand side of the Preferences window, click on the plus sign next to PyDev.

4.From the list of PyDev preferences, select Interpreter Python.

5.In the pane labelled Python Interpreters, click on the New button.

6.In the Select interpreter dialog, name the interpreter PyQGIS.

7.Browse to the location of the QGIS Python interpreter called python.exe within the bin folder of the QGIS program folder.

When you click on the OK button, Eclipse will attempt to automatically add every Python library it finds to the Python path for this interpreter configuration. We need to control which libraries are added to prevent conflicts. Click on the Deselect All button and then click on OK:

When I click OK button it gives this error:

"See error log for details. No output was in the standard output when trying to create the interpreter info for: C:\Program Files\QGIS Essen\bin\python.exe The error output contains:>>ImportError: No module named site <<"

I think that the objective of this feature is to facilitate the coding of python into QGIS program, because the author says:

"The Eclipse IDE with the PyDev plugin is cross-platform, has advanced debugging tools, and is free. This tool makes an excellent PyQGIS IDE. Eclipse allows you to have multiple Python interpreters configured for different Python environments. When you install PyDev, it automatically finds the installed system Python installations. On Windows, you must also add the Python interpreter installed with PyQGIS. On all platforms, you must tell PyDev where the PyQGIS libraries are"

That part of bold is exactly what I a having being try to do.


texts: PostGIS: create new polygons in between existing?

texts:
PostgreSQL: I have a PostGIS multipolygon table containing millions of features. It covers 95% of the country, however there are gaps between individual polygons. How can I fill these gaps with new polygons? Preserving and not changing the existing features.
See image below. I'd want to fill in that gap in the middle. And all the slithers and smaller polys on the right (potentially ignoring very small polys below an area of Xm2). Afterwards I can dice the shape up for better performance if it's too big.

note: these empty areas may very well extend all the way to the coast. I'd need to use the outline of the country to restrict this operation. I don't need new polygons appearing over the sea!
EDIT:
So the blue polys below are the shapes I'd like to create in this example


texts:
I have a created a simple model in ArcGIS ModelBuilder. It works fine, however, I have problems saving the resulting files with appropriate names.

I iterate over 150 feature classes and sent them into another model that clips them with 20 buffers. Thus, the desired result would be to have 150*20 = 3000 features with unique names.

My problem: I was not able to figure out how to bring in both iterators when it comes to saving the files. In the second model (that returns the final, clipped features and saves them), I added %name% to the filename, which works well and iterates over the 20 buffers. Unfortunately, this happens for all 150 input feature classes.

Thus, I'm left with 20 files that keep getting overwritten instead of 1500 files with proper naming.

Long story short: Is there a way to add the iterator from the first model to the resulting file name?


texts: Tool to only keep POIs X kms from a route?

texts:
Archie's Campings offers a pretty thorough list of campsites in Europe.

Problem is, files are only country-size, so the number of waypoints is overwhelming (Here's the UK for instance).

To plan bike tours, I'd like to merge 1) a route from a GPX file, and 2) a filtered Archie's list to only keep campsites that are 5 kms from the route.

Is there a user-accessible tool that can do this, preferably Windows?

--

Edit: After importing the two GPX files through Vector > GPS > GPS Tools, here's what the screen looks like:

When I try merging the six items from the left through Vector > Data Management Tools > Merge vector layers, selected the layers, and hit Run, QGIS says All layers must have same geometry type!"

Edit: Here's what I get after 1) importing the two GPX files through Vector > GPS, 2) saving the waypoint item as an ESRI Shapefile and the track item also as an ESRI Shapefile, 3) selecting the new track item Shapefile and choosing Vector > Geoprocessing Tools > Fixed distance buffer, and 4) choosing Vector > Spatial Query > Spatial Query:

As a total GIS newbie, this is way above my head. I'll try to find someone where I live that I can sit with together in front of a computer.


texts: Is it possible to create a view in CartoDB through the UI?

texts:
We have some datasets in CartoDB.  I'd like to create a view (in the SQL sense of the word) over one of them, but I can't see how.

When I click the New Dataset button, it seems I only have the option to import data from somewhere.


texts: WMS GetMap request with POST and XML in GeoServer

texts:
It's possible to make WFS queries by POSTing query as XML.

Does GeoServer support this also for WMS GetMap request? If yes, I'm looking for information on XML syntax for such query. Sounds like a "open documentation and start reading" question, but I haven't found any information.

It's possible to POST GetMap query with same syntax as regular GET queries have, but I'm looking for XML solution.


texts: Clean small artefacts from polygon shapefile

texts:
With some success, I've been generalising and cleaning Ordnance Survey OpenData VectorMap District woodland polygon shapefiles to make them fit for mid-scale mapping.

However, the resulting shapefiles contain small 'tails' that I wish to eliminate. I've put black dots next to some of these on the attached picture. The problem is that the 'tails' are actually part of the larger polygons, so I can't get rid of them using (for example) GRASS v.clean rmarea. If anyone can help with this problem I'd be grateful for suggestions.

A sample shapefile (cleaned.shp) is included in this zip archive.

Nick.


texts: How to load geographic data into Hadoop (Hive) and then to be able to call spatial functions on them?

texts:
I need to load some geographic data into Hadoop (Hive), and then, to be able to call some spatial functions on them using Hive.

My input data format is ESRI shapefiles (but could be another format, I could transform if necessary).

I know that ESRI has released a very basic framework for working with spatial data within Hadoop via Hive, GIS Tools for Hadoop by ESRI, but it seems that I need to have my data in ESRI JSON and I don't have ESRI tools to convert my data into that format.

Is there any alternative way to load geodata into Hadoop or is there a way to convert my ESRI shapefiles into ESRI JSON?


texts: How to insert a point into PostGIS from PHP?

texts:
For the following line, I received an error in my PHP page, but the query is OK when I run it from pgmyadmin.

I am trying to insert a point into my PostGIS from PHP which contains name, address and a geometric point. Here, p_id is primary key and it is an integer.

$sql = "INSERT INTO app (p_id, p_fname, p_lname, p_saddr, p_caddr, the_geom) VALUES(intval($p_id), $fname, $lname, $street, $city, ST_GeomFromText(POINT($long $lat), 4326))";
$result = pg_query($dbh, $sql);

Error:

Warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "," LINE 1: ...me, p_saddr, p_caddr, the_geom) VALUES(intval(5), , , , , ST... ^ in /Applications/XAMPP/xamppfiles/htdocs/HostMobileApp/requestProcessor.php on line 66
Error in SQL query: ERROR: syntax error at or near "," LINE 1: ...me, p_saddr, p_caddr, the_geom) VALUES(intval(5), , , , , ST... ^


texts: Scipy: Convert RGB TIFF to grayscale TIFF and output it on Matplotlib


texts: ArcPy 64bit giving 0xC0000005 error with PyCharm

texts:
I have a simple script, which converts raster to shapefile and merges all the shapefiles. It does not really matter. The execution is fine, everything finishes but:

I am using PyCharm Community 2018.1, when the script finishes I get a window with:

  Python.exe stopped working

which I have to click and close and after that I get an error in PyCharm which says:

  Process finished with exit code -1073741819 (0xC0000005)

If I run the script on another computer with same setup, same copy of python, everything works just fine and PyCharm says:

  Process finished with exit code 0

I tried a clean install of ArcPy 10.6 x64 background GP, copy the python installation from other PC, same error.

I am using Windows 7 Enterprise (i7, 32GB RAM - I do not think it is important information)

If I make an error in script, where it exits, there is also the traceback + again the same error:

  Process finished with exit code -1073741819 (0xC0000005)

On the other computer it says:

  Process finished with exit code -1

What is funny, if I use 32 bit interpreter, it works just fine. But this is a workstation and I don't really want to use 32 bit version.

Any ideas how to solve the issue?

Sample of script (as I said, eveything here finishes and I get my final shapefile):

    for (dirpath, dirnames, filenames) in os.walk(OFP_folder):
        for filename in filenames:
            if filename.endswith('10000.tif'):
                list_of_files.append(os.sep.join([dirpath, filename]))

    print list_of_files

    for file in list_of_files:
        print "Working on: {}".format(file)
        create_shape(file)

    list_shp = glob.glob(out + "*.shp")
    print "Merging"
    arcpy.Merge_management(list_shp, out + "MaxOFP.shp")


texts: Attribute table multiple selections from external data file

texts: I have a county parcels attribute file in which I can select a row entry and have it highlighted on the shapefile (standard behavior). I also have a separate file (excel or dBase) with entries for certain properties of interest (based on property id).  In v3.16, Using data from the second file, is there a way to select multiple entries in the attrib file programmatically and have them highlighted all at the same time?


texts:
i have some marker on my map, and i am trying to draw line between the marker but i want it follow the road ,when i used Google map i follow this example...

http://people.missouristate.edu/chadkillingsworth/mapsexamples/snaptoroad.htm

and got this...

if (shiftPressed || path.getLength() === 0) {
          path.push(lineCoordinates[x]);
          if(path.getLength() === 1) {
            poly.setPath(path);
          }
        } else {
          service.route({ origin: path.getAt(path.getLength() - 1), destination: lineCoordinates[x], travelMode: google.maps.DirectionsTravelMode.DRIVING }, function(result, status) {
            if (status == google.maps.DirectionsStatus.OK) {
              for(var i = 0, len = result.routes[0].overview_path.length; i < len; i++) {
                path.push(result.routes[0].overview_path[i]);
              }
            }
          });
        }
      x++;

is there anyway to do the same in OpenLayers?


texts: When will Esri re-introduce answered thread, MVP, etc features in its discussion forums?

texts:
There are a few simple features that made the "old" Esri forums very useful.

Marking a post as answered
MVP point structure

Does anyone know when will Esri re-introduce these features in the "new" forums?


texts: Does anyone have data or shapefiles for tidal flats, mangrove distribution, or salt marshes?

texts: I am looking to map out the salt marshes, mangroves, and tidal flats of the world, but I am having difficulty finding data for this. Does anyone have any such data? This is for a research project at my university. Thanks


texts:
While I was trying to load a vector layer (Shapefile) from the desktop directory into the QGIS using the iface variable data is not loading and
user name in location of the status message is showing strange symbol
.Can anyone please suggest the solution.

Code is:

layer=iface.addVectorLayer("Users\bipin162\Desktop\TM_WORLD_BORDERS-0.3.shp","TM_WORLD_BORDERS-0.3","ogr")

Error Received while loading:

the username needs to be like:
\Users\bipin162\Desktop\TM_WORLD_BORDERS-0.3.shp


texts: Eliminating small polygon feature after converting grid to shapefile in ArcGIS Desktop?

texts:
I have created crop suitability map (grid) by using Ecocrop model and converted to shapefile. However, it appeared to have many small polygon features in the study area as attached.

Would it be possible to correct or eliminate these small polygon features?


texts: I want to filter out some bits of a layer and I want to do this in Query builder in the on a text field which contains names of several countries.  I cannot figure the use of "IN" as in I want to find 'India' or 'China' or 'Bhutan' in field "Territory." Seems like it should be easy, but I'm just stupid today.


texts:
I have a point shapefile that have two attributes that I want to extract from them. These two fields are "Group" and "Distance"

I want to grab the maximum "distance" from each unique number in the field "group".

I was wondering if any knew of a method of using arcpy searchcursor to find this max value? Writing something like

rows = arcpy.SearchCursor(input)
  Counter = 0
  for row in rows:
    if row.NEAR_DIST > Counter:
      Counter = row.NEAR_DIST

will only give me the max value of the entire dataset as a whole? Any ideas?


texts:
Does OpenLayers support the uploading and rendering of CSV files? If it does, how?

I used this code and it didn't help.

var curLayer = new OpenLayers.Layer.Vector("layer", {
    protocol: new OpenLayers.Protocol.HTTP({
        url: "test.txt",
        format: new OpenLayers.Format.Text()
    })
});
map.addLayer(layer);


texts: I have developed a web app using GeoServer, PostGIS and OpenLayers3 in localhost. This app is working in localhost and now I would like to publish this website in public to collect data. Does anyone help by giving guideline that how I can upload it in web server.


texts: Does anyone know how location services on your mobile device compare to a chosen coordinate system set in the QGIS project?  I am wondering how to improve the accuracy of my device compared to the layers I am navigating to in QField, is there a way to determine the location services CRS?


texts: Overpass API: Select all building polygons (excluding POIs and lines) within certain area

texts:
I am trying to select and export to GeoJSON all buildings that are located in certain area (city district). The Overpass API Query I am trying to use (in Overpass Turbo Interface) is below:

[out:json];

area[name="Berlin"]->.b;
rel(area.b)[name="Tiergarten"];
map_to_area -> .a;

(
  way["building"](area.a);
  relation["building"](area.a);
);

// print results
out body;
>;
out skel qt;

The query like this is working, but I have an issue to solve.

I only want to select polygons (not POIs and not lines that have the tag "building"). This includes both polygons defined as ways and multipolygons defined as relations. But those multipolygon relations also include points and lines that I wish not to select (marked red in picture below)

How do I need to modify my query?

I tried to play with recursions, area sets and more closely defining tags, but without success. The reason to get "clean" selection like that is that I plan to use it repeatedly for some other cities and city districts.

I am fairly new to Overpass API.


texts: How do I add a polyline segment created with Points to Lines tool to a feature class and apply that feature classes attributes to the line segment?

texts:
I am a new ArcMap user transitioning from using AutoCAD.

I have created lines from a point shapefile and have broken them into segments. These segments need to have a specific attribute table attached to them with unique ID's.

I have created all of the line segment types as new polyline feature classes and have the appropriate attribute table correctly formatted for each line type. They are empty at this point.

What I need to do is to take the segments that I have and move them into the various feature classes so each segment has the 'classes attribute info. The ultimate goal is to have these segments correctly attributed for submission to a government agency.

I hope this description makes some sense.

I know that I can 'create features' and trace these segments but I was hoping to find a more efficient way.


texts: Error while trying to view the attribute table

texts: I have a shapefile which displays fine in ArcMap. When I view the attribute table I get the following error. However the same shapefile loads fine and can view its attribute table to in QGIS. Any ideas ??


texts: Conditional Expanding in ArcGIS Desktop?

texts:
I would like to reclassify a LC map given some conditional rules (raster with 8 classes total).

Using the illustration, I would like to expand the green pixels (two distinct classes) on the white pixels (replace all the white pixels) till they meet other raster values (grey, red, blue...) without expanding these (here the grey) pixel values.

Is this possible using ArcGIS Desktop (10.6 or Pro)?


texts: Converting a UTM .bil file to a lat/long TIFF

texts:
I have many 3 arcsec (90m) SRTM DEM files in BIL format in UTM projection that I need to convert into 1 arcsec (30m) lat/long TIFFs.  I have tried both gdal_translate and gdalwarp to no success.
First I tried using gdalwarp with the command:
$ gdalwarp -of GTiff -t_srs '+proj=longlat +datum=WGS84
 +no_defs' -tr 0.000277777778 0.000277777778 -r bilinear
s56w071.bil s56w071_GDAL.tif

It would not run saying that I needed to free up disk space and that the "output file that is 12970800P x 12970800L", which is incorrect and why it needed more space.  For this scene at 1 arcsec (0.000277777778) resolution, it should produce a grid size of 3601P X 3601L.
Then I tried gdal_translate so I can force the grid dimensions to be 3601 x 3601, which should equal 1 arcsec data (ie.0.000277777778) .  I used
$ gdal_translate -of GTiff -a_srs WGS84 -outsize 3601 3601
 -r bilinear s56w071.bil s56w071_GDAL.tif

It completed the process, but the metadata of the target file still has its Origin and coordinates in UTM measurements, in addition to the pixel size still being meters rather than arcsec.
Driver: GTiff/GeoTIFF
Files: n07w083_testOUTSIZE.tif
Size is 3601, 3601
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-298801.500000000000000,28801.500000000000000)
Pixel Size = (1.000555401277423,-1.000555401277423)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -298801.500,   28801.500) (Invalid angle,Invalid angle)
Lower Left  ( -298801.500,   25198.500) (Invalid angle,Invalid angle)
Upper Right ( -295198.500,   28801.500) (Invalid angle,Invalid angle)
Lower Right ( -295198.500,   25198.500) (Invalid angle,Invalid angle)
Center      ( -297000.000,   27000.000) (Invalid angle,Invalid angle)
Band 1 Block=3601x1 Type=CFloat32, ColorInterp=Gray
  NoData Value=-32767

What did I do wrong as neither command worked correctly?  I'm wondering if it is because the header file of the BIL file has everything in UTM space, although I would have thought this would all have been converted.  See below:
BYTEORDER I
LAYOUT BIL
NROWS 1201
NCOLS 1201
NBANDS 1
NBITS 16
BANDROWBYTES 2402
TOTALROWBYTES 2402
BANDGAPBYTES 0
NODATA -32767
ULXMAP -298800
ULYMAP 28800
XDIM 3.0
YDIM 3.0

The reason I am trying to do this is because I am attempting to compare the SRTM DEMs to Copernicus DEM, which I have in the desired format (TIFF, geographic, 1 arcsec) so I need to get the SRTM data to have the same specs as Copernicus for the comparison.  I am open to other methods, but it needs to be an efficient process because this will be run on thousands of files.  For example, it would be really cool if there is a way in GDAL where I can process the SRTM data by feeding it the metadata from the Copernicus files?  That way I could be assured that all the necessary metadata gets passed into the processing of the target file.


texts:
I have been running a mod_tile + Mapnik + Renderd + PGSQL solution to host local OSM tiles, as described in the switch2osm guides. I recently put a lot of time in recoding my project to a Tomcat based solution, but want to now move map tile rendering away from Apache2.  If possible maybe have the Carto CSS / Renderd element handled in the Tomcat/Java.

Also because with both APIs are using unsigned localhost HTTPS certs, when using OpenLayers it fails TLS handshake to Apache2 unless I open a new tab and select  continue anyway.

What is the best way to do this?

I have been reading up on JOSM & OSMAPI Java documemtation, but neither of those really look to cover the tile generation much - only the editing of maps. There is also JkMount, but that would still require Apache2 to be installed.


texts: How to retrieve the data source of the active layer?

texts:
I am trying to get the data source of the layer in the Python action within the layer property. My code in the Python action is:

layer = iface.activeLayer()
QMessageBox.information(None, "parDir: ", layer.source())

When I run the action, the script returned the following error:

An error occurred during execution of following code:
layer = iface.activeLayer()
QMessageBox.information(None, "parDir: ", layer.source())

If I run the same script in the Python console, it has no problem returning the name of the data source.

Does anybody know why the script failed if I run it as Python action?


texts:
I'm trying to calculate the number of certain raster cells within the individual buffers identified by the FID and I'm not sure what else I need to change in this code to make it run:

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *
import os
import numpy as np

# overwrite existing datasets
arcpy.env.overwriteOutput = True

arcpy.CheckOutExtension("Spatial")

# Define workspace
arcpy.env.workspace = arcpy.GetParameterAsText(0)

in_features = arcpy.GetParameterAsText(1)
arcpy.MakeFeatureLayer_management(in_features, "lyr")

FIDS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,33, 34, 35, 36, 37, 38, 39, 40]

InputRaster = arcpy.GetParameterAsText(2)

arcpy.MakeRasterLayer_management(InputRaster, "rdlayer")

for item in FIDS:
    fieldName = "FID"
    FID_item = str(item)
    EXP = '"FID" = ' + str(item)
    print EXP
    arcpy.AddMessage("Selecting from nest buffers where " + EXP)

    arcpy.SelectLayerByAttribute_management("shp", "NEW_SELECTION", EXP)
    result = int(arcpy.GetCount_management("lyr").getOutput(0))
    print result
    arcpy.AddMessage(str(result) + " nest buffers selected")

    OutputTable = "suit_" + str(item)
    ZonalStatisticsAsTable("shp","FID","rdlayer",OutputTable,"DATA","SUM")

This is what I get when I run it:

Traceback (most recent call last):
  File "C:/Users/csetash/PycharmProjects/Covariates/SuitHab.py", line 22, in <module>
    arcpy.MakeFeatureLayer_management(in_features, "lyr")
  File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\management.py", line 6043, in MakeFeatureLayer
    raise e
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000735: Input Features: Value is required
Failed to execute (MakeFeatureLayer).

Process finished with exit code 1


texts: Only sections of line (LineString) rasterized in QGIS

texts:
I would like to rasterize the above intersected line string.  Each colored section of the lines represent a different attribute value.  I would like to rasterize each section of the line; however, the rasterize (vector to raster) tool only rasterizes small sections of the lines.
There must be a topological problem or something causing it to not rasterize all sections of the line.  I've tried all the tools and used the fixed shapefile outputs, but they produce the same result.  I'm possibly using the tools incorrectly.
How do I fix this problem?
*** Answer to this question was to use the v.to.rast GRASS tool, but a similar result occurs when I apply the v.to.rast tool in the graphical modeler.

The above image shows the rasterized/transformed line vector from the graphical modeler, purple.  The manually derived line vector to raster is in black.  Why is the manually derived vector to raster result complete and the graphical modeler one incomplete?


texts: Develop 3D buildings with roof structure from raw data

texts: I recently received a task to develop 3D buildings with roof structure. All I have now is satellite images and aerial photographs covering the entire urban area. After reading some previous methods, it seems possible to achieve this with building/roof edges delineated and height information (e.g. a digital surface model). Is it possible to perform these tasks in ArcGIS? If so, with which tools? I am pretty new to GIS so I am not familiar with tools involved in such tasks.


texts: R: Annual composite based on the median: How to get the index of the original layer for each pixel?

texts:
What I want:

I have a list of rasterstacks which are timeseries (300+ layers) for different bands. The timeseries are irregular, and therefore I want to create annual composites based on median ndvi. Thus from the available images for one year, the pixel with the (close to) median ndvi is chosen. For the other bands I want to create annual composites based on this ndvi composite. I try to make a mask in which each pixel has the value of the index of the image used for the median ndvi composite. I will apply this on the other bands, so I have 'the same' annual composite for each band per year.

Where I am at

Unfortunately, I am stuck on making the mask. I created some dummy data and somehow it returns two indexrasters (one with values 1-3, the other 2-4), while I expected one (with values 1-4).
Also my function cannot handle NA values and adding na.rm to the calc function does not solve this.
I am wondering whats going wrong and how to solve this.

#dummy data:
r <- raster(nrow=5, ncol=5)
set.seed(20181114)
s <- stack(lapply(1:5, function(i) setValues(r, runif(25, max=50))))
names(s) <- c("X2001", "X2002a", "X2002b", "X2002c", "X2002d")
#s$X2002a[2] <- NA

AnnualMask <- function(ts, year){
  year <- as.character(year)
  ts_year <- subset(ts, (grep(year, names(ts))))
  indexraster <- calc(ts_year, function(x){
    medianval <- median(x, na.rm = TRUE)
    which(abs(x - medianval) == min(abs(x - medianval)))
           })
  return(indexraster)
}

mask2002 <- AnnualMask(s, 2002)
plot(mask2002)

What do I need to do?


texts: How to display multiple markers at different positions on OSM5 using JavaScript

texts:
I fetched longitude and latitude from DB and saved it in a 2D array. I pass the array to the JS file. I'm using JavaScript to loop the array and display the markers with their icons. Each marker has a popup window when the mouse cursor is on the icon. I have two different positions, so I should be able to display each marker at its position. Although in the popup window that appears when the mouse is over the icon the longitude and latitude that are being displayed for both markers are the same (just the second index of the array) and I am note sure if the markers are being displayed correctly.
/* open street map newest version */
var map = new ol.Map({
    target: 'map', // the div id
    layers: [
        new ol.layer.Tile({
        source: new ol.source.OSM()
        })
    ],
    view: new ol.View({
        center: ol.proj.fromLonLat([4.35247, 52.520008]),
        zoom: 6,
        minZoom: 3
    })
});

for(var i=0; i < arrayPos.length; i++) {
    var long = arrayPos[i][0];
    var lat = arrayPos[i][1];

    // add a marker to the map
    var layer = new ol.layer.Vector({
        source: new ol.source.Vector({
            features: [
                new ol.Feature({
                    geometry: new ol.geom.Point(ol.proj.fromLonLat([long, lat]))
                })
            ]
        })
    });
    layer.setStyle(new ol.style.Style({
        image: new ol.style.Icon({
        src: 'https://wiki.openstreetmap.org/w/images/0/0c/Hgv.png', //
        scale: 0.4 // set the size of the vehicle on the map
        })
    }));
    map.addLayer(layer);

    //initialize the popup
    var container = document.getElementById('popup');
    var content = document.getElementById('popup-content');

    var overlay = new ol.Overlay({
        element: container,
        autoPan: true,
        autoPanAnimation: {
            duration: 250
        }
    });
    map.addOverlay(overlay);

    //display the pop with on mouse over event
    map.on('pointermove', function (event) {
        if (map.hasFeatureAtPixel(event.pixel) === true) {
            var coordinate = event.coordinate;
            //simple text written in the popup
            content.innerHTML = '<b>My latitude is: </b>'+lat+'<br><b>My Longitude is: </b>'+long;
            overlay.setPosition(coordinate);
        }
        else {
            overlay.setPosition(undefined);
            //closer.blur();
        }
    });

}

/* Map popup */
.ol-popup {
    position: absolute;
    background-color: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #cccccc;
    bottom: 12px;
    left: -50px;
    min-width: 280px;
}
.ol-popup:after, .ol-popup:before {
    top: 100%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}
.ol-popup:after {
    border-top-color: white;
    border-width: 10px;
    left: 48px;
    margin-left: -10px;
}
.ol-popup:before {
    border-top-color: #cccccc;
    border-width: 11px;
    left: 48px;
    margin-left: -11px;
}


texts: QGIS 2.0 64bit Orfeo Toolbox Installation Failure

texts:
I am trying to install OTB in with QGIS 2.0.1 (Dufour) in Windows 7, 64bit.  I have no problem installing QGIS either the QGIS installer or OSGeo4W, but I have no luck with the OTB tools such as pansharpening etc.

Are the otb-gin etc. tools only available on the 32bit version?  Does anyone know if it is possible to install on the 64bit?


texts: I've long used the Google Earth plug in QGIS. Recently it just wont load properly I've reinstalled the plug in updated QGIS etc. However, the problem persists, when I load GE as a backdrop it first appears on the lefthand 2/3 of my screen and then disappears and loads only on the remaining 1/3 to the right? I tried everything but cannot fix this. If I zoom or scroll in any direction the same thing is repeated.


texts: How do I query XY Event Layer in Model Builder?

texts: I am trying to build a model to input table data, make xy event layer and then select features by an SQL expression and make that a shapefile. What tool should I use for the SQL expression to select the features?


texts: PyQGIS - problem with launching the print layout

texts:
I would like to open the QGIS Print layout by using Python.
I found some hints here:
QgsPrintLayout Setup from PyQGIS 3?
PyQGIS - Managing print layouts
and here:
https://data.library.virginia.edu/how-to-create-and-export-print-layouts-in-python-for-qgis-3/
but unfortunately everywhere is the same problem. I am getting an error:
IndentationError: unexpected indent
https://stackoverflow.com/questions/3920628/indentationerror-unexpected-indent-error
and I don't really know how to solve it
My simple code looks like this:
project = QgsProject.instance()
manager = project.layoutManager()
layout = QgsPrintLayout(project)
layoutName = "Strand_012"

#initializes default settings for blank print layout canvas
layout.initializeDefaults()

layout.setname(layoutName)
manager.addLayout(layout)

canvas = iface.mapCanvas()
map.setExtent(canvas.extent())
layout.addLayoutItem(map)

I would like to open my map canvas in print layout and export it as PNG setting 170 Dpi resolution for it.
How can I do it?


texts: Clipping shapefiles using point grid references

texts:
I imagine this is a simple answer but I'm struggling to find information on clipping a shapefile using grid references.

I'm using ArcMap 10.3.1. My shapefile is a line feature of mean low water and I'm looking to clip from one point to another to produce a separate shapefile for use elsewhere.

The img shows the coast shp file displayed.


texts: Editing coordinates of GeoTIFF map in QGIS?

texts:
I have a GeoTIFF image imported in QGIS. Unfortunately when compared to older image I have of the same area, there is a slight shift in coordinated in the new image.

Assuming that I calculated the shift-difference between the two maps (X meters north, Y meters east), Is there any way to modify the original coordinates bundled with the GeoTIFF based on my calculation?


texts: arcGIS observer point analysis: Exceeding maximum allowed points amount not exceeded

texts:
I need to make an observer points analysis (3D analyst tool). I have a shapefile of 22 points, so I divided it in 2 layers of 11 each as the maximum points allowed is 16. However, as I launch the process, the program says:

ERROR 010155: Too many points. Maximum number allowed is 16.
Failed to execute (ObserverPoints)

... But I have only 11!

Could anyone help me?


texts: Mosaicking NDVI images from different scenes

texts: I have six overlapping NDVI images derived from atmospherically corrected SPOT5 images, all from the same date. How can I mosaic the images perfectly without seeing any differences between the same class but from different images? Please see picture below for illustration. The images have all been re-scaled to 0-1 (min-max) values.


texts: how to set workspace of Geoprocessor in .net?

texts: I am migrating some code from VBA to C# for developing an addin. In VBA, the geoprocessor's workspace could easily be accessed by workspace property of Geoprocessor. But how to set the geoprocessor's Workspace property in .NET environment


texts: Hide/show data inside Layer in OpenLayers 4

texts:
I'm migrating from OpenLayers 2 to 4 and I'm stuck querying a layer.

I want to hide/show some features inside that layer clicking on buttons.

This is my OL2 code for the data layer:

Var Pmfeatlayer = new ol.layer.tile("Orders", url , {layers: sQLayers,
transparent:true, myorders: twSettings.defsel,
format:'image/png'});

twSettings.defsel it’s an array and contains the restriction/sign IDs and when you click on a legend you add remove  that ID from the array.

This is the code to update the layer:

function updateLayerParams() {
  pmfeatlayer.setVisibility(false);
    if (sOrderSel == "") {
      return
    };
  pmfeatlayer.params.MYORDERS =  sOrderSel; [array whit the IDs that
  changes when you click on a legend button, what's inside is display ]
  pmfeatlayer.redraw();
  pmfeatlayer.setVisibility(true);
}

This is the actual OL4 code:

var pmfeatlayer =
  new ol.layer.Tile({
  source: new ol.source.TileWMS({
    url: "http...",
    params: {'LAYERS': sQLayers, myorders: twSettings.defsel, format:'image/png' },
    ratio: 1.1
  })
});

function updateLayerParams() {
pmfeatlayer.setVisible(false);
  if (sOrderSel == "") {
  return
};
 pmfeatlayer.getSource().getParams().myorders = sOrderSel;
 map.render()
 pmfeatlayer.setVisible(true);
}

The new code works and I'm able to see all the data, and I can hide/show part of that data depending on which button you click but you have to zoom/move the map to force the request of new tiles and have the feature on/off.

How can I force a map refresh?

Here a customer live page with OpenLayers 2.

http://www.barnettraffweb.co.uk/main.html


texts: Select more than one place at a time in Google Earth?

texts:
I've got a Google Earth .kmz file opened in my copy of Google Earth 6.0.1.2032 running on Mac OS X 10.6.7. There are about 5000 points/"places" in the file and they show up fine.

What I would like to do is create folders in Google Earth for those points to categorise them. Unfortunately, I noticed that the Google Earth interface does not let me select more than one place at a time!

Is there another solution for me to manage and categorise those 5000+ places in the .kmz file other than drag and dropping them individually into folders in Google Earth?! (I really don't want to have to do that!) Thanks.


texts:
we have an offine application of ArcGIS Explorer (in Germany) and we have to have the base map as well. I have searched About the possible solution and saw the ESRI  solution for that via creating tile packages in ArcGIS Pro (https://community.esri.com/groups/survey123/blog/2016/01/06/prepare-basemaps-for-offline-use) or (https://pro.arcgis.com/en/pro-app/tool-reference/data-management/create-map-tile-package.htm). We have tried it for Topographic Map and even OSM Data but None of them work and we receive error.

We use ArcGIS 10.5 and we have Enterprise lisense in the Company. I have read other Questions in this Topic in the Group too they were not practical for our case.

What could be the possible Problem?


texts: Displaying raster layer in QGIS without any formatting

texts:
I have nine adjoining DEM layers (3x3) styled as 'hillshade' but there are some obvious artefacts, particularly where tiles meet. I've exported the hillshade layers to TIFFs in QGIS using the 'rendered image' option, edited them in Photoshop to remove the artefacts, and then imported the updated files as raster layers in QGIS. However, QGIS is insisting on applying some kind of Style to the new TIFFs, instead of just rendering them the same as I see in Photoshop. They therefore look completely different to the originals, which were the style I wanted but had artefacts.
The top half of the image below is an original DEM layer with 'hillshade' style, while the bottom is a TIFF from Photoshop.

I had naively assumed that I could just re-import them exactly as they showed on-screen in PS.
Am I doing something wrong, or is this simply not possible?
I guess I'm looking for something like an option in the "Render type" box for layer style which is just 'unaltered' but I don't know how to say that in QGIS-speak!
I'm new to GIS generally, so may be missing something obvious, but I've searched high and low and can't find what the problem is.
If I copy and paste the style onto the newly-imported TIFFs, it seems to just add the hillshade on top of a TIFF which is already hillshaded, so I get double-hillshade (applied to the bottom half below):


texts: How to setup a debugger for QGIS Plugin development?

texts:
As the title of the question implies, I wish to know how to set up a QGIS Python Plugin Debugger so that I can develop plugins more efficiently.

Any information regarding this would be much appreciated as I am fairly new to QGIS Python Plugin Development.


texts: Make 3d model from picture and calculate volume

texts:
I have a picture (fictional) of a mountain. What I want and am not able to do without help, is to make the coordinates and height to the right scale.

I have a line that represents 10 km on the original picture and some height contours. I've made the colour picture into greyscale but now, when I try to make it a 3D model using Qgis2threejs, I doesn't work, I think because the file doesn't have a DEM layer. The Profile Tool Plugin does give the right shape, but not the correct heights.

At the end of this I want to be able to calculate volumes of (pieces of) the mountain above certain contours. And I need to make a 3d model of these parts of the mountain (maybe using qgis2threejs plugin)

Edit: sorry for not giving enough info, the greyscale was made by checking which style the first picture had and turning each colour separatly into a 32-greyscale using GIMP like this. The first picture is only an image, so .png, therefore the grayscale is also only a .png image.

The image is not geo-referenced because it is a fictional mountain, the only reference is the 10 km line in the colour image. The height contours are 50 m each with the 2,4 to 2,5 km contours defined as such. This is the only data I have, two pictures.


texts: Shorten leader-line for labels with geometry-generator

texts:
QGIS 3.8, Win 10. I have labels that are connected with the points they represent with a leader-line. The line is generated with geometry generator (going from the point-layer to the position where I placed the labels manually):

make_line(make_point($x,$y), make_point( "auxiliary_storage_labeling_positionx" , "auxiliary_storage_labeling_positiony" ))

The line sometimes continues below the label. How is it possible to shorten the line so that it stops when it touches the label? I tried to mask it with text-buffers. However, this is not an option here (see the link to see why). Changing horizontal/vertical alignement is also no option since I have labels clockwise around a circle - so if it would fix the problem for some of the labels, the problem would consist on the opposit site.

I tried the expression extend with negative value, but it seems it accepts only positive values, making the line longer. I look for a function that is a counterpart-expression (someting like shorten) - how to achieve this?


texts: QGIS identify each layer type in legend i.e point polygon line

texts:
i am developing a qgis plugin, while i can get the the general type of layer i.e vector or raster using this code

    vectorCount =0
pointCount=0
lineCount=0
polugonCount=0
rasterCount=0
layers = self.iface.legendInterface().layers()
for layer in layers:
    if layer.type() == QgsMapLayer.VectorLayer:
        QMessageBox.information( self.iface.mainWindow(),"Info", "count %i"%(vectorCount) )
        vectorCount=vectorCount+1
    if layer.geometryType() == Qgis.Point:
        QMessageBox.information( self.iface.mainWindow(),"Info", "count %i"%(pointCount) )
        pointCount=pointCount+1
self.iface.mapCanvas().refresh()

how i can get more specific vector layer type such as point polygon line ?


texts: How to do union that results to a SpatialPolygonDataFrame in R?

texts:
I have the following code

coastline<-readOGR(dsn=".",layer="shp")
wetlands<-readOGR(dsn=".",layer="shp")
wetb<-gBuffer(wetlands,width=500,byid=T)
wetb2<-gBuffer(wetlands,width=1000,byid=T)
u<-gUnion(wetb2,wetb)
plot(u)

EDIT

u<-raster::union(wetb2,wetb)
u2<-raster::union(coastline, u)
  plot(u2)

gives

Error in if (is.numeric(i) && i < 0) { :
  missing value where TRUE/FALSE needed
In addition: Warning message:
In RGEOSUnaryPredFunc(spgeom, byid, "rgeos_isvalid") :
  Self-intersection at or near point 699045.17841763003 4339815.8708455302

gUnion results to a SpatialPolygon but i need SpatialPolygonDataFrame. How can i do union that has that outcome?


texts: How to use Google's Distance matrix on server side?

texts:
I am developing a web application wherein i need to find the closest
bus-stop from a users location and mark it on a map. I have the list
of bus-stops on my server. I am using Google's Distance Matrix service
which returns me the distance between my source and multiple bus
stops. Then, by comparing the distance i get the nearest bus-stop. But
this is all happening on client side. I wanted my server to do the
decision.

Is it possible for my server to directly communicate with the Google
maps server and get the distance?

Thanks


texts: QGIS drawing shape with exact dimensions in meters

texts:
I want to draw several squares of 250 by 250 meters in the North Sea using QGIS 2.14. I need the coordinates of each corner as ETRS89 coordinates.

I created a new scratch layer with CRS EPSG:4258, ETRS89, then click "Toggle editing" and "Add Feature" with the Advanced Digitizing Panel open.

I click on a point on the map and press "d" to enter the distance. I enter 250 and press Enter. I then can click the angle.

After I finish editing, the 250 meter square looks small. When I measure it using the measuring tool it measures as 156 meters. Why is this, and how can I work with meters?

Also, why does QGIS not display units in any of the input fields? I know it depends on the CRS, but how can I know what unit is used for which CRS?


texts: Defining a Python function to calculate a value using multiple fields

texts:
I am using the Calculate Field tool in ArcGIS Pro to get it to calculate fire hydrant flow data. I need data from the table fields PitotPressure, COE, and HydrantOrificeFlowed in an attribute table to calculate the gallons per minuite to be stored into field Flow_Indiv in the same table. When I define the function as below, the code check feature says the "Expression is Valid" but when I run the code, I get the following error message:
ERROR 000539: Traceback (most recent call last):
  File "<expression>", line 1, in <module>
TypeError: iFlow() missing 2 required positional arguments: 'HydrantOrificeFlowed' and 'PitotPressure'
 Failed to execute (CalculateField).

Notice the first argument listed in the def below (COE) is not listed a "missing" - only the two subsequent arguments are missing.
It seems the only argument the function sees is the first one listed in the def parameters (in this case, COE). If I move them around, such as list PitotPressure first, it does not see the positional argument, COE.
I have experimented with this same layout, except I used only one parameter from a table field and a simple equation to multiply the called field parameter by an arbitrary number and it works fine. It's only when I add additional parameters that I get the error message.
The code is below.
Flow_Indiv=
iFlow(!PitotPressure!!COE!!HydrantOrificeFlowed!)

Code Block
def iFlow(COE, HydrantOrificeFlowed, PitotPressure):
    if HydrantOrificeFlowed <= 4:
        return 29.84 * (COE * (math.pow(HydrantOrificeFlowed, 2 )*(math.sqrt(PitotPressure))))
    else:
        return 5


texts:
Is it possible to create a Balloon Callout with a leader? I am using the following code:

public void DrawText( IActiveView view, BalloonParms balloonParms ) {
    ITextElement textElement = new TextElementClass();
    textElement.Text = balloonParms.TextString;
    textElement.ScaleText = true;                                // ???
    textElement.Symbol = GetTextBalloon( balloonParms );
    IElement element = textElement as IElement;
    element.Geometry = balloonParms.AnchorPoint;
    view.GraphicsContainer.AddElement( element, 0 );
    view.PartialRefresh( esriViewDrawPhase.esriViewGraphics, element, null );
}

(Ignore the details of GetTextBalloon() it is just standard dance of formatted text, balloon callout, simple fill, and simple line.  BalloonParms is just struct with all the settings bundled.)  I'm clicking on a polygon feature, getting the point location, and then calling this code. It works like a charm. But there is no leader line!

The IElement interface allows me to set an anchor point and I can fiddle with various settings for the IBalloonCallout.LeaderTolerance but nothing will cause the leader line to appear. I can offset the anchor but still no leader. Is there a way to set both the anchor and another point that will determine where the balloon is drawn? I can't find that prooperty. Am I missing it?


texts:
What is your a nice projection for the southern Atlantic? S.America & W. Africa?
I'm looking to produce nice maps with little distortion on shapes. Leaning toward Lambert.


texts: Choosing database for cartesian coordinates?

texts:
I'm trying to figure out, which database would be the best choice to store cartesian coordinates (x,y,z).

I want to query for

the distance between 2 positions,
which positions are in a sphere arround a given position,
which connections between 2 positions intersect with a sphere around a given position.

The database should also be able to handle transactions.

I have no exerience in any other database then mysql, which doesn't seem to be an option, so I'm open to any suggestion. It'll be something new to me anyway.

Which database driver would fit best?

Plain JDBC, hibernate, hibernate-spatial (which had the last update in 2011?), or something I haven't had in my mind yet.


texts: Finding number of days per ID in table using ArcPy?

texts:
I need to count the span of days an individual has been observed, from the first til the last observation day. There can be many observations per ID per day and not everyday has observations, hence the first and last dates are important.

The feature class contains many individuals, one row per observation per ID, so I need to group by ID. ID is a Text field, days are Date (also shows the time). I want to add the count of days to a new field (numeric) in the original datatable called NrDays. If need be I can create a new table and join on ID of course.

It seems simple but I cannot figure out how to do this in ArcGIS Pro. I need to be able to incorporate it into Model Builder, either by Python script or in a tool such as Calculate Field. In a script tool it seems hard to import Pandas for groupby function (the toolbox needs to be used by many different users), and in Calculate Field I don't know how to group by ID, and count the span of days in Arcade doesnt work: "DateDiff("d", Min($feature.Datum), Max($feature.Datum))"

Python script throws the error that ID is a Text field:

import arcpy
from arcpy import env
env.workspace = 'the database'
butterfly = r'butterfly_2019' # the feature class

for i in butterfly['ID']:
    d1 = datetime.date.max('Datum')
    d2 = datetime.date.min('Datum')
    countdays = d2-d1
    butterfly['NrDays'] = antal

out_location = 'the database'
arcpy.FeatureClassToGeodatabase_conversion(butterfly , out_location)

I know one major issue is with referencing the row ("i") which should be a group instead.


texts:
I have a map containing two layers and I need to configure a decoration layout to include a scale line and the legend for one of the layers.

However, it seems that GeoServer can't find my layout file. In fact, when I go to the style preview page (on GeoServer), the map area shows nothing but an error message saying Could not find decoration layout named: style-editor-legend and here's what it looks like:

I have checked my "Data Directory" on the "Server Status" page and it points correctly to where my layout directory is, along with my layout file, so I suppose that's not the issue.

Is there a place where I can inform the layout file to be used? A GeoServer page or a file somewhere?

I do realize I must insert &format_options=layout:style-editor-legend to the request parameters, but, when I do that, the map that currently works (without the legend and scale line) stops working.

Here is my .js code that currently requests the map (shown after the code).

What am I getting wrong?

var map = new ol.Map({
    target: 'map',
    layers: [
        new ol.layer.Tile({
        source: new ol.source.OSM()
        })
    ],
    view: new ol.View({
        center: ol.proj.fromLonLat([-55.41, -15.82]),
        zoom: 4.5
    })
});

var mun_covid19 = new ol.layer.Image({
    source: new ol.source.ImageWMS({
        url:'http://192.168.3.143:8080/geoserver/Covid19_Workspace/wms',
        params:{'layers':'Covid19_Workspace:municipios_covid19'},
        serverType: 'geoserver'
    })
});

map.addLayer(mun_covid19);

var brasil_estados = new ol.layer.Image({
    source: new ol.source.ImageWMS({
        url:'http://192.168.3.143:8080/geoserver/Covid19_Workspace/wms',
        params:{'layers':'Covid19_Workspace:estados_brasileiros'},
        serverType: 'geoserver'
    })
});

map.addLayer(brasil_estados);


texts: Convert high resolution digital PDFs into a shapefile?

texts:
I have to convert several of such formats into a shapefile. Is there any open-source software or quicker ways of doing this?

One such file -
http://ceodelhi.gov.in/ACMAP/5.pdf

Another such file is here- http://ceodelhi.gov.in/WriteReadData/CMS/Documents/DelhiGISmapwithPollingLocations.pdf


texts: Extracting specific OpenStreetMap tags in ArcGIS Desktop?

texts:
The purpose of my research is to look into public ITS (Intelligent Transport System). To do this in a realistic way I need not only the city map but also the public transport routes.

I work with ArcMap 10.3. As input data an OSM file, I use ArcGIS Editor for OpenStreetMap to import it.

I have the list of points , lines and polygones but in attribute table most of information are missing (e.g., public route numbers, directions and operation time)

How can I extract the missing information?


texts: How to split/explode ArcGIS annotation of multiple words into single word annotation?

texts:
We have transfer the labels of a certain layer to annotation, and it seems that the single feature of the annotation is polygon, for example there is a label for a road named "Pennsylvania Avenue Northwest" which is labeled along with the road, while I wonder if we can split this annotation feature to three features like  "Pennsylvania","Avenue" and "Northwest" each with its geographic position and label angle.

Is this possible?

update:

I am sorry but I missed that we have millions of features, so it would be better to implement it by program. :)


texts: Leaflet filtering GeoJSON properties greater than and less than some value not working

texts:
I would like to raise the query, that I haven't seen before in spite of a lot of problems regarding to GeoJSON features filtering by properties.

This is using the formulas such as Greater than, lower than, which seems to not work in this software.

As we know, the JavaScript has the comparison and logical operations like in the link below:

https://www.w3schools.com/js/js_comparisons.asp

among of which I saw in Leaflet only === expression saying, that the value or type is equal. However if we use == instead, corresponding to the "equal to" it still works as follows:

var johnlewis = L.geoJSON(jl, {
  pointToLayer: function(feature, latlng) {
  if (feature.properties.Capacity == 3) {
    return L.circleMarker(latlng, {
    radius: 10,
    fillColor: "blue",
    color: "black"
  });

   } else if (feature.properties.Capacity == 5) {
  return L.circleMarker(latlng, {
    radius: 10,
    fillColor: "green",
    color: "white"
    });

    } else if (feature.properties.Capacity == 18) {
  return L.circleMarker(latlng, {
    radius: 4,
    fillColor: "orange",
    color: "purple"
     });
   }
 },
 }).addTo(map);

and it's fine...

The problem starts, when I change the == into >= or >. Even one line of the code affects onto the whole result:

  var johnlewis = L.geoJSON(jl, {
  pointToLayer: function(feature, latlng) {
  if (feature.properties.Capacity > 3) {
    return L.circleMarker(latlng, {
    radius: 10,
    fillColor: "blue",
    color: "black"
     });

     } else if (feature.properties.Capacity >= 5) {
     return L.circleMarker(latlng, {
    radius: 10,
    fillColor: "green",
    color: "white"
     });

    } else if (feature.properties.Capacity == 18) {
  return L.circleMarker(latlng, {
    radius: 4,
    fillColor: "orange",
    color: "purple"
  });
  }
 },
}).addTo(map);

Then unfortunately instead of nice filter as previously (above) I see such default sizes of my circlemarkers without any selection at all :(

Their color and outline comes from the very top case considered.

Another two don't take part in it.

How can I solve this?


texts: Unknown characters on Greek files on QGIS3

texts:
In the attribute table of the shapefile there are some weird characters instead of Greek ones. I tried UTF-8, Windows-1253, Greek and ISO-8857-9 when upload the shapefile on the QGIS 3.1.4. Although nothing seems to work.
Any other reccomendation?


texts: QGIS Hot Spot analysis plugin Python memory error

texts:
I try to create an Hotspot crime map of Greater London. I created grid, counted points layers. When I try to use Hotspot analysis plugin after a while my memory spikes like crazy (16gigs) and this error appears.
I use British National Grid OSGB1936.
Edit:
Input: 100m x100m Counted grid layer
Count042019
C:\Users\\Project2019\Count042019.shp
ESRI Shapefile

UTF-8
Polygon (MultiPolygon)
EPSG:27700 - OSGB 1936 / British National Grid - Projected
271837.0204270040267147,91050.0220603790367022 : 629637.0204270039685071,564450.0220603790367022
meters
Feature Count 16,938,252

Hotspot analysis Plugin Paramaters:
Local Getis-Ord Gi*
Input Layer: 100m x100m Counted Grid Layer
Attribute Field: NUMPOINTS

Error:
2021-01-01T21:17:50     WARNING    Traceback (most recent call last):
  File "C:/Users/Luki/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 613, in run
  w = pysal.queen_from_shapefile(layerName.split("|")[0])
  File "C:\Users\Luki\AppData\Roaming\Python\Python37\site-packages\pysal\weights\user.py", line 67, in queen_from_shapefile
  w = Queen.from_shapefile(shapefile, idVariable=idVariable)
  File "C:\Users\Luki\AppData\Roaming\Python\Python37\site-packages\pysal\weights\Contiguity.py", line 255, in from_shapefile
  w = cls(iterable, ids=ids, id_order=id_order, **kwargs)
  File "C:\Users\Luki\AppData\Roaming\Python\Python37\site-packages\pysal\weights\Contiguity.py", line 199, in __init__
  criterion=criterion, method=method)
  File "C:\Users\Luki\AppData\Roaming\Python\Python37\site-packages\pysal\weights\Contiguity.py", line 383, in _build
  neighbor_data = ContiguityWeightsPolygons(polygons, wttype=wttype).w
  File "C:\Users\Luki\AppData\Roaming\Python\Python37\site-packages\pysal\weights\_contW_binning.py", line 135, in __init__
  self.do_weights()
  File "C:\Users\Luki\AppData\Roaming\Python\Python37\site-packages\pysal\weights\_contW_binning.py", line 205, in do_weights
  columns[j].add(i)
MemoryError


texts: Setting ID in query as IQueryDescriptions OIDFields throwing error?

texts:
I have a layer and the query for layer is a select query consisting of ID field in it. This query is being executed on top of Oracle and its throwing an exception for field "ID" when "ID" field is being set as OIDFields in below code. ID is suppose to be the key field for a layer. I tried using try/catch to see what happens and it turns out that below code is setting all the fields in the layer as key. My issue is how can i set an "ID" returned by a select query of a layer as OIDFields.

IQueryDescription qd = sw.GetQueryDescription(layerQuery);
try
{
    qd.OIDFields = c.OIDFieldName;
}
catch (Exception ex)
{

}
qd.GeometryType = c.ShapeType;
qd.SpatialReference = (mapLayer as IFeatureLayer).AreaOfInterest.SpatialReference;


texts: Failure to use a WMS map as a map background in Geonode

texts:
I try to add a new background to a map, so that user can choose from more options than the default ones.
The default map backgrounds are defined as follows:
DEFAULT_MS2_BACKGROUNDS = [
    {
        "type": "osm",
        "title": "Open Street Map",
        "name": "mapnik",
        "source": "osm",
        "group": "background",
        "visibility": True
    }, {
        "type": "tileprovider",
        "title": "OpenTopoMap",
        "provider": "OpenTopoMap",
        "name": "OpenTopoMap",
        "source": "OpenTopoMap",
        "group": "background",
        "visibility": False
    }, {
        "type": "wms",
        "title": "Sentinel-2 cloudless - https://s2maps.eu",
        "format": "image/jpeg",
        "id": "s2cloudless",
        "name": "s2cloudless:s2cloudless",
        "url": "https://maps.geo-solutions.it/geoserver/wms",
        "group": "background",
        "thumbURL": "%sstatic/mapstorestyle/img/s2cloudless-s2cloudless.png" % SITEURL,
        "visibility": False
   }, {
        "source": "ol",
        "group": "background",
        "id": "none",
        "name": "empty",
        "title": "Empty Background",
        "type": "empty",
        "visibility": False,
        "args": ["Empty Background", {"visibility": False}]
   }
   # Custom XYZ Tile Provider
    # {
    #     "type": "tileprovider",
    #     "title": "Title",
    #     "provider": "custom", // or undefined
    #     "name": "Name",
    #     "group": "background",
    #     "visibility": false,
    #     "url": "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
    #     "options": {
    #         "subdomains": [ "a", "b"]
    #     }
    # }
]

I wanted to add the following map background from WMS:
{
        "type": "wms",
        "title": "CUSTOM_TITLE",
        "format": "image/png",
        "id": "NEW_MAP_BACKGROUND",
        "name": "OrtoIlmakuva_2019",
        "url": "https://kartta.lahti.fi/teklaogcweb/wms.ashx",
        "group": "background",
        "visibility": False
   }

The new map background appears in the selection, but it is only white, empty background without the data from the source. There is no visible error.
What do I miss?
The activity in the network tab is as follows:

And the opening of the request link in a new tab results in
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1">
 <ServiceException>Unsupported WMS version</ServiceException>
</ServiceExceptionReport>


texts: Selecting multiple rows in attribute table. Help formulating equation?

texts: I have some GPS data that I'm working with. I would like to highlight multiple points within the track over a specific time period. For example, the track started at 10:32:03 AM and ended at 11:28:02 AM. Within that time period, I would like to highlight the points between 10:45:38 AM and 10:59:21 AM. How would I go about doing this? I saw the "Select by Attribute" option and I imagine that this will be the way I want to go about this. I'm having trouble writing a formula/equation to do this though. Could anyone help me out with this? Or if there's an easier way to do it, that'd be great too.


texts: Where does QGIS Plugin "Customize Toolbar" save its changes?

texts:
Where does the qgis plugin Cutomize Toolbar save its changes in the system?

Operating Systems are Linux and Windows.


texts: Is it possible to embed QGIS layer styles in a Spatialite database?

texts:
Spatialite is a great alternative to shapefiles - but how could I store the QGIS layer style together with the data so that it has a default style?

For a shapefile I would just save a [name].qml with the [name].shp file set, and it would style by default. Any equivalent for Spatialite?


texts: How can I create a PostGIS aggregate function to combine connected nearly-parallel lines?

texts:
Let's assume a table of connected linestrings that look something like a street network with longer corridors composed of individual features broken at intersections:

       A     B

       |    /
       |   /
o------o--o--o    C
       | /
       |/
o------o-----o    D
      /|
     / |

I want to create an aggregate function make_corridorthat would allow me to group all features into their respective "corridors". In the example above, the corridors are labeled A-D and can be thought of as a group of connected linestrings where each component line is roughly parallel to its neighbor.

The function should allow for a query structure like:

SELECT make_corridor(id, geom, 30) AS corr_ids
FROM   mytable

and return an array of feature ids that make up each corridor

------------------
|row| corr_ids  |
------------------
| 1 | {1,5,10,15} |      <- corridor A
| 2 | {2,6,11,16} |      <- corridor B
| 3 | {3,7,12,17} |      <- corridor C
etc...

I came across a set of recursive queries that I can adapt to identify the corridor, but I'm confused about how to translate the recursive queries into a state transition function and final aggregate function. Can someone point me to an example of incorporating a recursive query into an aggregate function, or suggest some strategies to consider?


texts:
I have a file geodatabase with a polygon feature class named "AOI".  The "AOI" feature class currently holds two records.  I want to loop through each record and run a geoprocessing task, for example the ExtractByMask tool.  When I run my script it only runs against the first records and stops successfully.  Below is my code....

with arcpy.da.SearchCursor(AOI, ("SHAPE@")) as cursor:
    for row in cursor:
        Extract = arcpy.sa.ExtractByMask(costraster, row)


texts:
I have two line shapefiles that overlap 50% of the time. I want to generate a new single shapefile that includes attributes of both datasets AND no duplicate segments.

A short segment from one layer will split the longer segment from the other and they will combine to form a new segment made of the overlapping segments. I have Arcmap 10.1 license.

Example: First layer = street centerline shapefile. Second layer = road improvement layer which is only PART of the centerlines. Centerline layer is not segmented, so a spatial join would apply attributes from 2nd layer to entire segment of first layer - which would not be accurate. So I want to combine BOTH.


texts:
I am having trouble loading a GeoJSON layer (below is my defintion). Everything works fine when I read the file locally in a web browser, e.g. file:///Z:/inetpub/wwwroot/bang.html. However, when I try to access the site through the domain, e.g www.daverules.com/bang.html, none of my GeoJSON layers show up.

It should also bear mentioning that I have a couple of Leaflet maps that will load GeoJSON with similar URLs without issue.

var wellsLayer = new ol.layer.Vector({
  source: new ol.source.GeoJSON({
    projection: 'EPSG:3857',
    url: "./data/WELLS.geojson"
  }),
  name: 'Wells',
  style: customStyleFunction
});

Response from the server is as follows. It shows file not found, however, I am pretty sure it is there.

GET http://daverules.com/data/WELLS.geojson 404 (Not Found)


texts: Displaying rendered layers in 3D Maps in QGIS 3.8.x with variable transparency/opacity

texts:
I am looking at using QGIS to help facilitate conversations/do some thinking in 3D.

I have tried both QGis2threejs and the native 3D Map available in QGIS 3.x and both have their strengths.

The native 3D map is able to work better with complicated 3D shapefiles for buildings, as well as fairly quickly render large maps. However, QGIS 3.x does not include transparency for layers. Where I work we have protected views that impact on building height - viewing them in 3D without transparency/variable opacity only tells half a story (the image below shows these views in 3D as brown planes)

Qgis2threejs is able to render transparency but doesn't work as well with some of my other shapefiles. Ideally I'd like to use both - but at the moment transparency is key.

Is there a way to include transparency/variable opacity in QGIS 3.x 3D Maps?

I am running QGIS 3.8.2 (I also have 3.4.1 installed). I can't always upgrade to latest versions as I work within a large organisation - one where I am possibly the only QGIS user!


texts: Forcing Lat/Lon Bounding Box to appear on LCC Projection Map in matplotlib-Basemap

texts:
I'm trying to do some plots of data on a basemap of Australia using
matplotlib-Basemap.  I'm finding the interface for creating the basemap
to be tricky.  Specifically, I have lat/lon definitions for the Australian
region (including Tasmania), but the map set up using the Basemap API excludes
parts of the desired region.  Here's a small sample code, which invokes
matplotlib-Basemap's Basemap with the BoM's LCC projection parameters.  If
you run this, you'll find the northern portion of the Cape York Peninsula and
the western portion of WA are missing.  I'm hoping to do this automatically for
Australia and for two of its states for which the standard map projection is
also LCC (Tasmania and Victoria).

How can I get a basemap that will have as a guarantee that it contains all of a
lat/lon region defined by a lat/lon bounding box?

import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap

"""
Equatorial/Polar minor radii for WGS84 ellipsoid
approximation of the geoid
"""
rEquat = 6378137.00
rPolar = 6356752.3142
"""
Standard latitudes for LCC projection.  Used in this
projection by Australia's BoM.
"""
trueLat1 = -10.
trueLat2 = -40.

"""
lower-left/upper-right corners for the Australian domain.
"""
ozMinLat = -43.575
ozMinLon = 112.925
ozMaxLat = -10.075
ozMaxLon = 153.575

"""
Central lat/lon coordinates.
"""
centerLat = 0.5 * (ozMinLat + ozMaxLat)
centerLon = 0.5 * (ozMinLon + ozMaxLon)

"""
CASE 1:
BoM's projection parameters.  Cuts off W. edge of
WA and N end of Cape York Peninsula.
"""
m = Basemap(llcrnrlon=ozMinLon, llcrnrlat=ozMinLat,
            urcrnrlon=ozMaxLon, urcrnrlat= ozMaxLat,
            rsphere=(rEquat,rPolar), resolution='c',
            area_thresh=1000.,projection='lcc',
            lat_1=trueLat1, lat_2=trueLat2,
            lat_0=centerLat, lon_0=centerLon)

m.drawcoastlines()
plt.show()


texts: Slope is not consistent with the elevation of DEM and seems to be incorrect

texts: I have a DEM image which shows the elevation is from approx. 81 to 103. I expected the slope should be 0-22m. However, the result from DEM-Terrain Model-Slope is from 2.5 to 13.2. Anyone knows why?


texts: Transform geospatial data from decimal degrees to x,y coordinates using pyproj in Python

texts:
I have the following dataframe

 latitude  longitude             xx            yy
0  37.75153 -122.39447  553343.041098  4.178420e+06
1  37.75149 -122.39447  553343.069815  4.178415e+06
2  37.75149 -122.39447  553343.069815  4.178415e+06
3  37.75149 -122.39446  553343.950755  4.178415e+06
4  37.75144 -122.39449  553341.343829  4.178410e+06

where latitude and longitude are in decimal degrees

I am using this code to go from latitude & longitude to xx & yy.

from pyproj import Proj
pp = Proj(proj='utm', zone=10, ellps='WGS84', preserve_units=False)
xx, yy = pp(dt["longitude"].values, dt["latitude"].values)

The documentation of pyproj mentions:

  "Calling a Proj class instance with the arguments lon, lat will
  convert lon/lat (in degrees) to x/y native map projection coordinates
  (in meters)"

1) A very amateur question that I have is: Are the degrees that are
   mentioned in the documentation, the same as the decimal degrees ?
   If not, how can I go from one to another ?

2) Secondly I dont understand what these parameters of the function
  stand for

   proj='utm', zone=10, ellps='WGS84'

Any shred of light ?


texts: How is the "place" determined for this Tiger 2010 shapefile address record?

texts:
In most cases, an ADDR.DBF record links to an EDGES.DBF record that links to a FACES.DBF record that links to a PLACE.DBF record that contains the place.  Sometimes, the place key in FACES.DBF is blank, the COUSUB key can be used instead, and COUSUB.DBF contains the place.  But what do you do in the following case?

TL_2010_2047_ADDR.DBF contains an address range with
primary key: ARID = 4003948456882
TLID = 85556021
SIDE = R

which links to edge:

TL_2010_22047_EDGES.DBF
primary key: TLID = 85556021
TFIDR = 201079140

which links to face:

TL_2010_22047_FACES.DBF
primary key: TFID = 201079140
COUSUBFP10 = 94267
PLACEFP10 = blanks

which has only a COUSUB key, not a PLACE key, but unfortunately the NAME10 field in the TL_2010_22_COUSUB.DBF file for key 94267 contains "2", which is not a viable place name (the correct place is probably something like "White Castle").

What are the rules by which COUSUBFP10 and/or PLACEFP10 are either used or ignored, how is the correct place name supposed to be determined, and where are those linkage rules documented?


texts: What are the advantages and disadvantages importing vs linking data in GRASS?

texts:
I'm fairly new to GRASS, and only recently discovered the r.external and v.external functions.

I'm used to working with R and QGIS where all the data is "external". Typically I keep vector data in PostGIS and rasters in the filesystem. But it seems the GRASS paradigm is to import this data into mapsets (with r.in.* and v.in.*).

So, what are the advantages of switching to that paradigm, vs. using r.external/v.external? Is one or the other faster, or easier to keep organized, or more bug-prone or error prone? Are there formats that can't be handled by linking?


texts: How to group distinct layers together in ESRI Flex app?

texts:
I'm wondering if anybody has idea for how to best group distinct layers -- even layers of differing types like DynamicLayer, WFSLayer, etc. The goal in mind is that they could be visually represented together in a TOC component and they could be toggled on and off as a group in the TOC.

The TOC component which comes with the out of the box Flex Viewer is setup to do this for ArcGISDynamicMapServiceLayers -- which have the layerInfo property that informs of the parent/child relationships.

The question is -- has anybody done this before and if so, what is the best way to accomplish this?  I was considering creating a LayerGroup object which extends the base Layer object and has a layerInfo property that stores a custom LayerInfo object -- similar to how the WMSLayerInfo is used to store parent/child relationships for WMSLayers.


texts:
Would anyone know if there is a way to automate (in arcpy) Arcgis's Connect to Folder function from a list of directories? What I am after is an automated process to take a list of directory file paths, map them to my folder connections in ArcCatalog and rename the folders.

Example of a list of directories

mylist = ["D:\Animal_Locations\Apes","D:\Animal_Locations\Alligator","D:\Animal_Locations\Ants"]

Image below shows the example of the connected folders with the original names changes. The renaming will also be automated and based on the file path from the list.


texts: I'm using QGIS and I'm trying to calculate slope < 20% from a file I have but when I use the raster calculation SLOPE < 20 the result is all black. What am I doing wrong? The data is already in percent.


texts:
When I view bing maps in the browser 3d buildings are displayed

If I load BingMap tiles using their API or in OpenLayers, leaflet etc, no buildings are displayed.

Are the maps tiles with 3D buildings not available for use in other applications?


texts: Converting Custom (local) .PRJ to .PROJ4

texts:
I have a Local PRJ file that I want to use in QGIS but how do I convert it to PROJ4?

Details for the PRJ file as below (based of GDA94 / MGA Zone 53)

JMG
Authority: Custom

Projection: Rectified_Skew_Orthomorphic_Center
False_Easting: 54007.558
False_Northing: 79754.287
Scale_Factor: 1.0
Azimuth: 0.0
Longitude_Of_Center: 132.217585217
Latitude_Of_Center: -30.885645673
XY_Plane_Rotation: -1.430068
Linear Unit: Meter (1.0)

Geographic Coordinate System: GCS_GRS_1980
Angular Unit: Degree (0.0174532925199433)
Prime Meridian: Greenwich (0.0)
Datum: D_GRS_1980
  Spheroid: GRS_1980
    Semimajor Axis: 6378137.0
    Semiminor Axis: 6356752.314140356
    Inverse Flattening: 298.257222101


texts: I was wondering if anyone knows of a plugin, extension, process, etc. for mapping shadow locations based on date/time using raster data? I have searched and what I have been able to find all seems to require vectors or multipatch data. I have DSM rasters produced from LiDAR and would ultimately like to use those as the source for identifying locations of shadows, as I would like to the surrounding features in the raster to be used as sources of impact (i.e. trees). I am open to all options, but QGIS, Grass, and ArcGIS are preferred.


texts:
What tools do I need to accompany OpenLayers to achieve what GeoExt is capable of? GeoExt can show frames of TOC, legends, etc.

And how about jQuery and Bootstrap combination? Can that became a replacement?


texts: Display html image map layer returned from GeoServer on Leaflet

texts:
I have been searching for a solution for this. But could not find one. Maybe someone here can help me.

I want to be able to display a  html image map layer returned from GeoServer on Leaflet. I don't have issues with generating the html image map layer itself, rather I am interested how to show it on the leaflet.

How can I achieve this?


texts: Natural Breaks (Jenks) classes as a new column values

texts:
I have .shp layer with column Length

In Layer Properties it's possible to display Layer with natural breaks (Jenks) classification.

It's shown below:

Based on that classification I'd like to create new column which store Natural Breaks (Jenks) classes for example if some object displays as 1 I want 1 in created column etc.

Obviously I could write statement in field calculator (after classification in Layer Properties) like (simply version):

if Length < first_class_high_value then 1 etc.

But I'd like to put creating new field in Model in order to using with many Layers, so I wouldn't know threshold value for each class.

Any idea how solve that problem?


texts: Creating map with states by attribute value using QGIS?

texts:
I'm using QGIS, but I am quite familiar with R and python, so I could use any of these.

I want a map of mexico but want to color the states according to a certain variable that goes from 0 to 100. So it would be like a heatmap of Mexico.

How can I do this?

I just have the names of the states and the corresponding value. I would therefore need an already made "empty" map with the states already defined or something.


texts: Project point from one UTM zone to other

texts:
I am currently working on a project where we have to figure out the position of one point based on the known position of two (user-input) points.

Now the problem is that the users could provide two points in different UTM zones, so we have to project one of the points to the other system (at least that is how we do it.)

I coded a reference implementation in Python to test it, and now we want to use this feature in production on iOS.
It seems as if the only swift proj library here is out of date and can not be used.

We looked around for a bit, but did not find a description of how to project a point from one zone to the other one without additional software.

Do you know whether this is possible, or whether there is an up-to-date proj library for swift?


texts: Automating massive raster import using PyQGIS?

texts: I need to import all the raster files in a folder in the QGIS 3.4 canvas. Each file is in a .asc format. How to do it using PyQGIS?


texts: Exporting ALL selected raster layers in QGIS

texts:
I am working in QGIS 3.8.3 in Windows 10,

I have to export all the selected raster layers, is there any way of doing this instead of exporting them one by one?

I only would like to export all of them to the same format, all of them have the same resolution and also the same latitude/longitude size.

I haven't found help page of QGis, and I am totally new to python codes, so I seek any 'easy' to understand or well explained "how to apply the code".


texts: Exporting Geopackage table to directory as CSV with PyQGIS

texts:
I have the following extract from a PyQGIS script showing the final function. This script actually form part of a plugin tool for QGIS. I create three geopackage layers and save them into the chosen directory (out_dir_gpkg).

I would also like the ability to export each geopackage table as a CSV to a chosen directory (out_dir_gpkg), before I load the geopackages into QGIS which the script already includes.

Question

So my question is how would I achieve this below the line that reads:

  #Export Geopackage table as CSV file to CSV output directory

Script (function)

    def save_and_load_res_layers(self):
    """ Save result layers as GPKG and load them.
        Copy the CSV files to their output dir. """

    for name, switch in self.process.items():
        if not switch:
            continue

        if not self.res[name]:
            continue

        gpkg_path = os.path.join(self.out_dir_gpkg, "{}.gpkg".format(self.res_names[name]))
        error = QgsVectorFileWriter.writeAsVectorFormat(
            self.res[name],
            gpkg_path,
        )
        if error[0] != QgsVectorFileWriter.NoError:
            self.uc.show_warn('Saving result layer {} failed. Is it opened?'.format(name))
            continue

        # Export Geopackage table as CSV file to CSV output directory

        # load GPKG
        res = QgsVectorLayer(gpkg_path, self.res_names[name], "ogr")
        loaded_lyr = QgsProject.instance().addMapLayer(res)
        if not loaded_lyr:
            self.uc.show_warn('Couldn\'t load result layer {}.'.format(name))
            continue


texts: ArcGIS 10.3 suddenly not reading .tif/.tiff rasters

texts:
Anyone ever experience losing the ability to access .tif/.tiff rasters in ArcGIS/ArcCatalog? Both geotifs and general imagery tifs have become unusable, one day after I was able to access and use both. I have no problem seeing the tifs in ArcCatalog, but it seems as though the software doesn't recognize it as a viable file type anymore.

ArcCatalog tells me "your selection can't be displayed in the current view", and when I drag the files into ArcGIS, I am told that "Inavlid raster dataset. Unable to create raster layer".

I've tried many things to fix my problem with no luck: different file locations, different mxd, re-creating tifs and geotifs, importing new tifs, exporting and importing from different image types etc. There have been no software updates during this time.

Any ideas as to how to fix this?


texts: Add new field in QGIS using Refactor Fields doesn't work

texts:
I want to add a new field named 'TEST' to an existing attribute table (SHP) using Refactor Fields, but when I want to save as new shape, it says:

Evaluation error in expression ""test"": Column 'test' not found

Of course it's not found, since I want to add it as a new field!

Anyone a clue?

It happens both with versions 2.14 as with 2.18


texts: Easy Custom Labeling plugin does allow to save?

texts: I use the Easy Custom Labeling plugin chose positions of the labels and safe the layer and project for continuing later. When opening again the project, the layer opens but without any objects inside. Is there a reason why the layer is saved, but not its content?


texts: heat map of density ratio of 2 layers of points

texts:
I have 2 vector layers of points:

one with a point for each house in the city (thanks to osm.org), roughly equivalent to population
one with a point for each case of cholera in the city

I'm trying to define in which locations I should site new water supply points based on a local attack rate (ie: number of cholera cases / local population).
I've built separate heat maps for each layer (using QGIS heat map plugin), but it's hard to visually figure out hot spots.

So I'm looking for a way to calculate this local attack rate, ideally something like (number of cases within X meters radius / number of houses within same radius) and spit that out as a raster layer. Basically just like a heat map, but using a ratio rather than a simple count.

I'm guessing there's some magic keyword I don't know that will open a swath of solutions. Can anyone point me in the right direction? I'm using QGIS.


texts:
I am trying to line up a US Census Block shapefile with another shapefile that has lat/long points (i created it from a csv), but the points are not lining up with the Census shapefile.

Here is some info that i can offer:
The census file is in WGS 1984 Web Mercator Auxiliary Sphere
The points shapefile is in an unprojected lat/long

I have projected the Points shapefile to GCS_WGS_1984
I have projected the Census shapefile to WGS 1984, WGS Web Mercator, NAD 1983, NAD 1983 Albers.

In most scenarios, the points shapefile is either really really small in the center of the map, or off to the side and kind of tilted.

Census blocks:

Data Type:    Shapefile Feature Class

Shapefile:    C:\Users\US_blck_grp_2010.shp

Geometry Type:    Polygon

Coordinates have Z values:    No

Coordinates have measures:    No

Projected Coordinate System:    WGS_1984_Web_Mercator_Auxiliary_Sphere
Projection:    Mercator_Auxiliary_Sphere

False_Easting:    0.00000000

False_Northing:    0.00000000

Central_Meridian:    0.00000000

Standard_Parallel_1:    0.00000000

Auxiliary_Sphere_Type:    0.00000000
Linear Unit:     Meter

Geographic Coordinate System:    GCS_WGS_1984

Datum:     D_WGS_1984

Prime Meridian:     Greenwich

Angular Unit:     Degree

Points Shapefile:

Data Type:    Shapefile Feature Class

Shapefile:    C:\Users\XYrawCA_GISselection.shp

Geometry Type:    Point

Coordinates have Z values:    No

Coordinates have measures:    No

Geographic Coordinate System:    GCS_WGS_1984

Datum:     D_WGS_1984

Prime Meridian:     Greenwich

Angular Unit:     Degree

Update

This is the image i see when I Reproject the points shapefile to WGS 1984. Technically, its unchanged from when I intitaly load the file.


texts: Location descriptions showing up in wrong place for ArcGIS Online Story Maps?

texts: I've created a story map tour to use for an app created through Esri's app builder tool and am currently experiencing some issues with both. There seems to be a glitch where the description and title for one location in the story map will be copied to another location. For instance, location x's description and title will appear for both location x and location y. I've found I can temporarily fix the story map by reuploading the csv file but this does not fix it in the app based off of the story map.


texts: Way to restore the data in the accidentally overwritten layer by its duplicate layer in QGIS?

texts:
In QGIS 3.10.12, I duplicated a GeoPackage vector layer. I made a lot of changes to the new (duplicate) layer and accidentally saved it. Now the original layer has been wiped. The undo button is disabled for the duplicate layer so I cannot undo the changes. As it turns out, this is a QGIS feature.
I don't have a backup or shadow copy of the geo-package.
QGIS is still running. I have not closed it yet. Is there a way of restoring my data?
Such as temporary files that may have been saved somewhere (in \ApplicationData\ or Temp folder, for example).
I tried Current Edits > Rollback For All Layers, but nothing happened.


texts:
I get this error, when I try to insert a pdf file into ArcMap Layout view. I have clicked on Insert - Object - create from file, browsed the geo pdf and pressed ok. I get this error:

  Failed to create object. Make sure the object is entered in the system registry <
  I searched for this error and found this:
  http://support.esri.com/zh-cn/knowledgebase/techarticles/detail/27401
  Where can I find the script blocking option in Nod32? defence temporary disable is not enough. Or the problem is not with the scripts running in background in that time?


texts:
I have to convert a .shp into a .csv file and upload it to the SQL Server, for a program that only supports Polygon format and can not render Points.
Is there a way to convert Points to Polygon or is it easier if I just make a SQL script and convert Points to Polygon manually?
POINT (13.5766500015713 45.5163335041142)

This should technically be a square, right?
POLYGON ((13.5766600015713 45.5163235041142,
                13.5766600015713 45.5163435041142,
                13.5766400015713 45.5163435041142,
                13.5766400015713 45.5163235041142))


texts: Fusing position data obtained from one coordinate system with other sensor position coordinates?

texts:
I'm using data from GPS and from vehicle sensors (Ultrasonic) separately to track the position of a vehicle using Kalman filter. I want to implement sensor fusion for the received measurement data and check for improvement of filter performance. However, I have a problem with regards to combining the measurements since they are of different types.

The GPS data (GPX file exported from an app) gives information about the Latitude, Longitude, Elevation and Timestamp (Format: YYYY-MM-DD HH.MM.SS) and is then converted to UTM. The HDF5 data collected from a vehicle (HDF5 Format) gives information about the Vehicle Position X, Vehicle Position Y, and a timestamp that is updated like a counter(Present in file step_S).

How is it possible to combine/synchronise position data from 1 coordinate system (GPS - x,y UTM data) with the position coordinates of another sensor system?

Assumptions: GPS updates at 1 Hz and data received from Ultrasonic sensors every 500ms.

Reference:

GPX file:
https://github.com/stevenvandorpe/testdata/blob/master/gps_coordinates/gpx/my_run_001.gpx

HDF5 data:
https://github.com/surishell/Kalman-HDF5/blob/master/TestRoute.hdf5

Code for reading the HDF5 data:

import h5py
import numpy as np
from tkinter import *
import matplotlib.pyplot as plt

f = h5py.File(
    "C:\Users\Suraj\Desktop\TestRoute.hdf5","r")

with f:

    st = f.__getitem__("daste_step_S")
    t = list(zip(*st[()]))
    step_time = t[0]
    step_id = t[1]
    step_map_in_index = t[2]
    step_map_out_index = t[3]
    step_v_pos_x = t[4]
    step_v_pos_y = t[5]
    step_v_pos_angle = t[6]

    print(step_v_pos_x)
    test1 = [t - s for s, t in zip(step_v_pos_x, step_v_pos_x[1:])]
    print(test1)
    ax = plt.axes(projection="3d")
    ax.plot3D(step_v_pos_x, step_v_pos_y, step_time, 'gray')
    plt.show()


texts:
CAD drawing has coordinates given but when this CAD file add to ArcGIS the coordinate showing is different. Why?

Actually the coordinates there shown is "Nahrawan 1967 utm 39". I use define projection and try to project it to WGS UTM 40N.It is still in the same position.


texts: Exporting feature class from Geodatabase to shapefile, shortens/abbreviates field values in resultant file?

texts:
I'm exporting feature class (File Geodatabase) to shapefile, after exporting the field values in resultant shapefile is shortening, like if a field value is Andhra Pradesh then in Feature class changed as a AP.

I think that that the field value is 10 character limitation. How we can by-pass this limitation.

How I can export feature class with all field values?


texts: Why does this Python script only work once on QGIS?

texts:
I have a Python script to change the color of some specific features (lines) using categories in a vector layer. When I import the script in the console, the first time through the console it works just fine. But (while qgis is open) when I edit the script and change the color of some category to 'red' instead of the previous 'green' and then import script again, it doesn't show the changes, the lines have the same color like before. Here's the script and some images:

from PyQt4.QtGui import *
from PyQt4.QtCore import *
from qgis.core import *
from qgis.utils import iface

def change_color():
    active_layer = iface.activeLayer()

    pipeline = [["1", "green"],["2","red"],
    ["3","green"],["4","green"],["5","green"]]

    categories=[]

    for label,color in pipeline:
        symbol = QgsSymbolV2.defaultSymbol(active_layer.geometryType())
        symbol.setColor(QColor(color))
        category = QgsRendererCategoryV2(int(label), symbol, label)
        categories.append(category)

    expression = 'id'
    renderer = QgsCategorizedSymbolRendererV2(expression, categories)
    active_layer.setRendererV2(renderer)
    active_layer.setCacheImage(None)
    iface.mapCanvas().refresh()
    iface.legendInterface().refreshLayerSymbology(active_layer)

change_color()

Now let's say for example that I edit script and change pipeline to:

pipeline = [["1", "green"],["2","red"],
["3","red"],["4","green"],["5","red"]]

and run script again. Then it should show 3 red lines instead of 1. But it doesn't! Hope I was clear enough. (I'm not even close to a developer.)


texts: Dense data set of locations for flow analysis

texts:
I want to do some analysis on real world data related to crowd flows and now I am looking for a publicly available (or at least available to academia) data set of trackings in a crowd. The data set does not neccesarilly have to be from humans, eg. locations of kettle's would also work. The required features are:

Dense in the sense of many tracklets on a relatively small area during the same time window, the more the merrier
Individuals/tracklets have to be identifiable (ie. it must be possible to link all locations added by one individual to some kind of id) at least for some time periods
Bonus for underlying ground truth (eg. a fair going on)

I have searched the webs for about 4 hours now but couldn't find anything that fits at least the first two requirements, any ideas are very welcome.


texts: How to draw maps with OpenLayers without subtitles?

texts:
I'm developing an application, using OpenLayers and OpenStreetMap, which can not have some subtitles, because it pollutes the map, subtitles like this:

this is my code

defaultRasterLayer = new ol.layer.Tile({
    source: new ol.source.OSM()
});
  var  map = new ol.Map({
        layers: [defaultRasterLayer],
        target: 'map ',
        view: new ol.View({
        center: [0, 0],
        zoom: 2
    })
    });

How do I remove it?


texts: Why inverse flattening is zero in esri prj file for spheres?

texts:
I have a prj file which is assumed to have a sphere datum (not ellipsoid). here is the prj file:

  PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["Popular Visualisation
  CRS",DATUM["D_Popular_Visualisation_Datum",SPHEROID["Popular_Visualisation_Sphere",6378137,0]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mercator"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]

I'm interested in this part of this prj file

  SPHEROID["Popular_Visualisation_Sphere",6378137,0]

I expect the third parameter of SPHEROID as the inverse flattening to be infinity for sphere (a=b) but here esri writes zero for this parameter!

flattening  = f = (a-b)/a                  //=Zero for Sphere
inverse flattening = 1/f = a/(a-b)         //=Infinity for Sphere

Is there any explanation why esri prj files set the inverse flattening to zero for spheres?


texts:
I am trying to disable zooming with the mouse wheel for QGIS 3.8. Past versions have had an option to under Settings/Preferences -> Map tools, but this appears to have moved with the newer versions.
I am trying to just lock the layer scale similar to how Arc allows for the zoom layer to be locked. Disabling mouse wheel zoom will work for my situation since I am using a Mac magic mouse which is very easy to accidentally scroll with.


texts: Merge overlapping GeoJSON GeometryCollections

texts:
I need to merge three overlapping GeoJSON GeometryCollections of Polygon. Ultimately, the end result needs to be a geom type for PostGIS (e.g. MULTIPOLYGON) so I can easily check if particular points fall within it (e.g. with ST_Intersects).

The GeoJSON files come from OpenTripPlanner, and they represent isochrones. The reason that there are multiple, overlapping files is that we use the same starting point but more than one starting time. So actually they are very similar but not exactly.

We tried mapshaper for merging but it does not really "union" the polygons, instead it puts them all in one geometry so effectively that just puts them all on top of each other.

We were able to convert each file individually into multipolygon using ST_CollectionHomogenize however still missing what function or tool we can use to merge these into a single multipolygon. Note that preservation of outer rings is a requirement, which seemed to rule out any standard PostGIS function we tried.


texts: Ensure relative path in Arcgis layer files

texts:
I'm looking for the arcgis python equivalent of the VBA How to save a layer file with a relative path.

I'm using a script to change the paths in a collection of about 75 layer files before distributing to outside offices. The script works well, except that the new layer file paths are not relative, which means they usually are broken for the recipients as they rarely use the same drive letters etc. as we do, which pretty much defeats the purpose.

Paths follow the pattern X:\Layers\Category1\Group3, and X:\data\One.gdb, i.e. the layers and data are one the same drive but not in the same tree.


texts: Creating multiple Rules for Representation in ArcPy

texts:
I want to create multiple rules for a selected layer using ArcPy in ArcGIS 10.7.
I can create one using the
arcpy.AddRepresentation_cartography(in_features, representation_name, rule_id_field_name, override_field_name, geometry_editing_option, import_rule_layer, assign_rule_id_option)

command, but that creates only one rule:

How can I create another one for this layer?
I can set the representations too with the
arcpy.CalculateRepresentationRule_cartography(in_features, representation, representation_rule)

command, but I need to have many.