texts: WMS / imagery shuts down QGIS & kicks computer offline

texts:
please do not mark this as off topic - it is entirley ON topic. Have contacted QGIS/GitHub directly - no response.

I am running QGIS 3.4.9 Madeira, but on loading WMS ortho-imagery (for North Carolina / NC One Map), QGIS shuts down & my internet connection is shut down entirely.  I'm then then blocked from internet access entirely, sometimes through several re-boots.

Additionally, on loading any project, I often get a failure notice that existing / saved streaming imagery in the project ( "failed to load capabilities..." and then no WMS streaming will work.

I'm running Windows 8 / 64bit and running this version since June, but this issue only recently started - has never occurred in any prev. version.

Can't find anything about this issue online or on Stack-Ex. Again, please remove or do not mark as off topic...I have no other source for assistance.


texts: Are there any decent free GIS projects built in C# or with a good C# API?

texts:
I'm looking for a free mapping / gis project with a C# interface, preferably written in C# and open source. Does such a project exist?

If so, are there any that do not require connecting to a map server and will allow me to distribute map tiles on disc?


texts: Separating two GeoJSON files, one with properties and another with geometry?

texts:
Using Leaflet with GeoJSON, I would like to create a map with geometries, and with alphanumerical data associated to each item of the geometry. A map very similar to the easy sample at http://leafletjs.com/examples/geojson.html, with the names/values of each one the points/lines/polygons.

However, I found that, in every example I've seen, the alphanumerical data ('properties') and the geometrical data ('geometry') are within the same GeoJSON file. I mean, for each one of the items ('Features'), there are 'properties' and 'geometry' associated with the same 'id'.

I wondered if there was any possibility to separate 'properties' and 'geometry' in two different files, joining the features through their ID.


texts:
I just bought some SPOT6/7 satellite imagery. This material has a 12bit format, however, the software I have to import it to just accepts 8, 16 or 32 bit files.

How can I convert my geoTIFF files to 16 bit without loosing the geo-ref.?


texts: (space) hot-spot analysis vs (space-time) emerging hot-spot analysis

texts:
Using reviews of tourists from the Tripadvisor platform, I performed a (space) hot-spot analysis, for the first and second semester of a series of years (2015-2020). In each case (12 repetitions of the analysis) the result in a specific area was an extensive cold spot.
But when I performed a (space-time) emerging hot spot analysis (via ArcGIS Pro) with the same 12 semester data, the result was a hot spot for the same area ...
How can this be explained?


texts: I am struggling to import Python packages, such as fuzzywuzzy or pandas, into PyQGIS. Whenever I try to import, through import pandas for example, I get ModuleNotFoundError.


texts: Does an open source alternative to ESRI's Image Server exist?

texts:
I noticed the default way to store imagery is by using a database in the open source world.
I like ESRI's Image Server software because it removes the need for a database and makes backing up a lot easier since its just files.

Is there an Image Server type software in the open source world?


texts: So I've been using a dynamic join (IRelQueryTable to attach a SQL query to a feature layer) but now I want to make a permanent (or semi-permanent) join. How do you go about doing this in ArcEngine code? Do I use IFeatureDataConverter? If I have feature layer is it possible to add the joined data directly to the feature layer? Can I create a new feature layer with the joined data and have it take the place of the original feature layer? Please point me in the correct direction.


texts: Disable double click zoom event in Leaflet for R

texts:
Is there a way to disable the double click zoom in Leaflet for R?

I've created a Shiny app that changes polygon styles when a country's region is clicked on/off. If you select and immediately deselect the same polygon, the map zooms in. I want to disable this feature so that there's no wonky zooming!

According to leaflet.js documentation, you can disable this feature in JavaScript. Leaflet for R refers to this documentation when I try to search for the solution within R, which is completely unhelpful.


texts: Where can I get GIS data layers that show sea ice data for the Beaufort and Chukchi Seas?

texts: I would like to put a layer on my basemap that shows sea ice coverage levels for both the Beaufort and Chukchi Seas off Alaska for the last few years. Is this available anywhere? Would I have to make it myself? If there is no premade layer, where would the data be available?


texts: Merging vectors 'global name 'dataobjects' is not defined'

texts:
I'm trying to merge contour line shapefiles but I keep encountering errors when doing so. I'm using Vector > Data Management Tools > Merge and selecting all six line shapefiles and given the error 'global name 'dataobjects' is not defined'.

I have also installed the MMQGIS plugin to try an alternative but receive a python error as soon as I click MMQGIS > Combine > Merge Layers...

  Traceback (most recent call last):
              File "C:/Users/me/.qgis2/python/plugins\mmqgis\mmqgis_menu.py", line 316, in merge
                dialog = mmqgis_merge_dialog(self.iface)
              File "C:/Users/me/.qgis2/python/plugins\mmqgis\mmqgis_dialogs.py", line
  1714, in init
                mmqgis_load_combo_box_with_vector_layers(self.iface, self.sourcelayers, True)
              File "C:/Users/me/.qgis2/python/plugins\mmqgis\mmqgis_dialogs.py", line
  2610, in mmqgis_load_combo_box_with_vector_layers
                combo_index = combo_box.findText(layer.name())          AttributeError: 'QListWidget' object has no attribute 'findText'

I've set the CRS to OSGB 1936 / British National Grid for all layers and the project CRS in the same.

The shapefiles are found here: https://www.dropbox.com/sh/w5zg5b8otfz2e3c/AADoACxzlBW789O3u2-8SgC9a?dl=0


texts: Using Geonetwork as alternate CSW backend of Geonode

texts:
I am trying to integrate Geonode with Geonetwork instead of default Pycsw catalogue backend.
I have changed the setting.py of geonode installation following this guide :
https://doc-geonode.readthedocs.io/en/latest/004_admin_workshop/003_csw_settings/
When I'm trying to download metadata through Geonode,  it redirects to geonetwork csw service endpoint without any query parameter (like layer uuid etc). Also Geonetwork is still empty.  Is there someone who have integrated these two platforms successfully ?


texts: Placing coordinates on a topographic map

texts:
I am using QGIS for the first time. I want a topographic map with coordinates of locations. I have the SRTM data for the area of my interest. Using the following link I am able to get the topographic map. http://planet.qgis.org/planet/tag/topography/
Now I want to add the locations along with the names (not just points). I tried various ways but I havn't got any clue on how to do that. Could anyone tell me how can this be done? Also, is it possible to combine this topographic map with the shapefile, so that I have a map with terrain information, coordinates and boundary of the area?


texts: Why the data type of date column is showing as string in QGIS but back in csv file it is date type?

texts:
I have created a .csvt file as name as same csv file and placed in same directory. After that data type of date column are showing as a date type but when I am checking it in attribute table values are showing NULL.

I want date column type to be a date type after importing csv in to QGIS.


texts:
I'm using the cdsapi python package to download ERA5 data in netcdf format. I'd like to plot it alongside data from a GPS track and so I'm trying to ensure that the coordinate reference systems (CRS) of both datasets are the same. Ideally, I'd like to convert the ERA5 data to WGS84.
When I open the ERA5 netcdf data with xarray, no CRS is recognized. I've found the spatial reference/earth model used in ERA5 is a sphere with radius 6367.47 km (assuming netcdf inherits from GRIB1 instead of GRIB2), but I can't find a name for this (incomplete?) CRS and don't understand how to use this information to convert the ERA5 data to WGS84.
The comment on this question suggests that I can just convert the longitude values of my ERA5 data to values between -180 and 180, set the CRS to WGS84, and be done with it. But this doesn't seem right, because the WGS84 uses an ellipsoid rather than a sphere to derive the coordinates of physical locations. How can I best convert the ERA5 data to WGS84? I'm interested in both the relevant theory and its practical application (preferably in python).
Here's a minimum working example of my current approach. First I download data using the following code.
import cdsapi
client = cdsapi.Client()
client.retrieve(
    'reanalysis-era5-single-levels', {
        'product_type': 'reanalysis',
        'variable':     '2m_temperature',
        'year':         '2017',
        'month':        '12',
        'day':          '17',
        'time':         '00:00',
        'area':         [90, 0, 0, 360],
        'grid':         [1.0, 1.0],
        'format':       'netcdf'
},
'era5_test.nc')

Then I load the data with xarray and convert it to a GeoDataFrame.
import xarray as xr
import geopandas as gpd
ds = xr.open_dataset('era5_test.nc')
df = ds.to_dataframe().reset_index()
gdf = gpd.GeoDataFrame(df, geometry = gpd.points_from_xy(df['longitude'],
                                                         df['latitude']))

Then I transform the longitude values and set the CRS to WGS84.
import numpy as np

def transform_era5_lon_to_wgs84_lon(lon):
    return np.mod(lon + 180, 360) - 360

gdf = gdf.apply(lambda col: col.apply(tranfrom_era5_lon_to_wgs84_lon)
                if col.name == 'longitude' else col)
gdf.crs = {'init': 'epsg:4326'}


texts: Databases supporting intersection of multipolygons and a set of points

texts:
Currently we use PostGIS to store thousands of MULTIPOLYGONs and we can then use ST_Intersects to return any that rows contain any point in an input collection of points. Are there any other open source databases that can support this type of functionality, or is this unique to PostGIS?

EDIT: WE need to have proper intersects functionality, not just MBR, all our geometries will be in 4326, and we are interested in solutions for mobile devices, going forward.


texts:
I have a line featureclass with many segments (for example roads or waterways). I want to merge line feature segments that touch each other until the next crossing. The picture shows an example. After the geoprocessing operation I want to have one long line, two middle lines and one short line.

I know how to do it with the editing toolbar for some features manually, but how do I do it for ALL features of the whole layer?

The current segmentation doesn't make sense in my project.

How do I do it in ArcMap 10.4 ?


texts: Labels disappear in greater scales in QGIS 3.6

texts: I'm having an issue with labels which disappear from QGIS while zooming in. I set up the property Show all labels for this layer(including colliding labels) to have them all yet it has no effect. This issue is affecting my composer, I can't see any label on it.


texts: How to make marker line thicker in QGIS?

texts:
I'm mapping railways, find that the usual cross marker line is so thin it doesn't show up in Print Composer at web resolution, and can't find any way of making it thicker, only the main line. Is there a way in the just released 2.0? If not, how do I do it in 1.8?

My System is QGIS 1.8.0 on OSX 10.6.8


texts: SAGA tools in QGIS only allow save as .sdat file?

texts:
I'm just beginning to learn how to use SAGA 2.1.2 tools within QGIS 2.12.1 on a Windows 7 64 bit computer by working through exercises in Mastering QGIS by Menke et al. (https://www.packtpub.com/application-development/mastering-qgis). Chapter 7 introduces the SAGA raster calculator and "Clip Grid with Polygon" tool. In both cases we are to save the result as a .tiff file, but the only file type available in the "Save To" dialogue is .sdat.

Is there something wrong with my installation of SAGA (I've tried using both the stand alone QGIS Windows installer and the OsGeo installer), or am I missing something else? Mastering QGIS appears to have been written for an earlier version of SAGA, so the tool dialogues in the book don't quite match those in QGIS 2.12.

How can I save the output of these SAGA tools as .tiffs?


texts:
Possible Duplicate:
  Looking for system specifications for a modern GIS workstation

I have been using the program to make maps to include in my reports over the past year or so. It is excellent. However, my computer seems to not be able to handle all the data sometimes, and the program crashes. It happens when I do too much editing to data points that I have manipulated.

My question is what system requirements are recommended to run this program with a lot of data points? Or does it simply depend on what I want to do with the program? I am probably going to get a faster computer primarily based on wanting to use this program.


texts: Create an array from field values in ArcPy

texts: I have a feature class that has a field of unique ID numbers. I would like to create an array of these numbers so I can loop over them in ArcPy. Any ideas?


texts: {'code': 'NoMatch'} OSRM API: What does it mean? And how can I avoid it?

texts:
I have RAW GPS trackers data, when I match those GPS coordinates to nearest NodeID, it gives me the No Match Error. I am using the following code snippet:

import requests

url =  'http://router.project-osrm.org/match/v1/driving/73.8984366,33.63299;73.132215,33.5563133'

payload = {"steps":"true","geometries":"geojson", "annotations" :"true", "radiuses": "0.5;40.5"}

response = requests.get(url,params=payload)

data = response.json()
print(data)

Can anybody tell me which thing I am doing wrong and how can I overcome this?


texts: I can't see labels in GE of points exported from shp to kml in Qgis

texts:
I have created a shp layer in Qgis (version 2.12.3-Lyon) with points. I want to see it in Google Earth, so I saved the shp as a kml. When I open it in GE Pro, I don't see the labels, only if I click on the icon, I see the field (label) attach to it.

I can change the name of each point in the left column of GE, and so the label appears, but I would like it to be automatically done.

Also, if I create a point directly in GE, I see the label right away, so... is there something I can do when exporting in Qgis from shp to kml?

The picture below shows four yellow points I exported from shp to kml, I manually changed the name of number 1 and 2, so the lable appears in the map. There is also one red point named Example which I created directly in Google Earth.


texts: Set a theoretical (not empirical) variogram in ArcGIS Geostatistical Analyst

texts:
I'm trying to do some Unconditional Gaussian Simulations using the Gaussian Geostatistical Simulation tool (see here). However, I don't have any data that I am doing this from - just a theoretical parameterisation of a variogram model (lag, sill, nugget etc).

The Gaussian Geostatistical Simulation tool requires "an input geostatistical layer resulting from a Simple Kriging model". Is there a way to generate one of these without any data underlying it, and therefore purely from a theoretical variogram model? It seems that the Gaussian Geostatistical Simulation tool will only be using the variogram parameterisation, not the data, so it seems like it should be possible - I just can't see how!


texts: Removing duplicate labels from different tables

texts:
I am making a map using data stored in PostGIS. I am serving multiple layers in the map (POIs, Cartographic, Roads etc.) and when I label these layers I have repeating labels, this is because some features are represented as both Polygons and Points in my data (present in both the cartographic layer and the POI layer).

I tried to fix the issue of duplicate features by running a Join in PostGIS based on the names and then removing the features from one table, using this query:

select c.name AS cartographic, subtype AS carto_type, type_strin AS pois_type, p.name AS pois
from cartographic c , isl_pois_priority p
where (lower(c.name) LIKE lower(p.name)) AND c.a1 > 0

At first I though this would work but then I realized that the names in both the tables are not exact matches, they are mostly the same but there are some differences, as shown here:

The point layer contains spaces( ) while the polygon layer has hyphens (-).

How can I account for differences such as this when I look for duplicate features?


texts: Setting height field in Create TIN" tool in ArcMap when using it in model?

texts: When using the tool on its own, you can pick the height field manually. I want this choice to be an option in a model, however I cannot add any parameter for the options in the box. Is this somehow possible?


texts: How to transfer layer data from OpenLayers to PostGIS database or QGIS?

texts:
Supposing I have a created some layers in OpenLayers containing only Geometry Points, how do I transfer my data to a postGIS database?

Is there a way to turn pure javascript/openlayers to a table in my database fast?

Or maybe transfer them first in QGIS?


texts: Can QGIS2Web turn some layers off when loading so that they do not initially appear on the map, but do appear in the menu

texts: I have created a map using QGIS2Web (OpenLayers option). Is there a setting to turn some layers off when creating the map such that it opens with some layers not showing, but contains the layer names in the map menu so the layers can be turned on later.


texts: Difference in Cycle ways and cycle relation routes in OpenStreetMap data model

texts:
Does relation[route=bicycle] include all ways that are cycle lanes or cycle tracks?

Edit:
I wanted to know this to see if I include all bike route relations, will it give me all possible bike ways or there will still be some ways that are not mapped to a relation


texts:
I installed QGIS Server via yumex on my CentOS 7.1 System and I have an Apache 2.4.6 Server running.

My Problem is, I can't show a QGIS project in my Chrome browser. Of cause, I read many instructions how to install QGIS Server and test it, but none of these worked for me.

My directories look like this:

Apache:

/var/www/cgi-bin/

/var/www/html/

/etc/httpd/conf/httpd.conf

QGIS:

/usr/bin/qgis

/usr/libexec/qgis/qgis_mapserv.fcgi

/usr/share/doc/qgis-server-2.8.2/wms_metadata.xml

I put a .qgs file in /var/www/html/wms/ where also are symlinks to qgis_mapserv.fcgi and wms_metadata.xml.

When I try to open my project via http://localhost/wms/My_project?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0 I got an Error:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
<ServiceException code="WMS configuration error">
There was an error reading the project file or the SLD configuration
</ServiceException>
</ServiceExceptionReport>


texts: Calculating distance from point to polyline

texts:
I am using ArcMap 10.4.1 - Basic use.

I have to determine for each point (leak), how many lines (pipes) there are within a certain distance (Spatial join - within a distance of).

Then I have to proceed with this filtered dataset and determine the distance from that point to all lines within a certain distance. I want the same calculation method as closest, but then for all lines and not only the closest. Additionally, a line can be in a certain distance of multiple points.

As I make use of the basic license, I do not have the option of using the proximity toolbox (near tool). Is there a workaround to determine the distance from a point to all lines within a certain distance?

I already thought of the tool points to lines, but as this is a many-to-many relationship it is not possible directly.


texts: What might slow Inkscape down when working with QGIS SVG or PDF output?

texts: When I import an SVG or PDF exported from QGIS print composer (2.2.0) into Inkscape 0.48 the vector graphic has large black lines and squares. These change size when I zoom in and out, and the graphic is very difficult to manage in Inkscape (slow reaction time when moving around the page and during difficult to group and ungroup vector layers). The map is not large (800 KB) and because it works perfectly other graphic programs (e.g., CorelDraw X5 and LibreOffice Draw 4.1) I believe it is a direct problem with Inkscape. Any suggestions?


texts:
Here his my test code

import os
print("in qgis, quitting")
os.sys.exit()

When i execute it in QGIS2.0 with line qgis --nologo --code q.py it shows an error on line 3 os.sys.exit()

Can you tell me what is wrong with this?


texts:
I have been successful at creating rules for already established footprints in CityEngine.  However, I recently received a project to create a proposed commercial and residential development.  I have all the known buildings extruded but for the new buildings I only have empty parcels.  Creating a rule to extrude based on floors, shape, height, and setback is not the issue and all are based on a zone, which I have a rule file for already.   What I can't figure out is how to create the building size based on Sq Feet, which is the only numbers given to me.

Is there a rule for Sq Feet/meters instead of width and length?

Also how can I put a random number of buildings on a parcel using a density based on Acreage?

For example 16-24 units per acre.  The acreage is included in the parcel features in CityEngine.


texts:
I'm am looking for a way to serve tiles while offline. I'm using Windows 7. Here's what I've done so far:

-Uploaded a portion of OSM data into TileMill
-Converted the OSM data into a file called osm.mbtiles
-Installed Python and Mapnik
-Installed TileStache (to C:\TileStache-1.49.10) and its dependencies (Pillow,   ModestMaps,SimpleJSON, Werkzeug)
-Placed osm.mbtiles into the TileStache folder (to C:\TileStache-1.49.10\osm.mbtiles)
-Written test.cfg to look like this:

{
  "cache":
  {
    "name": "Test"
  },
  "layers":
  {
    "osm":
    {
        "provider": {"name": "mbtiles", "tileset": "osm.mbtiles"}

    }
  }
}

-Place the config file here: C:\TileStache-1.49.10\test.cfg

Then, after all of that is done, I run:

C:\TileStache-1.49.10>tilestache-server.py -c test.cfg

After I run that command, I see:

 * Running on http:<IP_ADDR>:8080

So, I open up my web browser and go to:

localhost:8080/osm/preview.html

which is then routed to:

http://localhost:8080/roads/preview.html#10/37.8000/-122.2600

I see nothing on this page, but the server in the terminal is spitting out this:

Also, I've tried all the steps above using world map converted to .mbtiles using zoom level 0-8 and then manually changing the URL of the tilestache server page to be:

http://localhost:8080/roads/preview.html#3/50/50

But, I still get the same errors and nothing shows up. What should I try to fix this?


texts: Postgis: intersection between geometry and geography

texts:
I am trying to detect if a geometry and a geography intersect or not.
The problem is I cannot find such a method. There only is:

boolean ST_Intersects( geometry geomA , geometry geomB );
boolean ST_Intersects( geography geogA , geography geogB );

But this is not what I want, since (from my tests using the geography function) a cast is performed and not a conversion to get two geography objects.

If my geometry object is a line when I convert it to a geography object it should  become a curved line. But it is still a line.

How can I perform such a computation between a geometry and a geography?

In the following example, the red lines correspond to what postgis interprets as geography (projected of course in 2D) while the black lines correspond to what postgis interprets as geometry.

From this we can see that:

Line A as a geometry intersects line B, both as a geometry and as a geography
Line A as a geography does not intersect line B, both as a geometry and as a geography

How can I detect the intersection between line A as a geometry and line B as a geography?


texts: Using QGIS field calculator expression on Execute SQL

texts:
The following expression copy only minimum value from group/subset to a new column field in QGIS.

Case when "FID_Net"=minimum("class", "FID_Net") Then "FID_Net" Else 0 End

But this expression on field calculator takes about an hour to analyze 78000 field rows of data. How to use it on 'Execute SQL' or syntax to perform quickly?


texts:
I have performed Kriging using the autoKrige function, that is part of the automap package in R.

I obtained this as my output

I have realized that maybe the reason why I can not export the Kriging prediction plot is because the grid that  I setup (to performed kriging) is somehow wrong.

library(rgdal)
library(ggplot2)
library(ggmap)
library(GISTools)
library(sp)
library(gstat)
library(automap)
library(raster)
library(reshape2)

all.data<-read.csv("E:/Juan Arango/All_Data_Fall_17.csv", header=TRUE)
all.data
dput(data.frame(all.data)[,c("Lat","Lon","Secchi.Disk")])
coordinates(all.data)<- ~ Lat + Lon
class(all.data)

#Setup the gird
grid <- raster(extent(WWWL.Shape))
res(grid) <- 5
proj4string(grid)<-proj4string(WWWL.Shape)
gridpolygon <- rasterToPolygons(grid)
dry.grid <- intersect(WWWL.Shape, gridpolygon)
plot(dry.grid)

#AutoKriging SD
SDVar <- autofitVariogram(Secchi.Disk~1, all.data)
summary(SDVar)
plot(SDVar)
SDKrig <- autoKrige(Secchi.Disk~1, all.data, dry.grid)
plot(SDKrig)
plot(SDKrig$krige_output[,"var1.pred"])

Output dput(data.frame(all.data)[,c("Lat","Lon","Secchi.Disk")])

>dput(data.frame(all.data)[,c("Lat","Lon","Secchi.Disk")])
structure(list(Lat = c(334374, 334381, 334391, 334423, 334426,
334431, 334465, 334455, 334444, 334481, 334481, 334489), Lon = c(4088957,
4089003, 4089040, 4089041, 4088984, 4088965, 4089025, 4088982,
4088924, 4088929, 4089004, 4089039), Secchi.Disk = c(18L, 15L,
16L, 15L, 15L, 15L, 17L, 16L, 16L, 17L, 17L, 16L)), .Names = c("Lat",
"Lon", "Secchi.Disk"), class = "data.frame", row.names = c("1",
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"))

Output plot(SDKrig$krige_output[,"var1.pred"])

Any ideas on how fix this? Could it be related to way I setup the grid?


texts: How to get the northern hemisphere SCF from polar Perspective

texts:
I got the SCF (snow cover frequency) trend chart in gee. How to get the Arctic view like the following figure and the trend similar to the figure below. The trend chart obtained in GEE is a point, while the figure below is a block.Need to export to ArcGIS for operation? Need to choose RGB type when exporting?
here is my code link:https://code.earthengine.google.com/73df83507fa504e4735d4d30dd02b15c


texts:
I have a large shapefile with polygons. Some of them have roads between them, but apparently the roads have been deleted. Therefore, there is only space between the polygons. I want them removed in ArcMap. I need my solution to be automated since the data is large so snapping and such cannot be used. What I could think of was to add in the roads shapefile but I am not sure where to go from there. I was thinking I can have the polygons meet half-way, at the middle of the space (roads) between them.
Any idea how to do that?
This is how my map looks like now:


texts:
When I add a point in PyQGIS and then the object form opens, I want the attributes to be filled with given input or selection options. I want to prevent free text input. Without PyQGIS it is possible under Layer-Properties and attribute form with value mapping etc. See pic 1
In my case, my plugin loads a layer directly from the PostgreSQL database. Our users should not make changes in the layer properties. With this code I get the object form of the last object.:
layer = iface.activeLayer()
features = layer.getFeatures()
feature_list = list(f for f in features)
feat = feature_list[-1]
iface.openFeatureForm(layer, feat, True)

How can I access the attribute selection in openFeatureForm with PyQGIS? For example, I want the "bezirk" column to have only two options.


texts: Assigning different colors to different parts of text in labels using QGIS?

texts:
I'm using QGIS 2.14.3.

It is now possible to assign different colors (or fonts) to different parts of text in one label (I have seen How to make a different font and color of text in labels? )? If so, how?

Example

Although not perfect, @Knightshound 's comment provided a workaround solution I am happy with so far:
Using multiple rule-based labelling without expression rules and assigning Offset from point placements in order to achieve required result.

Result


texts: How to set global setting ellipsoid in QGIS?

texts:
Is it possible to define ellipsoid (None/Planimetric) into QGIS environment, not only for Project environment?
I use calculations without ellipsoid, but sometimes I forget to make ellipsoid as None/Planimetric.


texts: QGIS InputApp cannot read GDAL VRT and WMTS XML description files on iPhone

texts:
I tried to display various GDAL VRT raster files and WMTS XML description files in QGIS InputApp on iPhone without luck (see an example here: Storing GDAL VRT sources inside QGIS project files (.qgz, .gpkg)?).
Is the GDAL VRT and WMTS XML raster file support missing on iPhone?


texts: How to efficiently convert origin-destination coordinates into lines in R

texts:
Reproducible example to show what I mean:

# Create origins and destinations
odf = data.frame(fx = 1:5, fy = 1:5, tx = 0:4, ty = rep(1, 5))

The challenge is to convert this into straight lines connecting the origins (fx and fy) to the destinations (tx and ty). Here's the best way I could come up with, but it seems clunky and inefficient - is there a faster way to do it, without for loops?

l <- vector("list", nrow(odf))
for(i in 1:nrow(odf)){
  o = c(odf$fx[i], odf$fy[i])
  d = c(odf$tx[i], odf$ty[i])
  l[[i]] <- sp::Lines(list(sp::Line(rbind(o, d))), as.character(i))
}
l <- sp::SpatialLines(l)
plot(l)


texts: Can't normalize LiDAR point cloud with lasheight and -replace z (LAStools)

texts:
When I try to use lasheight with -replace z to normalize the point cloud, the height of points are changed (destroyed heights; see pictures below).

Without using -replace z everything is ok, but the normalized point cloud isn't obtained.


texts: Stop OpenLayers 3 map firing click event after dragging

texts:
I have an OpenLayers 3 map with a source of ol.source.MapQuest({ layer: 'osm' }). I haven't added a DragPan interaction, but the map is draggable anyway - which I want it to be.

I also have a click event for the map:

$(MapUtility.map.getViewport()).on('click', function(e) {
    //Stuff
});

which fires every time I finish dragging the map.

I used to have a similar problem with a DragBox interaction and solved it by calling e.preventDefault() at the start of my boxend event. However, that was an interaction I added and wrote the event for. The DragPan is in ol.js and I'd rather not change that if possible.

Is there something I can do in my click event to check whether the click was caused by DragPan? Alternatively, is there a way to amend the behaviour of this instance of the DragPan interaction without changing it globally?


texts: Accuracy of "on-the-fly" CRS transformation in QGIS

texts:
How accurate are the OTF transformations in QGIS (2.18)?

I created a 100m by 100m square polygon in a shapefile layer using a CRS of WGS84/UTM zone 14N (EPSG:32614). The project also uses the same CRS. With OTF transformation turned off, when I measure the area and the side of the square using the measurement tool, I get 10,000 sq m for the area and 100m on each side, as expected.

If I turn on OTF transformation and use the measurement tool, I get 10066.2065 sq m for the area and 99.9941 m for each side. Not only is the area incorrect, but multiplying the lengths of the measured sides (99.9941 x 99.9941) does not equal 10066.2065.

Is there a bug or am I just not understanding what OTF does?

Currently, most of my projects use OTF because I receive shapefiles with varying CRS's. It sounds like I need to have each layer reprojected to the same CRS as the project and turn off OTF if I want to get accurate areas and distances. Is this correct and is reprojecting a layer more accurate than OTF?


texts: How to create an OpenSeaMap Tile server?

texts:
I have in the past sucessfully created an OpenStreetMap Tile server. I now want to do the same for OpenSeaMap.
As far as I understand, the symbols for OpenSeaMap are already included in the OSM files you can download from sites like Geofabrik. The way I suppose it works is that you download a style file (e.g. from  mapnik-stylesheets and alter it so the OpenSeaMap symbols are shown. Is there any tutorial out there how to change the style file?


texts:
can somebody tell me how can i count character in a field either using field calculator or cursor.

i tried the below code :

import arcpy

inputFeatureClass = arcpy.GetParameterAsText(0)
InputField = arcpy.GetParameterAsText(1)
expression = "len(!" + InputField + "!)"

arcpy.AddField_management(inputFeatureClass,"CountChr","SHORT")
arcpy.CalculateField_management(inputFeatureClass,"CountChr",expression,"PYTHON_9.3")

but result is null.

i tried cursor :

import arcpy

#taking input from user

    inputFeatureClass = arcpy.GetParameterAsText(0)
    InputField = arcpy.GetParameterAsText(1)
    arcpy.AddField_management(inputFeatureClass,"CountChr","SHORT")

    cursor = arcpy.da.UpdateCursor (inputFeatureClass, [InputField, "CountChr"])
    for row in cursor:
        row[1] = len(row[0])
        cursor.updateRow(row)
    del cursor

but result is again null

can somebody tell me why this is happening ?


texts:
Almost all of the WFS/WFS-T servers, the feature identifiers -represented as gml:id in the XML document- that I have come across were in this format: [LayerName].[IntegerFeatureID], e.g., BarcelonaBuildings.1453. However, sometimes, it can also be like this: 12400.344.561.1. I have looked at the OGC documentation but it doesn't say anything about the structure of the feature identifiers. Should it be integer? Could it be a string? Could it have alphanumeric characters? Should it contain the layer name as part of it?
Is there a specific standard for WFS feature identifiers or can it be anything depending on the server as long as it is unique?


texts: batch merge error: Error in match.arg(method) : 'arg' must be of length 1

texts:
I am attempting to read in a series of polygon shapefiles from a directory and batch merge them into a single shapefile. They all have the exact same field names. I am using this code:

all_data <- do.call(rbind, lapply(data, rgdal::readOGR))
#data is a list of files that exist in the directory, but it does not
#contain all of the files in that directory.

After reading in all of my files with readOGR, r returns this error and the bind fails:

Error in match.arg(method) : 'arg' must be of length 1

any ideas about what might be causing this error?


texts: What is the PostGIS function for retrieving buildings by road side?

texts:
I want to get information of buildings by the road side only. Assuming that the building table has multi-polygon geometry and the road table has multi-linestring geometry, what would be a pgSQL Query to achieve the goal?

Thanks a bunch.


texts: Remove page number of image export from Atlas function of a multi-page composition (QGIS 3.6 print composer)

texts:
I have 2 pages as part of a multi-page composition in the print composer (QGIS 3.6) and for each page an export condition depending on the attribute value of the feature. This means that based on the attribute value of the feature it is decided whether the feature is printed in a vertical format (page 1) or in a horizontal format (page 2). For all features that are exported with the condition that triggers page 2 to be exported, a suffix with page number "2" is added. The file names of the output images therefore look like this:

feat1_name

feat2_name

feat3_name_2

feat4_name

feat5_name_2

etc

I dont' want a suffix to be addded for all images that are produced with the export condition of page 2. Is there a way to do this with the Atlas function of QGIS3.6?


texts:
How can I set the maximum scale for a layer? Sometimes the layer is not visible (it disappear), when the map scale is >= 1:250000. I'd like to set it on max 1:125000.

This code does not work:

    Map.Layers["LB"].MaximumResolution = 125000.0;

I'm developing in visual studio with C# (WPF)


texts: What is the best way to mosaic 2 million files?

texts: Trying to create 1 mosaic dataset from 2 million files. Would it be better to break the files into regions and then create regional mosaic datasets and then make a mosaic dataset of the mosaic datasets (does that make any sense?)? Or just slug it out and do one dataset of 2 million files? BTW the datatype is CIB


texts: How to create a python plugin in QGIS 2.4.0?

texts:
While I am learning to create a python plugin in QGIS 2.4.0, I have followed the procedure explained in "https://qgis.readthedocs.org/en/latest/docs/pyqgis_developer_cookbook/13_plugins.html#developing-plugins".

When I initiated QGIS, and opened the Plugin manager, it says under the "Invalid" tab,

This plugin is incompatible with this version of QGIS
Plugin designed for QGIS 1.8 - 1.9
This plugin is experimental
HelloWorld
This is a plugin for greeting the (going multiline) world

Can anybody help in describing the correct procedure?


texts: How to get CQL_FILTER parameters from vector polygon

texts:
map projection is EPSG:900913, displayprojection for map EPSG:4326.
vector layer is polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer"); with draw polygoon option

with following code I get CQL_FILTER

var myLatLonSquare = polygonLayer.features[0].geometry.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:4326"));

var testArray = "WITHIN(GEOM, ";

testArray = testArray + myLatLonSquare;

testArray = testArray.replace("MULTIPOLYGON(", "POLYGON");

antennaLayer.mergeNewParams({
    "CQL_FILTER": testArray
});

as it's shown on the images(the site does not let me to upload images yet) it gets different location coordinates. How to solve it?

UPDATED:


texts:
I would like to test the Ol-Cesium on my computer with this example:
https://openlayers.org/ol-cesium/examples/oldfashioned.html

I saved the olcs.css, olcesium.js and Cesium.js file into my webserver's folder.
So, here is my code (I replaced only the lines where JS and CSS are located).

The 2D view with only OpenLayers is works well, but the 3D Cesium view doesn't. The map is black, and I got no error messages in console.

Do you have any tips what cause this error?

    <meta charset="UTF-8">
    <link rel="stylesheet" href="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/css/ol.css"
        type="text/css">
    <link rel="stylesheet" href="olcs.css" type="text/css">

Old-fashioned example

    <input id="enable" type="button" value="Enable/disable" />


texts:
I have a DEM in QGIS and I want to calculate a ruggedness index that calculates the sum change in elevation between a grid cell and its 8 neighbor grid cells. I have seen several methods to do neighborhood analysis like r-neighbor or LecoS plugin, but from what I've seen they only can do some calculations like average, sum, maximum, etc. I need a custom analysis to build my index. The calculation for the index is this:

Index=[(Σ(el(0,0)-el(i,j))²]^½

Where el is the name of the elevation cell (i and j are -1, 0 or 1).

I think in ArcGis it's possible to do this custom calculation with DOCELL, but I don't know what's this, I don't have access to this program and I don't know how to use it.
Is there an option to do it with QGIS, R-statistics or anything else?


texts: Can two feature classes share geometry and have different attributes with ArcGIS Desktop?

texts:
Is there a way for two feature class (say parent and child) to share same geometry shape but have their own set of attributes?
Features created or updated on parent feature class transfer its geometry shape to child feature class but not any of its attributes.
Both of feature class will be in same GDB and its storage type is SDE.ST_Geometry.

ArcGIS 10.3, Oracle RDBMS: 12.1.0.2


texts: How can I assign road names from OSM to gis linestrings using open source tools?

texts:
Starting with a shapefile of linestrings I want to assign street names to these lines if there is a match with a road/street in OpenStreetMap.

There are no exact matches as the linestrings have a different source. It could be that some linestrings have no counterpart in the OSM data or that some linestrings are longer than the roads in OSM in which case I will probably have to cut my own linestrings to be able to name them properly.

I love to hear a complete solution, but tips and hints are also welcome.


texts: Wrong/Different values from $area and Group Stats

texts:
As mentioned in other questions there seems to be a problem with $area when OTF  is enabled. In QGIS3 it can not be disabled

My project hast EPSG 31255, some layers area 31255 some have different crs.
When i calculate the area in 31255 layers via $area in fc the results are different from groupstats.
When I open a whole new project and load only the layers in 31255, do $area it seems to work, I get the same result like from Groupstat before.

Is there workaround/solution for a existing project (e.g. not open a seperate project, doing $ area, closing, open again in other project...) as OTF can not be disabled?


texts: Monkey-patching Python SSL package with QGIS

texts:
I am creating a plugin which interacts with a third-party API (through the package ArlulaApi). At some point in my package tree (for the plugin), gevent is imported, meaning that a monkey patch is required for the Python SSL package to work correctly (otherwise, RecursionError is thrown - see here). Currently, I am trying this at the very top of my plugin code:
import gevent.monkey
gevent.monkey.patch_socket()
gevent.monkey.patch_ssl()

However, this throws a warning:

Monkey-patching ssl after ssl has already been imported may lead to
errors, including RecursionError on Python 3.6. It may also silently
lead to incorrect behaviour on Python 3.7. Please monkey-patch
earlier. See https://github.com/gevent/gevent/issues/1016. Modules
that had direct imports (NOT patched): ['urllib3.util
(C:\OSGEO4~1\apps\Python37\lib\site-packages\urllib3\util\init.py)',
'urllib3.util.ssl_
(C:\OSGEO4~1\apps\Python37\lib\site-packages\urllib3\util\ssl_.py)'].

It appears that SSL is imported when QGIS boots up, before my plugin is loaded, and so the monkey patching does not have the desired effect.
What are my options here?
Am I missing something really obvious?
Are there ways to monkey patch earlier, or do I have to create a plugin that does not require monkey patching?


texts: Joining each grid cells with many records in QGIS

texts:
I have

a grid (10 x 10 km) where each cell is identified by a code
a shapefile, a point layer, with the year when each point was sampled

as shown in the figure below.

As you can see from the image below, the year is identified by a color and in each cell I have many points of different years.

What I want to obtain is an intersection between the two layers, specifically, I want the same grid with a new column showing the year(s) of the points within each cell. I show you below an example

Cell_ID       Year_of_sampling
10kmE275N271  2014-2015
10kmE276N271  2015
10kmE277N271  2013-2016
10kmE278N271  2013-2015-2016

It seems an easy task, but with Vector -> Geoprocessing -> Intersection is not possible. Any ideas?


texts: I cannot insert into a PostGIS raster table when I add raster constraints. "raster_table" violates check constraint "enforce_nodata_values_rast"

texts:
I have a raster table in PostGIS and I have a trigger that inserts into that raster table.I realized that for 130 different raster inputs, all of them voilated raster constraints.
In other words, whenever the trigger tried to insert into the raster table, there was an error saying:
new row for relation "raster_table" violates check constraint "enforce_nodata_values_rast"

I have no idea what is going on. I checked the raster input but it is not filled with "no data" values.
I created another table with the same trigger but I did not add raster constraints. This time all the rows were successfully inserted into the table!
I think the problem is with raster constraints. They are somehow doing something wrong!
Do you have any idea what is going on?


texts: Set and store QGIS master authentication password with PyQGIS

texts:
In a fresh QGIS installation I would like to set the master authentication password and store it in the password manager using PyQGIS (e.g. in a startup script).
The method QgsAuthManager.setMasterPassword('some_password') sets the password but does not store it in the password manager. Thus, with the next QGIS start I'm prompted to enter the password and can opt to store it (default):

Is there a way to set and store the master password in one step via PyQGIS authentication API?


texts: Create a unique raster from a grid_terrain function from LASCatalog files

texts:
When you use grid_terrain function in lidR with a catalog, the result is a virtual raster mosaic is returned (see gdalbuildvrt). But when i clic on (gdalbuildvrt) in pdf vignette, nothing is under the clic.
How can i create a unique raster of this virtual result ?


texts:
I want to trace administrative borders as a layer in Google Earth. The problem is that although I know how to draw and save a polygon,I don't know how to draw contiguous shapes using the polygon tool. Whenever I add points after having finished one polygon, it just draws lines through the finished shape.

Are there any tutorials out there I can follow?


texts: Fail to conduct resistanceGA with run_gdistance

texts:
I am using a landscape surface resistance distance counting R packages called resistanceGA
It can count commuteDistance with the assistance of another package gdistance

It uses the following code to combine two of my resistance surfaces

variable1<-raster(file.choose())
variable2<-raster(file.choose())
r.stack<-stack(variable1,variable2)

#prepare the gdist input and ga input
GA.inputs <- GA.prep(ASCII.dir = r.stack,
Results.dir = write.dir,
method = "LL",
max.cat = 1000,
max.cont = 1000,
seed = 555,
parallel = 4)

gdist.inputs <- gdist.prep(length(samples),
samples = samples,
response = lower(as.matrix(genetic.distance)),
method = 'commuteDistance')

The samples is SpatialPoints objects and genetic.distance is my genetic distance matrix. Both work fine with Circuitscape, but not in the case of gdistance.

#and make transformation and combine
PARM <- c(8, 5, 100, 1, 1, 80)

Resist <- Combine_Surfaces(PARM = PARM,
CS.inputs  = CS.inputs,
GA.inputs = GA.inputs,
out = NULL,
p.contribution = TRUE)
Resist

gdist.response <- Run_gdistance(gdist.inputs = gdist.inputs,
+ r = Resist$combined.surface)

However, it returned error as following

Error in LU.dgC(a) : cs_lu(A) failed: near-singular A (or out of memory)

I have checked that none of my spatial points is in the NA cell.
If I change gdistance with CS_run or cs.inputs it works fine with Circuitscape.
Does one have idea how to solve this?


texts: Changing the geometry of polygon in OpenLayers 2

texts:
I would like to programmatically change the geometry of a polygon. feature.geometry.move() works OK, but I rather need supply a whole new geometry. When I try feature.geometry = newGeometry, the feature duplicates itself, rather then changes its position. I read the relevant code in OpenLayers and I can't see why is this happening. Any help welcomed.

function init(){
    var map = new OpenLayers.Map('map');
    map.addLayer(new OpenLayers.Layer.OSM("Mapnik"));
    map.setCenter(fromLL(new OpenLayers.LonLat(14.302,50.093561)), 14);

    //vector layer
    var layer = new OpenLayers.Layer.Vector("");
    map.addLayer(layer);

    //one feature
    var geometry = fromLL(OpenLayers.Bounds.fromString("14.2989,50.0935,14.3018,50.0965")).toGeometry();
    var rectangle = new OpenLayers.Feature.Vector(geometry);
    layer.addFeatures(rectangle);

    //move it 30pixels up - works
    rectangle.geometry.move(0,map.getResolution()*30);
    layer.redraw();

    //change geometry - wrong - duplicates
    rectangle.geometry = fromLL(OpenLayers.Bounds.fromString("14.302,50.0935,14.6018,50.0965")).toGeometry();
    rectangle.geometry.clearBounds();
    layer.redraw();
}

function toLL(obj){return obj.transform(new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection("EPSG:4326"));}
function fromLL(obj){return obj.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));}


texts: Mask clouds in LandSat 8 surface refletance image

texts: I would like to know how to remove the clouds in a ImageCollection of LandSat 8 Surface Reflectance (SR) image and create a single image without clouds using google earth engine, to calculate NDVI. I wore a javaScrit code to remove clouds in Landsat 8 TOA Reflectance, but it doesn't work for SR imagens...


texts: How is georeferencing information stored in geo-refrenced 3d models?

texts: I have a .obj file downloaded from Open Drone Map, labelled as geo-referenced model. How can I figure out the geo-referencing information stored in it? I need to use it in unity or any other such software.


texts: What is the correct syntax for the item.publish command to update a hosted feature layer?

texts:
Trying to use the code provided at the bottom of this entry
overwrite feature class in arcgis online using python
to overwrite an existing hosted feature layer in my ArcGIS Online content.
I have zipped up a file geodatabase which contains one feature class.
The item.update command results in a True response
But, when I reach the publish command, I get an "error file_type must be provided".
I have tried many iterations of file_type (eg. fileType=fileGeodatabase, file_type=fileGeodatabase, etc)
but keep getting various errors.
My code:
from arcgis.gis import GIS
gis = GIS(url="myarcgisonline", username="myusername",password="mypassword")
datafile = r"D:\....\upload.zip"
item = gis.content.get("the item id for my existing hosted feature layer")
item.update({},datafile)
item.publish(overwrite=True)

The error:

Traceback (most recent call last):   File "", line
1, in    File "C:\Program
Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis_init_.py",
line 10118, in publish
raise ValueError("A file_type must be provide, data format not recognized") ValueError: A file_type must be provide, data format not
recognized

How can I determine the correct syntax for the last item.publish command?
(I have tried using the editing setting of the hosted feature layer to both enabled and disabled)


texts: PyQGIS: Change attribute value doesn't work, results in NULL

texts:
I am writing a QGIS plugin, which at one point attempts to change several attribute values on a layer. However, in the end no changes are made. If I punch similar code into the built-in Python Console, it works as expected.
Code (paraphrased):

grid = self.dlg.gridMapLayerComboBox.currentLayer()
# layer from GUI
prov = grid.dataProvider()
grid.startEditing()

if prov.fieldNameIndex("NewField") == -1:
    prov.addAttributes( [ QgsField("NewField", QVariant.Int)])
if prov.fieldNameIndex("NewField2") == -1:
    prov.addAttributes( [ QgsField("NewField2", QVariant.Int)])

grid.updateFields()
fldIdx = prov.fieldNameIndex("NewField")
fldIdx2 = prov.fieldNameIndex("NewField2")

for feature in grid.getFeatures():
    ID = feature.id()
    grid.changeAttributeValue(ID, fldIdx, 42)
    grid.changeAttributeValue(ID, fldIdx2, 101)
    grid.updateFeature(feature)

grid.commitChanges()

So there are several similar questions on the site that seem like they should answer my question and I believe I've followed advice in the solutions, but to no avail. There is something I am just not seeing!

How to change the value of an attribute using QgsFeature in PyQGIS?
Got Null values when updating attributes with PyQgis

This does not work either:

feature.setAttribute(fldIdx, 42)


texts: Can't open Qt Designer with qgis-designer.bat

texts:
I'm trying to open Qt Designer using the qgis-designer.bat file, but I'm receiving the following error message

  Windows cannot find 'designer.exe'. Make sure you've typed the name correctly, then try again.

Any solutions?

My environment: QGIS 3.4.1 installed via OSGeo4W Network installer.


texts: Creating a GP script to update a table in SDE

texts:
I need to create a geoprocessing script to update a table on an SDE server, with some text input from the user.

I thougth what I needed to do was create a toolbox with a python script associated with it, but it appears more than that; is there a resource online to help me do this, or have you any suggestions?

I thought I'd simply create a python script with the text to input along with 2 other parameters and inside the script, I'd create the link to the database, and simply use the input to update the table.  This, however, isn't proving the right way to do it, so please, any ideas?

Thanks in advance.

Resolved


texts: Why does Calculate button remain gray in Group Stats Plugin for QGIS?

texts:
In my case I failed to use Group Stats plugin (2.0.30) with QGIS 2.14.11 and 2.18.3 on windows64.  Tested on several datasets: points, polygons, and csv.- But I am not sure what I have missed.

I want to click on this Calculate button.


texts: Converting las files from version 1.2 to 1.3

texts:
I have lidar data set which initial waveform data is in LAS 1.3. The classified point cloud needs to be delivered in the same version, but my processing software (TerraSolid V15) allows me to write point cloud only in LAS 1.2.

I am afraid processing LAS 1.3 to LAS 1.2 may lose the information of returns greater than 5 (possible returns 6 and 7). Will this make any big difference in the final output? And is there any software/tool that can save LAS 1.2 to LAS 1.3.

It may sound silly, but will it make sense processing LAS 1.3 in LAS 1.2 and then change it back to 1.3 again?


texts: Why are area queries in my own Overpass server returning different results from the official server?

texts:
Here's my query to collect all of the States within the US:

[out:json];
area['admin_level'='2']['name'='United States'];
(relation['admin_level'='4'](area););
out tags;

My Overpass server returns Baja California in the results for this query, even though this state is in Mexico. Overpass Turbo correctly excludes this from the results.

Similarly, my query to collect all of the cities within Indiana returns Chicago in the results (while the Overpass Turbo only includes East Chicago & New Chicago):

[timeout:900][out:json];
area['ISO3166-2'~'^US']['admin_level'='4']['name'='Indiana'];
(relation['admin_level'~'8'](area););
out tags;

I'm using the wiktorn/overpass-api Docker image that I started it with:

docker run \
  -e OVERPASS_META=yes \
  -e OVERPASS_MODE=clone \
  -e OVERPASS_DIFF_URL=https://planet.openstreetmap.org/replication/minute/ \
  -v /home/ubuntu/overpass_clone_db/:/db \
  -p 80:80 \
  -i -t \
  --name overpass_world \
  wiktorn/overpass-api

Is there something that I can do to correct these results?


texts: How to generate reports from a Shapefile?

texts:
i hope i can describe my problem. I´m into planning a guidiance system for hiking. And like it is, there will be signs with poi and the distance etc. on it. I´m collecting the data in a shape with a stucture like this:

place_id | sign_id | lon | lat | orientation | destination_1 | icons_1 | dist_1 | destination_2 | icons_2 | dist_2 | photo_1 | photo_2 .... and more

Now i want to get a single report for every place like this:

I´ve tried to find a plugin or to get it done over the print composer with no luck.

Every help is welcome, Marc

EDIT: i work on windows with qgis 1.9.90


texts: Wrong values after resizing (resampling) rasters using cv2.resize (Python)

texts:
I have two images (aerial photographs):

ImageA is 4740x4240 and cell size is 0.1 m
ImageB is 1849x1653 and cell size is 0.25 m.

I want ImageB with the same size than ImageA. I used the following code to generate the new image:

import gdal
import cv2
from PIL import Image

## Input
imageA = cv2.imread(r"\\imageA.tif", -1)
imageB= cv2.imread(r"\\imageB.tif", -1)

## Output
output = r"\\imageC.tif"

## ImageA dimensions
x = imageA.shape[1]
y = imageA.shape[0]

## Resizing imageB
imageC = cv2.resize(src = imageB, dsize = (x, y), interpolation = cv2.INTER_NEAREST)
imageC = Image.fromarray(imageC).convert('L')
imageC.save(output)

As expected, the new image is 4740x4240 with a cell size of 0.1 m. But I get wrong values for left and right borders (value 255) as you can see below (for the right border). How could I resolve it and obtain interpolated values?


texts: OGROGR and SQL: unexpected reserved keyword error?

texts:
As I do the following query on naturalearth places.shp :

ogr2ogr -f GeoJSON -sql "SELECT * FROM ne_10m_populated_places WHERE ADM0NAME = 'India' ORDER BY POP_MAX DESC LIMIT 1,30" places.tmp.geo.json ne_10m_populated_places.shp

I get the following error:

ERROR 1: SQL Expression Parsing Error: syntax error, unexpected
reserved keyword, expecting end of string. Occured around :
DM0NAME = 'India' ORDER BY POP_MAX DESC LIMIT 1,30
                                        ^

How could I pass over it ?


texts: Divide a Square to a serval equal squares using Acrgis

texts:
I'm looking for an algorithm to split a square to a SEVERAL equal squares:
I have only :

x min , y min
x max , y max

please see picture (not valid picture only to describe problem):

any suggestions please.


texts:
I just started to play a little bit around OpenLayers and I am experiencing some issues while trying to let the user draw a bounding box within a map. For this, I looked at this example and tried to modify the code accordingly without much success: whenever a new box is drawn, I'm getting the following error:

Uncaught TypeError: Object [object Object] has no method 'getBounds'

This is my code (simplified) so far (please, notice it's written in CoffeeScript):

######################################################################
############################## OPEN LAYERS ###########################
######################################################################

    mapOL = null
    boxLayer = null
    heatmapOL = null
    extent = null
    panel = null
    drag = null
    draw = null

    $('body').ready () ->
        fromProjection = new OpenLayers.Projection("EPSG:4326");    # Transform from WGS 1984
        toProjection   = new OpenLayers.Projection("EPSG:900913");  # to Spherical Mercator Projection
        extent = new OpenLayers.Bounds(2.101425, 41.309534, 2.2621, 41.45585).transform(fromProjection, toProjection);

        mapOL = new OpenLayers.Map('openlayers', {
            controls: [
                new OpenLayers.Control.Attribution(),
                new OpenLayers.Control.Navigation()
            ],
            numZoomLevels: 18,
            displayProjection: fromProjection,
            projection: toProjection
        })

        mapnik = new OpenLayers.Layer.OSM.Mapnik('Mapnik', {
            displayOutsideMaxExtent: false,
            wrapDateLine: true
        })

        boxLayer = new OpenLayers.Layer.Vector('Box layer');
        mapOL.addLayers([mapnik, boxLayer])

        mapOL.addControl(new OpenLayers.Control.MousePosition())
        drag = new OpenLayers.Control.DragPan({
            title: 'Drag map'
        })
        draw = new OpenLayers.Control.DrawFeature(boxLayer, OpenLayers.Handler.Box, {
            title: 'Select a bounding box'
        })
        panel = new OpenLayers.Control.Panel({
            defaultControl: drag
        })
        panel.addControls([drag,draw])
        mapOL.addControl(panel)

        mapOL.setBaseLayer(mapnik)
        mapOL.zoomToExtent(extent)

The map and its controls are correctly displayed (I am omitting CSS and HTML code for simplicity). Any clues on what I am missing?


texts: Total of attribute field of point layer per polygon layer

texts:
I have a polygon shapefile of many lakes, I also have a point shapefile of locations on those lakes where fish were caught.

The point shapefile contains the attributes:
Fisherman_iD, Fish_Caught, Lat, Long.

The polygon shapefile contains the attributes Lake_name, Points_per_polygon(PNTCNT)

Each point obviously has differing entries under the fish_caught field.

What I want to get is the average fish caught per lake (polygon).

So I need to have a total number of fish caught, per individual polygon, and then I can divide that by the PNTCNT file I create using the Points in a Polygon tool.

Ideas? I am relatively new to QGIS.


texts: Getting the center of a feature collection in GeoJSON?

texts:
I'm working on a project where I make a call to my API to get back GeoJSON for a 3 mile radius from a given address. It returns back towns for me in a feature collection by using PostGIS/Tiger. The data comes back correct and works.

I then load this data into Google Maps like so:

 map.data.addGeoJson(data);

Is there a way to now take the geojson that is loaded, and center in on that point?

I have a feature collection of polygons for an address in a 5 mile radius. I was hoping I could just get the center without having to update my SQL query and return it from the API.


texts: Fitting wrap column in print composer of QGIS

texts:
i have an attribute table in the map composer, and the field i want to see is quite long so i wrap it, but the field width is not fitting this new length.

Is QGIS 2.4 able to do that?


texts: Exporting Featureclass to Shapefile with field names changed using ArcObjects?

texts: I have some annotation feature classes stored in a Pgdb.I want to export them to a shape file.Some field name need too be changed in that shape file.I am using vb .net to do this.Any help is appreciated.


texts: How to calculate/find abscissa and ordinate resolution values on ArcMap 10.1

texts: I am filling out FGDC Metadata for a product. Abscissa and Ordinate resolution are required fields. They are not automatically populated on Arcmap 10.1 and I can't find a way to locate (or calculate) them. Does anybody know how to come up with these values?


texts: I am importing Excel sheets into ArcGIS for map-making purposes. I have one column that is not recognized. I cannot figure out what is wrong with it, I have deleted it and remade it, checked the format of the column itself and nothing is different. I know this is probably not the best explanation, but I have attached an image which will hopefully elude to what I am trying to do. The column to the right Polgray is an example of a working column, and the column to the left McElmo is an example of a column that is not working. I am 100% stumped. I have done over 100 of these now with no problems except for these two Excel sheets. I cannot find anything different, nor can I find a reason for this error. ArcGIS acts like the column to the left does not exist.


texts: How to use for loop to add and calculate new field?

texts:
I am trying to use for loop to add and calculate a newfield for 2 shapefiles and a different new field for 2 other shapefiles. When I tried to do these 2 loops as one, it did not work so I separated them into 2 loops and it worked. I am using python 2.7 stand alone (arcmap 10.2).

more details: So I want to make a new field and add 'CA' to shapefiles containing _CA.shp (*_CA.shp). I also want to make a new field and add 'AZ' to shapefiles containing _AZ.shp (*_CA.shp). When I created a loop (the first code), I got my roads_CA and railroads_CA to work but roads_AZ and railroads_AZ did not create a new field containing 'AZ'. I did not get an error which means the loop ran through but I guess the elif came out false so it did not create anything.

here is my code:

    CAshp = arcpy.ListFiles("*_CA.shp")

    for CA in CAshp:
        if (CAshp == 'roads_CA.shp', CAshp == 'railroads_CA.shp'):
        newField = 'StateAbbre'
        arcpy.AddField_management(CA, newField, 'TEXT')
        arcpy.CalculateField_management(CA, newField, "'CA'", "PYTHON_9.3")
    elif (CAshp != 'roads_AZ.shp', CAshp != 'railroads_AZ.shp'):
        AZshp = CAshp.extend(arcpy.ListFiles("*_AZ.shp"))
        newField = 'StateAbbre'
        arcpy.AddField_management(AZshp, newField, 'TEXT')
        arcpy.CalculateField_management(AZshp, newField, "'AZ'", "PYTHON_9.3")


texts: How to add a prefix to unique ID using Attribute Assistant?

texts: I want to add a prefix to my unique id field; for example, “MH123”.  I am currently using Attribute Assistant Tool. How can I edit my Dynamic Value Table to add a prefix to my unique ID?


texts:
I am writing a research paper on watershed delineation and I am looking for experiences/opinions/authoritative answers on:

What guides a hydrologist when it comes to choosing between Strahler's (1952) or Shreve's (1996) stream ordering method?

Does morphology play a role? Or the quality of the stream network extraction help decide?
When do I choose either of the methods?

Shreve, R. L. 1966. “Statistical law of stream numbers”. J. Geol. 74:17-37.

Strahler, A. N., (1952), “Hypsometric (Area-Altitude) Analysis of Erosional Topography”. Geological Society American Bulletin, 63: 1117-1142.


texts:
This question is just theoretical but it occurs to me that it can't be all that impossible.

Seeing as how Google is just a big web spider that essentially starts out at one page, like index everything starting at such and such a page dealing with basketball, how difficult/impossible would it be to give a starting point (GPS) from a city and have it find all the roads/intersections in a 10-mile radius for example? Basically 'crawl' and keep track or road names, gps points, and intersections wherever it takes a fork.

The Google Maps API would probably come into big use there, the only speedbump might be the web requests max. I could use OpenStreetMap but I'm not sure it would be able to provide as much accessibility. I'd like to write as little XML parsing as possible.


texts: Make values on some pixels as Null on Google EarthEngine

texts:
I have my code as:

function Kelv_Cels(image){
// This function transform Kelvin to Celsius
  var Kelvin = image.select("B6").multiply(0.1).rename('Temp_Celsius');
  var Celsius = Kelvin.subtract(273.15);

  return image.addBands(Celsius);
}

var start = 2007;
var end = 2008;
var landsat7_SR = ee.ImageCollection("LANDSAT/LE07/C01/T1_SR")
                  .filterMetadata('WRS_PATH', 'equals', 29)
                  .filterMetadata('WRS_ROW', 'equals', 47)
                  .filterMetadata('CLOUD_COVER', 'less_than',30)
                  .filterDate(start+'-01-01',end +'-12-31')
                  .map(addNDVI)
                  .map(Kelv_Cels)
                  .map(Clip_state);
print(landsat7_SR);

var chart_max = ui.Chart.image.seriesByRegion(
  landsat7_SR,clinic_shp, ee.Reducer.max() , "Temp_Celsius", 30, 'system:time_start', 'layer')
  .setChartType('ScatterChart')
  .setOptions({
          title: 'Max temperature over time in clinics of State of Colima, Mexico',
          vAxis: {title: 'Temperature (Celsius)'},
          lineWidth: 1,
          pointSize: 4,
          series: {
            0: {color:  '7B241C'},
            1: {color:  '76448A'},
            2: {color:  '1A5276'},
            3: {color:  '117864'},
            4: {color:  '239B56'},
            5: {color:  '9A7D0A'},
            6: {color:  '873600'},
            7: {color:  'B3B6B7'},
            8: {color:  '5F6A6A'},
            9: {color:  'EC7063'},
            10: {color: 'A569BD'},
            11: {color: '16A085'}

}});

print(chart_max)

Clip_state is a vector of my state.
And what i want is to extract the stadistics of each region, but as you can see in the attached image.
But some pixels have invalid data, and i use this code to try to fix this data.

function correc_image(image_0){
  var image = image_0.select('Temp_Celsius');
  var percentile = image.reduceRegion(ee.Reducer.percentile([25,75]),Colima_shp );

  var Q3 = percentile.get('Temp_Celsius_p75').getInfo();
  var Q1 = percentile.get('Temp_Celsius_p25').getInfo();
  var IQR = Q3 - Q1;

  var LV = Q1 - 1.5*(IQR);
  var HV = Q3 + 1.5*(IQR);

  var HV_image = image.lt(HV);
  var LV_image = image.gt(LV);

  var image1 = image.multiply(HV_image).multiply(LV_image).rename('Temp_filtrada');

  return image_0.addBands(image1);
}
landsat7_SR = landsat7_SR.map(correc_image);

And i works on a sigle image, but when I use it in a collection it gives me the error.

ImageCollection (Error)
Parameter 'value' is required.

Did you what can I do to solve this problem?
]1


texts:
I am currently endeavouring to use qgis2threejs to create a 3D visual using DSM and orthomosaic data captured using my unmanned aircraft system (UAS). Originally the plug-in seemed to work perfectly, as you can see by my results here: http://paulgeorgie.com/culzean.html

Having now updated the plug-in via the QGIS repository to version 0.7.2, I can no longer seem to get it to work.  The output HTML file still shows a 3D DSM however the orthomosaic is now just entirely black.

Has anyone else encountered this problem?

Is it related to the amount of data I'm trying to process perhaps?

Or the plug-in?

Or my hardware?

As for hardware, my desktop is currently running Windows 8.1 on an i7-5820k (Haswell-e) CPU with 32Gb DDR4 RAM and Powercolor Radeon R9 290X 4096MB GDDR5 Graphics Card. My Asus Zenbook also encountered the same issue.


texts: Adding multipoint to feature layer using ArcGIS API for JavaScript?

texts:
I want to display a marker whenever I receive websocket message but with this code I can only display the first point and then when I receive the second message I can't display it.

socket.onmessage = function (e) {

    var message = e.data;
    alert("Message is received...");
    console.log(message);
    featureCollection.layerDefinition.drawingInfo.renderer.symbol.angle = course;

    featureCollection.layerDefinition.drawingInfo.renderer.symbol.url = alpha;

    featureLayer = new FeatureLayer(featureCollection, {
        id: 'Tracking',
        infoTemplate: popupTemplate
    });

    //associate the features with the popup on click
    featureLayer.on("click", function (evt) {
        map.infoWindow.setFeatures([evt.graphic]);
    });

    var location = {
        latitude: lat,
        longitude: Lon

    };
    point = new Point({
        longitude: 0,
        latitude: 0
    });

    point.longitude = location.longitude;
    point.latitude = location.latitude;

    console.log(point);
    graphic = new Graphic({
        geometry: point
    });
    var contentString = '
' +
        '
' +
        '
' +
        '
 Info
' +
        '
' +
        '
 Date :  ' + times +
        '
 Vitesse :  ' + speed + '  km/h  ' +
        '
 Distance :  ' + distance + '  m  ' +
        '
 Altitude :  ' + alt + '  m  ' +
        '
 Direction :  ' + course + '  °  ' +
        '
 Status :  ' + infostatus +
        '
' +
        '
';

    attr["description"] = contentString;
    attr["title"] = "Device :0906050400030201";

    graphic.setAttributes(attr);

    features.push(graphic);
    console.log(features);
    map.addLayers([featureLayer]);
};

map.on("layers-add-result", function (results) {

    featureLayer.applyEdits(features, features, null);

});

How can I fix this code to display multipoints ?


texts: Creating new feature point at minimum distance between numerous points using QGIS?

texts:
Is there a tool or workflow that can create a feature at minimum distance or equal distance between several points?

This is now a QGIS question but to clarify I've attached a couple images to show what I mean with three points:

Below are a couple candidate points:

Here I've created a some Thiessen Polygons:

Then I convert the vertices of the Thiessen polygons to points and select the point at the center:

This is just a simple example of what I'd like to learn how to do on a larger scale, e.g. to create more than one "minimum distance" points over an area containing a lot more candidate points. The goal is to automate this as well so the user doesn't have to go in and select the points located between the desired points and omit those on the edge.


texts: Merging hillshade / DEM data into color relief single geotiff with QGIS and GDAL

texts:
I have a single-band geotiff DEM and I have managed to create a color version of it (with single-band pesudocolor) and a hillshade (with Terrain Analysis --> Hillshade).
As per the online lesson (https://docs.qgis.org/2.2/en/docs/training_manual/rasters/terrain_analysis.html), I can overlap the hillshade over the color map and it looks great. My only problem is I want to export it out of QGIS as a single unified GeoTIFF for use in other softwares.

This (http://dirkraffel.com/2011/07/05/best-way-to-merge-color-relief-with-shaded-relief-map/) suggests using ColorMagick's convert, but this results in very large files and often crashes for me, not to mention the coordinate data gets lost.

This (https://anitagraser.com/2012/01/19/a-guide-to-beautiful-reliefs-in-qgis/) is another option, but I find it very hard to put fitting color scales and the hillshading cannot be controlled.

This (http://blog.mastermaps.com/2012/07/terrain-mapping-with-mapnik.html) relies on Mapnik, which is currently not an option for me.

Can anyone suggest an efficient solution which allows to blend two (large) overlapping geotiffs with the top one (hillshade) being slightly transparent?

For anyone interested, I cobbled together this GDAL script from the first source, which gets the job half-done:

   set input_dem=test-mbes2.tif
   set input_hill=test-illumination.tif

   convert -gamma .5 %input_hill% hills_gamma.tif
   convert %input_dem% hills_gamma.tif -compose Overlay -composite output.tif
   listgeo %input_dem% > meta.txt
   geotifcp -g meta.txt output.tif final.tif


texts: GPS Datalogger with USB Interface and GPX Output

texts:
I'm looking for a reliable, robust and reasonably priced GPS datalogger, to measure time, distance on tracks. The logger should be reasonably priced but ready for outdoor activities. Mud, dirt, a little water shouldn't harm the device. Another point is, it has to be plugged into a PC/Mac and handled as a normal USB drive to download the GPX files. GPX File is a must have as well.

To summarize the needs:

GPX
USB drive / no proprietary software
reliable

If anyone is a GPS crack, I'm happily to get an answer!

Thanks Martin


texts: Correct expression syntax for filling field with string in calculate field in ArcPy?

texts:
I am attempting to populate fields on two different feature classes with different strings that I have stored in a list.  I would like to just put the strings and feature classes into a for loop, but it has not been working.  Here is my current script that makes the most sense to me:

def protectedlandslayer(PAD, NCED, counties, protectedFC):

    # set local variables in lists to prepare for looping
    ProtectedLands = [PAD, NCED]
    layers = ["pad", "nced"]
    county_lyr = arcpy.MakeFeatureLayer_management(counties, "counties_lyr")

    # select protected lands that intersect PA county boundaries and copy - populate
    # list with output feature classes to use in add field loop
    temp_featureclasses = []
    for FC, layer in zip(ProtectedLands, layers):
        outFC = "in_memory" + "\\" + layer
        layer1 = arcpy.MakeFeatureLayer_management(FC, layer)
        selection = arcpy.SelectLayerByLocation_management(layer1, "INTERSECT", county_lyr)
        protected_fc = arcpy.CopyFeatures_management(selection, outFC)
        temp_featureclasses.append(protected_fc)

    # add field to each dataset and populate with data source
    for name, f in zip(layers, temp_featureclasses):
    arcpy.AddField_management(f, "data_src", "TEXT", "", "",
    4, "Data Source", "", "", "")
        expression = str(name)
        arcpy.CalculateField_management(f, "data_src",
    expression, "PYTHON_9.3")

With this script, I am getting the following error:

ExecuteError: ERROR 000539: Error running expression: n  Traceback (most recent call last):   File "<expression>", line 1, in <module> NameError: name 'n' is not defined  Failed to execute (CalculateField)

Can anyone help me out?


texts: Defining projection and coordinates of Ukrainian topographic map

texts:
I managed to get Ukrainian topographic map.

Access to the full-size map: https://drive.google.com/file/d/0B78Ty4wCAgtXRktmV1VHZ1NjUTQ/view.

I'd like to do the georeferencing in QGIS.

The problem is that I don't have a clue which projection was used and how to read the 'X' and 'Y' coordinates in those maps. I don't know Ukrainian either.


texts:
I have a geoserver with a postgis database on one server and an Java application on a different server.

Now I need to connect these two servers so that the Java application can manage (create, alter and remove features) on the geo server.

I thought about implementing REST web services for the communication between the servers. But then I thought that WFS-T could be sufficient.
Now the question.

Are there any Java client implementations for WFS-T available?


texts: Running an algorithm based on a condition

texts:
In QGIS 3.10, is it possible to only run an algorithm in the processing modeler if certain conditions are true?

I'm applying concave hull to a layer, but sometimes that layer is empty and the model throws an error, so it should only run the concave hull if the layer is not empty.


texts: WMS GetFeatureInfo request in Leaflet/Geoserver

texts:
It's my first webmapping application using GEOSERVER & LEAFLET.
I have 5 overlay layers and i want to show features of each layer using this code :

 map.addEventListener('click', onMapClick);
popup = new L.Popup({maxWidth: 1000});
function onMapClick(e) {
var latlngStr = '(' + e.latlng.lat.toFixed(3) + ', ' +         e.latlng.lng.toFixed(3) + ')';
var BBOX =         map.getBounds()._southWest.lng+","+map.getBounds()._southWest.lat+","+map.getBounds()._northEast.lng+","
+map.getBounds()._northEast.lat;
var WIDTH= map.getSize().x;
var HEIGHT = map.getSize().y;
var X = map.layerPointToContainerPoint(e.layerPoint).x;
var Y = map.layerPointToContainerPoint(e.layerPoint).y;
 var URL = 'http://localhost:8082/geoserver/test_layer/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=test_layer:Imm_Coll_Lot_ALHOUDA_wgs84,test_layer:Villa_Lot_ALHOUDA_wgs84,test_layer:Eco_Lot_ALHOUDA_wgs84,test_layer:Equip_Lot_ALHOUDA_wgs84,test_layer:Rec_Lot_ALHOUDA_wgs84&QUERY_LAYERS=test_layer:Imm_Coll_Lot_ALHOUDA_wgs84,test_layer:Villa_Lot_ALHOUDA_wgs84,test_layer:Eco_Lot_ALHOUDA_wgs84,test_layer:Equip_Lot_ALHOUDA_wgs84,test_layer:Rec_Lot_ALHOUDA_wgs84&propertyName=Zone_Urb,Type_Urb&STYLES=&BBOX='+BBOX+'&FEATURE_COUNT=5&HEIGHT='+HEIGHT+'&WIDTH='+WIDTH+'&FORMAT=image%2Fpng&INFO_FORMAT=text%2fhtml&SRS=EPSG%3A4326&X='+X+'&Y='+Y;
popup.setLatLng(e.latlng);
popup.setContent("<iframe src='"+URL+"' width='400' height='100' frameborder='0'></iframe>");
map.openPopup(popup);
}

This is what i get as result :

My problem is that even if i don't select a layer and i click on the map i get the popup featured data :


texts: Upgrading GeoServer 2.13 to 2.17 don't render all tiles

texts:
I developed a simple application using GeoServer 2.13 previously and updated it to 2.17 and replace its data directory to the new one. The problem is after restarting the docker it does not load all tiles in some locations. The error specified in LayerPreview is code="internalError" Rendering process failed for those tiles. I didn't find any clue to this problem because those locations are rendered in higher zoom levels. The GeoServer logs stated nothing much but just the following lines:

2020-05-03 17:53:06,312 DEBUG [security.IncludeQueryStringAntPathRequestMatcher] - Matched Path: /web/wicket/bookmarkable/org.geoserver.web.admin.logpage, QueryString: 6-1.IFormSubmitListener-form&filter=false with /web/
2020-05-03 17:53:06,314 DEBUG [geoserver.ows] - Could not find a layer group named web
2020-05-03 17:53:06,314 DEBUG [geoserver.ows] - Could not find a layer group named web
2020-05-03 17:53:06,314 DEBUG [geoserver.ows] - Could not find a layer group named web
2020-05-03 17:53:06,314 DEBUG [geoserver.ows] - Could not find a layer group named web
2020-05-03 17:53:06,315 DEBUG [org.geoserver] - Thread 140 locking in mode READ
2020-05-03 17:53:06,315 DEBUG [org.geoserver] - Thread 140 got the lock in mode READ
2020-05-03 17:53:06,315 DEBUG [org.geoserver] - Thread 140 locking in mode READ
2020-05-03 17:53:06,315 DEBUG [org.geoserver] - Thread 140 releasing the lock in mode READ
2020-05-03 17:53:06,317 DEBUG [filter.GeoServerSecurityContextPersistenceFilter$1] - SecurityContextHolder now cleared, as request processing completed


texts: Reducing image collection separately for each image to make series?

texts:
I know how to reduce a collection to one image, or an image to a value in Google Earth Engine. But I can not find an easy way to reduce each image in a collection to a statistics and get a list of that. How it can be done?

As it is easy to get a list of a metadata property over a collection, I was thinking that maybe I can just add my statistics as a metadata to each image, but I couldn't find any way to add a property to the image. Also even if I can, then maybe I can not apply it over collection because the output is not a map.

Any help?


texts: In QGIS is there a way to select one feature from a layer and only see related features from another layer

texts:
I am self taught.

I have 3 layers on my map: Retailer, Producer and Processor.  Each business in each of these categories has a unique identifier, their license number.

I have a CSV file with a list of all sales between Processor and retailer.  The problem is that for every transaction there is a new line in the CSV file.
So if A processor sold to 15 retailers then each sale relationship has a line (including the unique license number for the processor) so when I relate this table only to the processor layer it only adds the first sale.  I want to be able to show all retailers that the particular processor sold too.

The next request is is there a way to, once the above is completed, to select a processor on the map and have all of the retailers sold to show up and no other retailers?


texts: How to use filter legend by map content for more maps

texts:
I have QGIS 2.10.1. I have 31 maps in print composer. Each maps is vector layer which involves a lot of polygons with ID. The problem is when I want to use legend and need to show only polygons ID which I can see in print composer. I try to use filter legend by map content, but it shows only 1 map. I don't know how to use this "filter legend by map content" to other maps in print composer.

How can the legend show all polygons in all 31 maps?

The legend show all polygons of each layers. But the problem is that not right. I add a my personal colour style for polygons and it shows all id and colours which are define in this style. Not only existing in this layer. I try to do it by my hand but the colour doesnt fit. Maybr the problem is because this style. Do you know how to fix it? Or how to change setting in style? I set categorized and then add style...


texts: Splitting line by percentage length in QGIS?

texts:
I'm using QGIS 2.18.9.

How do I split a line by percentage?

In the case of a line, split it by percentage length.

My use-case is more for roads where I would like to split a segment (by %). So, I can use the line feature to determine the length and then create a buffer as shown.


texts: Kriging (or other interpolation) with integral constraints?

texts:
I would like to interpolate a continuous variable (from observed point locations) on a surface (gridded) but using an external constraint that the cumulative distribution function of the interpolated values should match some known curve (not determined by the distribution of observed points).
Is there some variation of Kriging or other interpolation method (maybe GWR) that can achieve this?


texts: The table was not found. Reclassify Arcpy

texts:
I am new to Python and trying to determine what is wrong with the following code:

-- error message --

  arcgisscripting.ExecuteError: ERROR 999999: Error executing function.
  The table was not found. [VAT_Recl_slope] No spatial reference exists.
  Failed to execute (Reclassify).

-- code --

import arcpy
from arcpy.sa import *
arcpy.gp.overwriteOutput = True
arcpy.env.workspace = my_workspace

arcpy.env.extent = "D:\\01_PhD_work_Alex\\ArcGIS\\01_Raw_data\\NZ_outline.shp"
arcpy.env.cellSize = "fault_dist_cp"

raster_list = arcpy.ListRasters("*", "*")
for raster in raster_list:
    print raster

arcpy.CheckOutExtension("3D")

slope = "slope_2K"
distance_fault = "fault_di"
ditance_river = "river_di"
MMI = "kaik_grid_2K"
Recl_SPI = "spi_rcls2"

Recl_slope = arcpy.gp.Reclassify_sa(slope, "Value", "-100 5 1;5 10 2;10 15 3;15 20 4;20 25 5;25 30 6;30 35 7;35 40 8;40 45 9;45 50 10;50 100 11", "Recl_slope", "DATA")

Recl_fault = arcpy.gp.Reclassify_sa(distance_fault, "Value", "-100 5000 1;5000 10000 2;10000 20000 3;20000 30000 4;30000 40000 5;40000 50000 6; 50000 130000 7", "Recl_fault", "DATA")

Recl_river = arcpy.gp.Reclassify_sa(distance_river, "Value", "-100 500 1;500 1000 2;1000 1500 3;1500 2000 4;2000 2500 5;2500 70000 6", "Recl_river", "DATA")

Recl_MMI = arcpy.gp.Reclassify_sa(MMI, "Value", "-100 4 1; 4 5 2; 5 6 3;6 7 4;7 8 5;8 11 6", "Recl_MMI", "DATA")


texts:
Can ArcGIS Online act as a solution for handling topology?

For example, if I have a hosted feature service with topology in it, can I maintain the topology in the hosted feature service using tools in Pro?

I am not sure how far AGOL has come and if it can now handle this. I know it could not in the past..


texts: Not able to use "Save" button in QGIS's Table Manager

texts:
I'm getting a message that says "Failed backing up the old table to..." when I use the "Save" button Table Manager after deleteting fields from a shapefile. It says I should use "Save As..." instead, which is quite inconvenient. I'm using version 2.14.

Something I forgot to add is that in v. 2.8 and 2.10 this problem did not exist.


texts: Project Point using ArcGIS API for JavaScript?

texts:
I've to project geometry point

  Point(1657272, 6100874) with NZTM, WKID: 2193

But, point is shown near Austria, not on NewZealand maps. I've converted above coordinates to geographic, still its not giving correct results. Following is my code:

  var mp = esri.geometry.webMercatorToGeographic(new esri.geometry.Point(1657272, 6100874, new esri.SpatialReference({ wkid: 2193 })));

  map = new Map("mapDiv",
    center: [mp.x,mp.y],
   zoom: 5,
  basemap: "streets"  });

  on(map, "load", addGraphic);

  function addGraphic() {
    map.graphics.add(new esri.Graphic(mp,
      new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([255, 0, 0, 0.5]))    )   ) }

Please tell me what's wrong with above code and why it's not projecting point on correct area.

EDITED CODE

   var map, gsvc;

  require([
          "esri/map", "esri/graphic", "esri/symbols/SimpleMarkerSymbol",
          "esri/tasks/GeometryService", "esri/tasks/ProjectParameters",
          "esri/SpatialReference", "esri/InfoTemplate", "dojo/dom", "dojo/on",
          "dojo/domReady!"
        ], function(
          Map, Graphic, SimpleMarkerSymbol,
          GeometryService, ProjectParameters,
          SpatialReference, InfoTemplate, dom, on
        ) {

   map = new Map("map", {
      basemap: "streets",
      center: [174.605369, -37.120276],
      zoom: 5
    });

   gsvc = new GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");

   on(map, "load", projectToLatLong);

   function projectToLatLong() {
        map.graphics.clear();

        m_mapPoint = [];
        m_mapPoint[0] = new esri.geometry.Point(1657272, 6100874, new esri.SpatialReference({ wkid: 2193 }));
        var outSR = new SpatialReference(3857);

        var symbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 20,
                      new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
                          new Color([255, 0, 0]), 2), new Color([0, 0, 0, 0])
                      )
        var graphic = new Graphic(m_mapPoint, symbol);
        map.graphics.add(graphic);

        var params = new esri.tasks.ProjectParameters();
        // add array of points
        params.geometries = m_mapPoint;
        // Output Spatial Reference in lat/long (wkid 3857 )
        params.outSR = outSR;
        gsvc.project(params);
    }
  });
</script>

Please check updated code. Still point is not projecting.


texts: Intersects without clipping input vector layer

texts:
I have two layers, one with a fishnet grid of a country, and then the borders of the country. I would like to get a shapefile with all the features of this grid that intersect with the borders of the country. Using intersect or clip, they all cut the initial grid to the borders.

So I am getting:

But my goal is to get this:


texts: QGIS: NetCDF file not aligned with OpenStreetMap

texts:
I want to show a 2m height temperature layer that covers most of Canada and northern United States. The data itself is initially a .grib2 file obtainable from the Gov of Canada free public weather data. I converted it into NetCDF because I heard it was easier to manipulate this way.

I'm very new to everything GIS related, and I just want to see how the 2m map stacks up on a basic global map, which I decided to be OpenStreetMap.

The coordinate reference system of the 2m layer is originally in EPSG:4326 - WSG 84 while the coordinate reference system of OpenStreetMap is originally EPSG:3857-WGS 84 / Pseudo-Mercator.

I set the OpenStreetMap to the reference system of the 2m temp map and succeed in having both layers showing. However, the 2m temp map appears centered on OpenStreetMap instead of being on Canada/North US.

Here is a print screen of the two layers:

And also a description of the 2m height map :

Could anybody be able to explain to me what is going on?

EDIT:
I've attempted to use the GRIB2 file itself instead of the Netcdf. When uploading to qgis, the GRIB2 file arrives with the following custom projection:
Generated CRS (+proj=stere +lat_0=90 +lat_ts=60 +lon_0=252 +k=1 +x_0=0 +y_0=0 +a=6371229 +b=6371229 +units=m +no_defs)

I cannot get OSM to match this projection, but if I change the GRIB2 file to match OSM's projection (EPSG 3857 - WGS 84 / Pseudo-Mercator) I receive something similar to what's happening with the converted Netcdf.

GDAL allows me to get info on the Netcdf file. Here is what I receive


texts: Can't import liblas into OSGeo4w Python on Windows machine

texts: I installed the 32-bit version of OSGeo4w with the liblas-python packages on my Windows machine. When I try to import liblas into python, I get an error that no 'liblas' module can be found, even though liblas appears in the python directory of OSGeo4w.


texts: Combining data points with overlaying grid

texts:
I have a map of Ireland with several data points on that map. I want to create a 10km x 10km grid on that map that colours in each grid square that contains a data point. So, if at least one data point lies inside a grid square, the square will be coloured in.

I'm very new to QGIS and still trying to understand the basics.

Could anyone point me in the right direction here?


texts: Is scientific notation in ASCII grid files non-standard?

texts:
I have an application that creates ASCII grid files (Arc/ESRI-format). For the actual cell values, the quantities I am dealing with are sometimes very small, and so it writes these out in scientific E notation, e.g.: 9.99547007184078E-06

Will ArcMap successfully read these files without truncating the number, and understand the E notation? I suspect it is not interpreting the values correctly, but just reading the first few digits of the cell values - in the 'Table of Contents' the high and low values are listed as ranging from vastly different values than in the raw data. Querying the cell pixel values also gives different values than would be expected.

If not is there an alternative (GRASS GIS, QGIS etc) that understands this format?

Addition: here is the header part of the file in question

ncols         557
nrows         300
xllcorner     209428.33804321
yllcorner     89000
cellsize      10
NODATA_value  -9999

I am importing the ASCII files using ASCII to raster, and selecting 'FLOAT' as the output data type. The values are truncated to something like 9.9954 in the above case.


texts: Merge point shapefiles from different sub-folder using ArcPy

texts:
I have different month (JANUARY, FEBRUARY, MARCH.....DECEMBER) folder, each folder hold point shapefile for different month. I want to consider all month folder in a single program and output pass into as on different month folder.

I have written a code but its taking only single month at a time. How to put in my code different month workspace and output save into as same month folder?

I have shown below my code. This code taking too long time for merging the monthly point shapefile. Is there any function available for process the program?

import arcpy, os

out = r'D:\SWAT-WEATHER-DATA2\MARCH'
arcpy.env.workspace = r'D:\SWAT-WEATHER-DATA2\MARCH'
shplist =  arcpy.ListFeatureClasses('*.shp')
arcpy.Merge_management(shplist, os.path.join(out, 'Merged_003.shp'))
print 'done'


texts:
I use Qgis. I have two layers that are two circles with the same center. One larger and one smaller. I want to do the difference between the two circles BUT only if they have the same "objectid" (the same id). So I have written this code:

for features in itertools.product(elayer.getFeatures("objectid"), player.getFeatures("objectid")):
    id = tuple(feat.attributes()[0] for feat in features)
    print("elayer" ,id[0] , "player", id[1])
    if id[0] == id[1]:
        pass
        processing.runAndLoadResults("native:difference",
        {'INPUT':elayer(id[0]), 'OVERLAY': player(id[1]), 'OUTPUT':'memory:'})

where elayer and player are clearly the two layers. But this code makes me all differences between all geometries in the two layers. How can I adjust it in order to get what I want?


texts:
I want to know the distance between two drawn geometries. I look for it and saw in OpenLayers 2 the distanceTo methods but I actually use OpenLayers 4. I know there is haversine method but it's between two points.

Did you know any way to calculate the distance in the last version?


texts:
I am building a QGIS plugin and would like to add hdbscan in methods.
But when I import with OSGEO4W shell it failed at this line:

  File
  "C:\OSGeo4W\apps\Python37\lib\site-packages\hdbscan-0.8.22-py3.7-win32.egg\hdbscan_init_.py",
  line 1, in from .hdbscan_ import HDBSCAN, hdbscan File
  "C:\OSGeo4W\apps\Python37\lib\site-packages\hdbscan-0.8.22-py3.7-win32.egg\hdbscan\hdbscan_.py",
  line 21, in from ._hdbscan_linkage import (single_linkage,
  ImportError: DLL load failed: The specified module could not be found.

When I use QGIS python console it somehow failed at another line:

  File "C:/OSGeo4W/apps/qgis/./python\qgis\utils.py", line 737, in
  import mod = builtin_import(name, globals, locals, fromlist, level)
  File
  "C:\OSGeo4W\apps\Python37\lib\site-packages\hdbscan-0.8.22-py3.7-win32.egg\hdbscan_init.py",
  line 1, in from .hdbscan import HDBSCAN, hdbscan File
  "C:/OSGeo4W/apps/qgis/./python\qgis\utils.py", line 737, in _import
  mod = builtin_import(name, globals, locals, fromlist, level) File
  "C:\OSGeo4W\apps\Python37\lib\site-packages\hdbscan-0.8.22-py3.7-win32.egg\hdbscan\hdbscan.py",
  line 21, in from ._hdbscan_linkage import (single_linkage, File
  "C:/OSGeo4W/apps/qgis/./python\qgis\utils.py", line 737, in _import
  mod = _builtin_import(name, globals, locals, fromlist, level)
  ImportError: DLL load failed: The specified module could not be found.

I am using QGIS 3.8.2 and windows 7, python 3.7.0 32 bit on win32
I installed hdbscan 0.8.22 manually via python setup.py install


texts: QGIS equivalent to MapInfo Sum Attributes for selected vector objects?

texts:
I´m looking for QGIS equivalent to the basic MapInfo tool "Sum Attributes".  I´ll explain what it does:

For selected objects in a vector layer, a popup window shows basic statistics such as:
- Sum and Average for numerical fields
- count of selected objects
- calculated spatial information such as Area
The popup window stays on top and is dynamically updated every time the selection changes.

The great thing about this tool is that its simple and dynamic, activated by a single click of a button on the standard toolbar.

So far I haven´t found a QGIS equivalent for this.  QGIS ´Basic Statistics´ is similar but too clunky.  Any suggestions?


texts: Why does Earth Engine report Sentinel-2 pixel depth as 16-bit when it is 12-bit?

texts: When accessing Sentinel-2 through Earth Engine search bar, the info page that pops up reports the bands as UINT16 when in reality they are 12-bit. Am I interpreting this incorrectly?


texts: Is there a way to create a legal description, or some kind of description of a shapefile?

texts:
A colleague and I are working on creating legal descriptions for several hundred districts, for which we already have shapefiles. I'm wondering if there's a way to use COGO to help provide a description of the outline of it?

I'm fairly certain it's going to use parcel fabrics, and/or a model.


texts: What is the best way to manage permissions as root installing postgresql and postgis?

texts:
I've encountered an issue numerous times where I lock myself out of my postgres installation as a result of modifying my pg_hba.conf file and therefore screw up my postgres installation because I don't have root access. So I want to manage everything as root and create all the right users with permissions and then use my linux terminal only installation as a non-root user and still be able to manage everything necessary while limiting my user access to pg_hba.conf.

Ergo, if I want to have my postgresql installation open-ended and accessible what settings do I need to make in pg_hba. And by that I mean I want to connect remotely using tcp/ip.