texts: Write GeoJson into a .geojson file with Python

texts:
I want to write a geosjon object with the type <class 'geojson.feature.Feature'> into a .geosjon file. Therefore I tried to use

with open(test.geosjon, 'w') as outfile:
     geojson.dump(geosjon_geometries, outfile)

But i get the error TypeError: coercing to Unicode: need string or buffer, tuple found
I figured out that with this function a dict is needed to write it into a geosjon file. Is there another possibility to write a geojson feature in a file?

The function looks like:

def write_json(self, features):
    # feature is a shapely geometry feature
    geom_in_geojson = geojson.Feature(geometry=features, properties={})
    tmp_file = tempfile.mkstemp(suffix='.geojson')
    with open(tmp_file, 'w') as outfile:
        geojson.dump(geom_in_geojson, outfile)
    return tmp_file

The input is a shapely geometry, e.g. MultiLineString or LineString


texts: Verifying attribute data after join in PyQGIS

texts:
I have two attribute tables in qgis:

One table has around 20 million records
The second table has around 40k records.

I make a join (under Layer-Properties->Joins) in 2nd table and get some data from table 1 and put that into table 2 based on a single Id column. Now I want to verify the data that it is correctly joined but when i put an id into feature search it gets hang as table 1 is very large.

Is there any efficient way available to deal with such a large data set?

I have tried to write a script to verify data but still after running the whole day it is unable to produce any result still running and my QGIS project seems hang:

layerUpdateName = "Extra" #Name of the layer whose data want to update
layerUpdateColumn = "toid" #Column name to update

layerGetName = "Data_Tbl" #Name of the layer from data will be get
layerGetColumn = "TOID" #Cloum name from where value will be taken

dataMatchColumnName = "LOTID"

#getting the desired layer
if QgsProject.instance().mapLayersByName(layerUpdateName):
    layerUpdate = QgsProject.instance().mapLayersByName(layerUpdateName)[0];

if QgsProject.instance().mapLayersByName(layerGetName):
    layerGet = QgsProject.instance().mapLayersByName(layerGetName)[0];
a = 0

for lg in layerGet.getFeatures():
    a += 1
    for lu in layerUpdate.getFeatures():
        if lu[layerUpdateColumn] == lg[layerGetColumn]:
            print (lu[layerUpdateColumn])
            break;


texts: Missing tile endpoint in OpenMapTiles -> Mapbox GL JS example

texts:
OpenMapTiles.org gives an example snippet (which is described as) showing how to use Mapbox GL JS to display openmaptiles generated tiles.

The full OMT example:

<!DOCTYPE html>

    <meta charset='utf-8' />
    <title>OpenMapTiles OSM Bright style</title>
    <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />

    <link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.29.0/mapbox-gl.css' rel='stylesheet' />

I serve it from an nginx server and it does indeed work.

The path to the tiles is fairly deep however:

https://openmaptiles.github.io/osm-bright-gl-style/style-cdn.json
...
sources:
  openmaptiles:
    type:  "vector"
    url: "https://free.tilehosting.com/data/v3.json?key=RiS4gsgZPZqeeMlIyxFo"
...

https://free.tilehosting.com/data/v3.json?key=RiS4gsgZPZqeeMlIyxFo
tiles:
  0:"https://maps.tilehosting.com/data/v3/{z}/{x}/{y}.pbf.pict?key=RiS4gsgZPZqeeMlIyxFo"

I have two questions:

The above final tile endpoint https://maps.tilehosting.com/data/v3/{z}/{x}/{y}.pbf.pict appears from the suffix .pict not be a vector format.  Is that correct?  Is there another example using the vector format produced by the tools in openmaptiles git repo?
Is the chain of files leading to the tiles endpoint all open software, or is some of it proprietary?


texts: Calculating bearing (magnetic) between two lines?

texts:
This should be a basic geodesy question.

I have a requirement to calculate "bearing (magnetic)" between two points.
Will the igismap Bearing Angle tool do the job or is there something more to consider give that there is a requirement for a "magnetic" bearing.

I am hoping for a web based solution.


texts: QGIS 3.10 crashes constantly when performing join with virtual layer

texts:
I want to create a pie-chart map showing the amount of groundwater extracted from different aquifers within different administrative areas like in the picture below:

I have a shapefile with groundwater extraction points ( ~ 7500) containing exploitation amounts and the associated aquifer the groundwater is extracted from as well as a polygon shapefile with the administrative area (~710).
First, I populate the exploitation amounts per aquifer within the different administrative polygons using a virtual layer and a spatial join between the points and polygons. I need this layer only to create the columns containing the aggregated exploitation amounts per aquifer and administrative area. I want to use this attribute-only table (with no geometry) as a join table for the administrative areas that will give me finally the information for the pie chart diagram.
In order to speed up the creating of the virtual layer I came up with the following SQL query that works slow but fine:
SELECT

  GWsums.GID_2
, MAX (CASE WHEN GWsums.aquifer = 'n13' THEN GWsums.GWsum END) AS n13 /*:real*/
, […]
, MAX (CASE WHEN GWsums.aquifer = 'qp3' THEN GWsums.GWsum END) AS qp3 /*:real*/

FROM
        (SELECT a.GID_2, sum(p.exploitation) as GWsum /*:real*/, p.aqui as aquifer
         FROM GWpts AS p JOIN ADM2_District AS a ON st_contains (a.geometry, p.geometry)
         WHERE a._search_frame_= p.geometry
         GROUP BY a.GID_2, p.aqui) AS GWsums

GROUP BY GWsums.GID_2;

In the subquery, I calculate the amounts of exploitation per aquifer over the polygons. The outer SQL statement performs a pivot with the result set from the subquery, retrieving the six different aquifer exploitation amounts as columns with the administrative unit identifier GID_2 for the pie chart diagram.
Trying to join the resulting virtual layer to the polygons within the property dialogue causes QGIS constantly to crash.
Using a virtual layer to perform the data aggregation for the final pie chart visualization seems to me straight forward and I need to keep the whole workflow as simple as possible. It should therefore produce as few layers as possible.
Any suggestions or ideas on what could cause QGIS to crash when performing the join with the virtual layer?


texts:
I recently converted from ESRI products, and I am trying to get a grip on adding a vector layer to OL3 from features returned from the server as WKT.

Here is some example code.

Why I am not seeing a feature in this example?

Note that this pen does work and is very similar: .


texts:
Has anyone used Google PostgreSQL and added it as a data source?   I have 2 shapefiles that I need to work on with multiple concurrent users and be able to edit them "offline" and synchronize them when possible.

I am looking for a possible plug in or example.


texts:
I am looking at a piece of work to deploy QGIS as the standard within an organisation.  There is an existing piece of software that I need to link to QGIS so that when a button is pressed within the app, it opens QGIS, opens a given project and pans to the correct location (using coordinates in the application).

If I were to call QGIS from commandline, what would I need to a) open a given project and b) how would I pass coordinates from one system to automate the map window pan to location.

I'm guessing that it is going to be some python code?  That being the case, are there any examples of similar ways of starting QGIS?

Thanks


texts: Versioned View vs Database View in enterprise databases

texts: While researching database views related to enterprise geodatabases I was trying to distinguish the difference between the database and versioned views. Is it just the fact that database views with versioned data are considered versioned views? Or are versioned views only considered the fact when a different version other than the root is being used?


texts: Is it possible to incrementally update added/edited datasets to ArcGIS Online?

texts:
My organization would like to run change detection and update our ArcGIS Online data incrementally.  Rather than re-uploading the entire data set every time we want to update the map.  We are a city government that has constant edits being made to all of our data.  We'd like to use FME to detect changes to the data and push these out to ArcGIS Online on a schedule.

We have been using Google Maps Engine to do this and are looking in to purchasing a license.  I'd hate to spend the money if there is a way to do this in AGOL that we are somehow missing.


texts: How Can I extract region-specific Information from ascii grid file in and run spatial GLM's in R?

texts:
I have data on various climate variables in acsii grid format. I have imported data into R using

Rainfall<-read.asciigrid("E:/R Learning Project/Rainfall.txt")

and then used plot(Rainfall) to plot the Rainfall density on the map of UK (since the data is of UK climate).

I want to run a Generalized Linear Model for the presence of a plant species in a specific area of UK (in order to identify the climatic variable/s responsible for the presence of that species and subsequently apply that model in other parts of UK to predict the presence of the plant specie under study).

At this point I have two issues:

the ascii grid file I've imported contains data of Rainfall, Temperature and other variables for whole of the UK but I only need values of these variables for only a specific region of UK.
how can I extract values of all these variables for the region of my interest and then put them together to run a GLM model?

I can understand that I'm asking for a lot of answer but it would be of great help if I can receive a even a brief hint towards the right direction.


texts: Choosing interpolation method for monthly atmospheric parameters derived from AQUA/Air satellite?

texts:
I want to investigate atmospheric refraction and i am using Aqua/ Airs satellite data. These are atmospheric parameters

(1) Air temperature

(2) Geopotential height

(3) Relative Humidity

All these parameters are at different pressure levels (1000, 925,800,....1 hpa). It is Aqua/AIRS version 6 level 3 product. Please suggest me which interpolation technique will be best suited for this data sets? This data set is in text format.

I have these softwares : ArcGIS 9.3, Erdas,Envi, Matlab etc suggest also other software which can also assist me in text file data.


texts:
I collected field data containing general information about signpost sites (location, altitude, image) and specific information of the particular signs mounted to the singpost (image, direction). One site may contain multiple boards.

I built a Geopackage with a georeferenced point table containing the signpost signs and created a one to many relation to another table in the GPK containing the information of the signs.

Now, I try to represent one signpost site incl. the related signs via print composer report. One page should be one site. The defining layer for the report is the layer with the signposts.

I don't know how to access resp. represent the relation and need help therefore.
I managed to show the attribute table of the relation, which does not help the display the image.


texts: Probleme reinstalling Qgiscloud after installation Qgis 2.18

texts:
After installation Qgis 2.18 I try to reinstall Qgiscloud, I get the message :

ImportError: No module named openlayers_plugin.openlayers_layer
Traceback (most recent call last):
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\qgis\utils.py", line 342, in startPlugin
    plugins[packageName].initGui()
  File "C:/Users/Pierre/.qgis2/python/plugins\qgiscloud\qgiscloudplugin.py", line 73, in initGui
    self.dockWidget = QgisCloudPluginDialog(self.iface, self.version)
  File "C:/Users/Pierre/.qgis2/python/plugins\qgiscloud\qgiscloudplugindialog.py", line 171, in __init__
    from openlayers_menu import OpenlayersMenu
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\qgis\utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/Pierre/.qgis2/python/plugins\qgiscloud\openlayers_menu.py", line 27, in
    from openlayers_plugin.openlayers_layer import OpenlayersLayer
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\qgis\utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: No module named openlayers_plugin.openlayers_layer

I try everything to repair but do not find the solution.


texts: How to create a small polygon vector layer from a larger layer efficiently in QGIS?

texts:
I am creating a plugin for QGIS in python which needs to load in parts of a larger polygon vector layer. This layer is taken from a shapefile and then a new smaller vector layer is created by adding all the polygons(features) with the same ID as an already loaded point layer. The way I am doing this right now is like this:

for file in [f for f in listdir(folderpath) if isfile(join(folderpath, f))]:
#Ignore the fact that it will load all shapefiles of a folder
if file[-4:] == ".shp":
    large = QgsVectorLayer(folderpath + "\\" + file, file[:-4], "ogr")
    #Modify layer to only contain relevant polygons
    pointLayer = QgsMapLayerRegistry.instance().mapLayersByName("Points")[0]
    features = pointLayer.getFeatures()
    newFeatures = []
    for f in features:
        expr = QgsExpression( "\"PolygonID\"='{}'".format(f['PointID']))
        for polyF in large.getFeatures( QgsFeatureRequest(expr)):
            newFeatures.append(polyF)
    small = QgsVectorLayer("Polygon?crs=epsg:4326&field=PolygonID:string(40)", large.name(), "memory")
    pr = small.dataProvider()
    pr.addFeatures(newFeatures)
    small.updateExtents()
    #Load in the "small polygon layer" in the bottom of the layer table
    QgsMapLayerRegistry.instance().addMapLayer(small, False)
    QgsProject.instance().layerTreeRoot().addLayer(small)

and it works, however it is extremely slow (because of large the larger layers are). There might be a much easier way to do this, however this my first ever project working with both GIS and Python.


texts: QGIS: How to get distance from a feature in another layer

texts:
I currently have a layer with milepost locations on a railroad track. I'm creating another layer while driving down the tracks where I need to add comments. There's a field in the comments layer for milepost location and I'd like it to be accurate to two decimals. When digitizing my comments, I'd like it to automatically give me the milepost location. It doesn't have to be exact, if it could just find the two nearest mileposts, determine which of those two was the smaller number, then give me the distance from that milepost added to the milepost number. I'm trying to figure out how to make an expression for a default value that will fill in this field while digitizing, but I can't figure out where in the expressions list you can find a distance from a point in another layer.
EXAMPLE:
I'm driving down the tracks and I'm currently .6 miles from milepost 8 and .4 miles from milepost 9. When I "Add Point", I'd like the Milepost field to default to a value of "8.60."


texts: Difference between irradiance and radiance, remote sensing reflectance and water leaving radiance

texts:
I've been trying to lay my hands on textbooks, etc, that explain the differences between the remote sensing terms in lay man language.

radiance and irradiance
remote sensing reflectance and water leaving radiance

Just wondering if anybody can point me the right direction or shed more light on those terms.


texts:
I want to cache a layer from Geoserver. I use Geoserver 2.5.1 on Ubuntu 13.10.

In the web.xml file under tomcat7/webapps/geoserver/WEB-INF I added the following part:

 <context-param>
        <param-name>GEOWEBCACHE_CACHE_DIR</param-name>
        <param-value>/opt/gwc</param-value>
 </context-param>

I enabled Enable direct integration with GeoServer WMS under
Caching defaults.
I use the sample data tiger:giant_polygon where Create a cached layer for this layer is enabled

After opening the tile preview with EPSG:4326 /jpeg for the layer, the folder where my tiles are supposed to be saved is still empty. Also the DISK USED colum shows N/A.

What is missing?


texts: ArcMap rendering NoData differently based on zoom level

texts:
The gist of the issue is that ArcMap is rendering most of my NoData values as the minimum stretch value color instead of the NoData color.  My dataset is for global production of soybeans, so most of the world should be NoData (where there is no soy grown) and then some value between 0 and 27000 where there is soy grown.  If I do a stretched symbology and set NoData to no color and use a gradient for the values (say black to white), all of the NoData values on the earth are rendered as black.  I'm working with the Robinson projection, so my globe is kind of an oval and the corners of the map are empty.  These empty corners, which also have NoData values, render correctly, but on the globe itself, they render as the lowest color available.  If I do classified colors, all the NoData on the earth renders as the lowest class.

If I zoom in so that the whole data frame is the earth (get the empty corners that render properly off the screen), then my NoData values start working.  It's almost like there are 2 types of NoData that are fighting each other and it's only when one is totally off screen that the other behaves.


texts: Problem with containers in combination with the remember button

texts:
I've been searching for a solution for days. I'm using QGIS 3.14.15 on Windows 10 and created a point layer to take points with QField. I created a container with several options. In QField the containers are only visible if a specific drop-down choice is taken. When I use the checkboxes to remember the information of the containers, but I'm choosing another drop-down field at the next point which not open the container, QField nevertheless saves the information in the point. So after the synchronization with GIS those informations are in the attribute table. Sure, it is possible just to enable the checkbox, but I want to provide mistakes cause I want to use the information from the attribute table.
So is there any possibility to set the information to NULL, if the wrong drop-down field is chosen without enabling the remember button?
I created a field called "Art", which has the the drop-down choices
1 "Vermessungspunkt"
2 "Trasse sichtbar"
3 "schiessen"
4 "Bohrung"
5 "Hausanschluss"
6 "KVZ"
7 "Saeule"
8 "Verbinder"
9 "Ende"

Then I created two containers, which are only visible if "Art" = 'Trasse sichtbar' OR "Art" = 'Ende'.


texts: r.maxent.lambdas command not recognized in GRASS after installing extension

texts:
Running Grass 7.0.5 on a Windows 10 machine, I installed the 'r.maxent.lambdas' addon with the g.extension command:

  g.extension extension=r.maxent.lambdas
  Downloading precompiled GRASS Addons ...
  Updating addons metadata file...
  Installation of  successfully finished

Then when I try to use the command I get:

  r.maxent.lambdas
  'r.maxent.lambdas' is not recognized as an internal or
  external command,
  operable program or batch file.

I've had success installing and using other addons, but I am still very new to Grass. Is there a step I'm missing?


texts: Can ArcGIS Desktop 9 and 10 co-exist peacefully on same computer?

texts:
We have a copy of Hawths tools that only work in ArcGIS 9.3, so I would like to keep it on my computer. However, most of the work we do in our lab is done with ArcGIS 10.

Therefore, would it be OK to install both ArcGIS 9 and 10 on the same computer? If so, can you give and tips/experience on how to best achieve that?


texts:
I'm working in QGIS and I can't seem to warp my head around this problem.
I have bounding box defined as 4 coordinates pair (A, B, C, D in the picture) and a center and I want to calculate a new bounding box (A', B', C', D' in the picture) defined as the original bounding box, plus a padding on all sides. The padding value is defined as a percentage of the longest side of the original bounding box P.
What I'm trying to achieve is: given A, B, C, D, CENTER and a percentage value P, calculate A', B', C', D'.
How can I achieve this using QGIS?
Here is a picture of this for reference:


texts:
I am quite new to QGIS and I am trying to do something which seems so simple but it won't work. I have looked for an answer and couldn't find any.

So I dowloaded data imagery from EarthExplorer about NDVI (Normalized difference vegetation index) and I am simply trying to load this image to my project in QGIS but it won't work.

As you can see in the picture, the CRS for this image seems to be Lambert Azimuthal Equal Area, which in QGIS I assume corresponds to North Pole Lambert Azimuthal Equal Area considering it's North America.

So I used the plugin Georeferencer and did exactly as shown on the web : Upload my image, define its CRS (EPSG 102017 : North Pole Lambert Azimuthal Equal Area), set 4 points in the 4 corners for which I know the coordinates (see image on the left, it comes with the file), set the transformation parameters (CRS = EPSG 3857 for my project) and clicked to start georeferencing.

The thing is whatever I do (I tried every combination of the to CRS to go from-to) I get a tiny map near the African west coast (see red dot on image). I also tried different CRS and still won't work.

I do not know how to solve this problem. I have tried with other images from EarthExplorer (Landsat8 images) and the same thing happens.

Can anyone help me?


texts: how can i install Semi-Automatic Classification plugin manually?

texts: I try to install with Fetch Python Plugins. But fetch python plugins show only those which are installed?  can i install manually when direct installation failed repeatedly?


texts: Combining two simple scripts into single script in Python Parser of Field Calculator

texts:
I have two separate scripts used in Field Calculator for an "ID" attribute field.  Script 1 is to create sequential numbers for the field.  Script 2 is to add leading zeros to the sequential numbers.

Both scripts work independently, but is there a way to combine both scripts to run together as a single script?

Script 1 (Pre-Logic Script Code)

rec=0
def autoIncrement():

    global rec

    pStart = 4164 #adjust start value, if req'd

    pInterval = 1 #adjust interval value, if req'd

      if (rec == 0):

        rec = pStart

     else:
        rec = rec + pInterval

     return rec

Script 1 (In smaller window)

autoIncrement()

Script 2

!ID!.zfill(7)


texts: ArcGIS Geoprocessing Services - Don't work if 'Run python script in process' not checked

texts:
I have a standard geoprocessing toolbox that I am exposing as a geoprocessing service.  The tools in this toolbox are plain 'ol python scripts.  All of this is being done in ArcGIS 9.3.1.

As a standalone toolbox run in the desktop environment, all of the tools execute flawlessly. However, as soon as I try to execute the same 'tools' as exposed through the geoprocessing service, all type of weird stuff happens.  Among other things, the script stops executing abruptly, without throwing any type of error.  In turn, the client never gets a notification of success or failure...

After many days of head scratching, I have become aware of a property of script tools - the 'Run Python script in process' option.  From ESRI's standard web help:

  Running in-process requires that all modules loaded with the Python
  import directive have the necessary logic to enable them to run
  in-process. All standard Python libraries, such as os, string, and
  time, have the necessary logic. However, non standard modules obtained
  from third parties may not have the necessary logic to run in-process.
  If you are experiencing unexplainable problems when your script runs,
  try unchecking the in-process option and running your script again. If
  the problem goes away when running out-of-process, then there is most
  likely an issue with one of the modules you imported. In this case,
  leave the option unchecked.

Sure enough, my scripts do make use of 3rd party libraries, so I was thinking I finally figured it out - uncheck that option and all my problems should disappear.  Well, if I uncheck the option and expose tool as gp service - it fails immediately with the "Error Executing Task Error Code 500".  Instead of making half-way through the script - it just bombs immediately.

Does anyone know if it is possible to run geoprocessing services "out of process"?


texts: What format and settings to use for aerials photos in QGIS?

texts:
Following question which was more about handling Aerials with ArcGIS:

Most Effective Format to Manage Aerial Photography for Viewing Only

It seems there are 2 major options for storing / resampling / reprojecting etc. aerials:

JP2000 / JP2 / JPEG 2000 (recently 5 codes for GDAL handling)
ECW (ERDAS Compressed Wavelets (.ecw))
any other I missed?

What I have understood depending on QGIS version for both there usually has to be installed some additional libraries. ECW has some limitation - for compressing needs to buy licence?

I tested jpeg which I can't use for big files (max dimension limitation) and it is also slow with bigger dimensions.

The answer should contain:

What is available by default with QGIS 2.0.1 desktop and/or OSGEO?
How it works with big files - zooming in/out (pyramids)?

is Creation Options - RESOLUTIONS for jp2 pyramids?


texts: Projections way off on data imported into QGIS?

texts:
I have elevation data as a .shp from the USDA ARS and Hi-Res Orthoimages (Mystery Projection (UTM 15N?)) from the USGS website as geoTIFFs (plain NAD 83).

I am trying to project all of the images in NAD1927 MI GeoRef (Meters). OTF projection is on.

The orthoimages are appearing several hundred miles to the East of the elevation data and are rotated about 60 degrees clockwise.

I tried reprojecting the images as well as setting several different Layer CRSs, nothing seems to work.  I am using QGIS 2.8.2

Edit: The "mystery data" is from the USGS Earth Explorer, documentation that came in the file says UTM 15, the zone that the parcel is located in should be 17, and QGIS thinks that the images are in Michigan State Plane Southeast. The MI Georef projection is an oblique Mercator projection which might explain the tilt.  I'll add more specifics about the extent when I return to my computer this afternoon.


texts: Blank attribute table after applying filter in QGIS?

texts:
I am completely new to QGIS and am looking for help with filtering OpenStreetMap data.

When I applied a filter to the vector layer using the clause "building" is not null and test it, prompt shows me returned 4000 rows but map display area is blank. Where am I going wrong?


texts: The fastest way of generating tiles from raster?

texts:
I have some MODIS imagery 250m resolution covering a large area which I generate tiles from using Mapnik and generate_tiles.py script. I need to run this script every day with new satellite images, therefore the tiles must be generated fast! I have noticed that the bigger the source image is (in MB) the slower it gets. Since my source MODIS image is quite huge, it takes ages to generate all those tiles.

My question is: Which is the best way of handling the files when it comes to creating tiles from raster?

Perhaps it might be faster to first generate large tiles (metatiles?) and then generate tiles from those tiles?

Note: the answer doesn't have to be Mapnik and generate_tiles.py. It could be maybe Mapserver, Tilecache etc.

Edit: I have found this question How to cut a 'tiled image' from a raster dataset using GDAL? which answers somewhat my question. What still remains unsolved is which size of metatiles should be used?


texts:
I have few SVG files (maps) that I want to convert to GEOJson.
On those SVG files, two markers (crosses) had been drown in order to georeference the layer.
So I know the coordinates of those control points, I am able to calculate the parameters : How to compute parameters for QGIS Affine transformation?.

My plan is :

Read the SVG file and extract the paths.
Store the coordinates of the shapes in an array
Apply the affine transformation
Write a GEOJson file

I have already extracted the paths with python (svgpathtool), but I have no clue on how to exploit that.

Is there a better way to do that ?

How to translate the path ?


texts:
I'm using getJSON to draw points in Leaflet, this is the code:

function cargarpapes(movibles){
    $.getJSON("papeleras1.php", function(data) {
        papesjson = L.geoJson(data, {
            onEachFeature: function (feature, layer) {
                layer.bindPopup(feature.properties.codigo);
            }
        });
        papesjson.addTo(map);
    });
}

My question is simple, why I can not use the method papesjson.addTo(map); out of $.getJSON(), even when I have declared my variable papesjson as global at first


texts: Error message when saving .mxd in ArcGIS 10.7

texts:
I am editing a map document in ArcGIS 10.7 on Windows 10 in Mac Bootcamp. When I try to save it, I receive the error message:
"Unable to save. Check to make sure you have write access to the specified file and that there is enough space on the storage device to hold your document."

When I click the "OK," the following message displays:
"an unknown error occurred while accessing C:..."

What is the best way around this issue?


texts: Getting polygons out of multi-polygon GeoJSON files?

texts:
I am a farmer and very new to GIS.

I am trying to load shapefiles or KML files to an online site/service called FarmLogs.com.  Once my "fields" are uploaded the site can tell me the amount of rainfall on the fields.  It can also display soil type maps.  And GPS data from farm equipment (planters, sprayers, harvesters) can be overlaid.

The first step was for me to get the "shapefiles" from my county FSA office.  They were sent to me as .JSON files which were not recognizable by FarmLogs.com.  I searched around and found some online GeoJSON editors that would display the files and let me save them as .kml files or shapefiles (zipped .dfb, .prj, .shp, .shx). That worked!!, but here's the problem.

Mostly, each of the JSON files represents one "tract" of land (a few contain multiple tracts).  The tract is basically one large polygon representing the outline of that tract.  However, one tract usually consists of several smaller polygons.  Some of these "sub-polygons" represent crop acres and some represent non-crop acres like houses, patches of trees in the middle of the fields, creeks, fence rows around the perimeter, things like that.  But it's important that the GIS file I import into the FarmLogs.com site/service only represent the "crop acres", otherwise it doesn't accurately calculate per-acre metrics.

As a side note... I'd like to create 2 different "total maps" of the farm for my reference outside of the FarmLogs site.  Ideally I could have them all in one Google Earth file with the "crop acres" tagged one way, and the non-crop acres tagged another, so I could visually distinguish and/or toggle them on/off.  One that represents all the total land owned/farmed and another representing just the tillable land / crop acres.  But to upload the files to FarmLogs.com, I need to be able to isolate the sub-polygons that represent crop acres and export or save them as .kml or preferably "shape files".

I've uploaded the JSON files to several free online editors which do a great job of displaying the overall tract and all the sub-tracts.  I just downloaded QGIS 2.14.2 and it can read the JSON files, but only displays the overall tract boundary.  To be more specific: QGIS, when I drag and drop a JSON file, finds 2 different "vector layers" that I can add to the project. One is a OGRGeoJSON with 1 feature of geometry type "Polygon". The other is a OGRGeoJSON with X features of geometry type "GeometryCollection". (Where X = the number of sub-tracts in the larger tract).

What free tools are available that can read a .JSON geoJSON file that will then allow me to select each "sub-polygon" and save it as it's own file then export to other formats?

Or does QGIS have a feature I can't find?


texts: Web service with geoprocessing capabilities (i.e. use of select tool)?

texts: We would like to have a published web service with capabilities to allow geoprocessing operations (consume feature data) - select tool (e.g. select by attributes) - on the service when we view/open it in ArcMap as lyr file, but only  allowing query the data and not the download/export of it. Different web service capabilities (Mapping, Feature Access) were tried without success. How can we do it?


texts: Different version in the GetCapabilities of WFS?

texts:
In the GetCapabilities of some WFS, I can see two versions mentioned.

<ows:ServiceTypeVersion>2.0.0</ows:ServiceTypeVersion>
<ows:ServiceTypeVersion>1.1.0</ows:ServiceTypeVersion>

Does it mean that the different versions are fully supported by the service?

The differences between V 2.0.0 and V 1.1.0 are not big, V 2.0.0 has more query available.


texts:
I'm currently using a polyline fishnet grid to use as a guide when labelling land features. For example, I aim to label 10 grids per day.

An issue I have is that when creating my polygons they keep snapping to the fishnet by accident.

How can I have the fishnet visible so that I can use it as a visual guide but not interactive, so I do not snap to it by accident when creating polygons?

I use both ArcGIS Pro and QGIS to create shapefiles, so need a solution that works across both software.

Note: it's important that I can still view the grid ID to keep a log, so I must be able to open the attribute table or view the grid number another way. E.g., a raster with grid numbers in the centre.


texts: Losing Subtypes when exporting selected Feature Class Data

texts:
Trying to understand why I am losing my subtypes. Work flow:

Loading a line feature class (FC) from a file Geodabase (FGDB) into
the table of contents of a ArcMap version 10.2.2.
Using "Select Features," I select a subsection of features and
right-click the layer in the TOC and use "Data" - "Export Data" to
export the selected features back into the same FGDB (e.g.
FC_Subset).

But when the exported features are loaded back into ArcMap the subtypes are missing?


texts: Array in python just full of zeros when opened using GDAL

texts:
I'm working on the below script. What I'm trying to do is create a stats.txt file output which has the Land Cover Class ID, Fractional Coverage (of that class) and the number of pixels (of that class) in a three column .txt so that I can pass the file, along with another .tif file I've created into the next stage of my classification project.

I've muddled through a set of errors and have solved a few (see: size-1 array problem).

My current problem is two-fold, my output file just creates a string of numbers not separated by anything so I'm not sure what that is caused by, but I've tried various methods to write to a file (as you can see below).

My main issue is that when I run the code in part, in ipython, I come across the issue that my input .tif file (a CEH landcover map product: https://eip.ceh.ac.uk/lcm/lcmdata) when read, is producing an array of just zeros and I'm not sure that is right.

In [3]: print lc
[[[0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  ...
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]]

 [[0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  ...
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]]

 [[0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  ...
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]]

 ...

 [[0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  ...
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]]

 [[0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  ...
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]]

 [[0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  ...
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]
  [0. 0. 0. ... 0. 0. 0.]]]

Below is the main bulk of the code I have thus far.

How do I fix this problem?

#!/usr/bin/env python

import sys
import calendar
import os

from osgeo import gdal
import numpy as np
from scipy.stats import mode

from IPython import embed

GDAL2NUMPY = {  gdal.GDT_Byte      :   np.uint8,
                gdal.GDT_UInt16    :   np.uint16,
                gdal.GDT_Int16     :   np.int16,
                gdal.GDT_UInt32    :   np.uint32,
                gdal.GDT_Int32     :   np.int32,
                gdal.GDT_Float32   :   np.float32,
                gdal.GDT_Float64   :   np.float64,
                gdal.GDT_CInt16    :   np.complex64,
                gdal.GDT_CInt32    :   np.complex64,
                gdal.GDT_CFloat32  :   np.complex64,
                gdal.GDT_CFloat64  :   np.complex128
              }

#Open the training LC map file.

fname = sys.argv[1]
lc_dataset = gdal.Open(fname)
lc = lc_dataset.ReadAsArray()
#lc = np.array(lc)

#Calculating total number of pixels with a valid Land Cover ID.

fill_value = 0
number_of_pixels = np.where(lc != fill_value)[0].shape[0]

#Get the number of classes and corresponding IDs.

lc_classes = np.unique(lc)

#Split each class into its contituante pixel and write result to file.

f = open("LCM2015_stats_test.txt", "w+")

for classID in lc_classes:
    lc_class_pixels = np.where(lc == classID)[0].shape[0]
    FractionalCover = lc_class_pixels/number_of_pixels
    DAT = np.column_stack((classID, FractionalCover, lc_class_pixels))
    np.savetxt('LCM2015_stats_text_2.txt', DAT, delimiter = "", fmt="%s")
    #f.write(classID, FractionalCover, lc_class_pixels)
    break
f.close()

If I can provide any extra information please let me know.


texts: How to properly clean up when unloading plugin

texts:
I'm developing a custom plugin. I'm having issues while debugging using the Plugin Reloader, but the problem is the same when loading and unloading my plugin.

The issue is that scripts seem to keep running when reloading/unloading the plugin. This causes signals firing to call functions that no longer exist, and functions that somehow still exist to try to access UI elements that no longer exist.

What I want to do is to properly remove all signals and functions when unloading the plugin. How would I achieve this?


texts: Geoserver generated Geopackage not displaying in maps

texts:
We have a geoserver instance with Geotiff layers created as layers and mosaics.

When I query the geoserver to getMap as a png or image it displays the correct map data. When I change the output format to geopackage it generates a geopackage that appears correct (I can see the images in SQLite Browser), but when I load the geopackage into any map software (MapCache on Android / http://ngageoint.github.io/geopackage-js/ in Browser) it does not show any map data.

I feel it's an issue with projection of the data, but would that make sense if it correctly shows from the image/png or image/jpeg query?

I have compared my output geopackage to example geopackages and everything seems to look the same (schema/data).


texts: A method to add a point into a line string in C#

texts:
I am working on a way to add a point(x,y) into a line. In fact a line consist of set of point with an order in them. so when I want to add point into line I must consider their order. In fact I must find two points which are before and after my point and then add it between them. I can work with most of liberaries as sharpmap,NetTopologySuit and etc. but none of them give me this ability.

I think I must calculate distance between point and sublinestring in a line and each one with lower distance will be the line that I must add my point to it.

the above image is what I want. A line is an array of points. so how can I add my point in this array with considering its order in array,I dont know where I place my point in that array Is there any better way to do this?any algorithm or things like that?


texts: Subtracted 2 DTM layers to find the height of trees but all we have is the pixel values, can I convert this to height?

texts: For a piece of coursework we have an aster layer that captures the tops of trees and a panorama layer that sees ground height (both are raster) so we have subtracted one from the other to get tree height but the values were are getting are the difference between pixel values rather than height values. Can this be changed to a value in metres?


texts: Calculating and displaying mean annual precipitation from CRU data

texts:
I'm trying to display mean annual precipitation (MAP) data from the CRU dataset (http://data.ceda.ac.uk/badc/cru/data/cru_ts/cru_ts_4.01/data/pre/) across a specific region.

The data are monthly precipitation totals. To get MAP, I need to first calculate annual sum for each year (1901-2016), then average across all years. Ideally, I would also subset this into years 1950-2013. The CRU data come in netCDF format, which I'm unfamiliar with. Do I need to convert the netCDF to a dataframe, make the MAP calculations, then convert back to netCDF? My ultimate goal is to then export the MAP data in gridded format as a raster to ArcMap.

Below is the R code I've been using for overlaying the overall average CRU data on my polygon. However, the values created by prec_rasta_mean below are not MAP.

library(cruts)
library(raster)
library(rgdal)

## Load shapefile to R
shp <- shapefile("GridAK_IU2016_FINAL_PolyAA83_SCSE")

## Plot shape to make sure
plot(shp)

## Retrieve data within shape file across timeRange
prec_rasta <- cruts2raster("cru_ts4.01.1901.2016.pre.dat.nc",
timeRange=c("1950-01-01", "2013-12-31"), shp, type='brick')

## Average data across all months in timeRange
prec_rasta_mean <- calc(prec_rasta, mean)

##  Write new raster layer to wd
writeRaster(prec_rasta_mean, 'cru_prec_brick_mean.img')

So, I'm looking for a bit of help getting making the calculations in netCDF, then I think the code above should take care of the rest.

The polygon that I'm using was created in ArcMap and the shapefile is available here: https://drive.google.com/file/d/0B_eqTercwIH2d01tekdaY2tSbEU/view?usp=sharing

Bit of a novice playing with spatial data in R (and ArcMap).


texts: Representing stationary elements in flow map

texts:
I have been trying to make flow maps to show social relationships between people geographically based on baptismal records. I have successfully made maps using https://anitagraser.com/2019/05/04/flow-maps-in-qgis-no-plugins-needed/ which shows the relationships between two separate points. But what my map is lacking is representations of non-movement.
So, if a person was baptized in the same location their parents and godparents lived. I had previously used Gephi and the representation there was a weighted circle around the point and I would like to do something like that, so I can weight them (hopefully) the same way I weighted the lines and give a more accurate portrayal of the social networks in a geographic framework. Any suggestions?


texts: Find coordinates corresponding to a reference distance from a specific point

texts:
I have a line and a point layer. The points are on a line(spline)
I want to know the coordinates of 50 meters ahead based on a specific point.
And I want to know the coordinates of 50 meters in the rear.
I want to enter two coordinates into a table of points.(I have hundreds of them!)
I have to solve it with QGIS or arcmap Python, but I have not found a way

I created a buffer based on a point and then clipped it.
I got both ends of the clipline, but it is not the exact length.


texts: Sentinel-2: Resampling Spatial Resolution

texts:
Does resampling spatial resolution possible to do for all of the Sentinel-2 products, especially Level-1C? For instance, I want to uniform B1 - B12 spatial resolution to 20m. I just want to confirm it in terms of theory.

Could you share a reference for this topic?


texts: Adjusting the Extent of Sub basins file with the Correct one

texts:
I am working in ArcGIS. I am also the learner of R. I need a solution for correcting the Extent of sub basin sahpefile with a complete basin. I have a correct complete file of basin Called LCC. its extent are
Top: 3582990.96241773       Bottom: 3382896.9805397
Left: 219786.440776942      Right: 400720.171941948

the extent of the sub basin file that made by spatial Join of 7 basin is
Top: 7.513928 dd          Bottom: 5.895039 dd
Left: 98.152079 dd        Right: 99.620746 dd

I want to correct the sub basin file.

One more thing is important that few weeks ago in ArcGIS I did correction but I merges the internal boundaries of the basins. I need a solution that I can separate all the sub basins command areas correctly, for the further analysis at each sub basin in my research.


texts: WMS response renders badly for the first seconds

texts:
I am using geoserver and oL3 to load a WMS layer. The layer is created with visibility:false and when I zoom in the map, I turn it on. While everything works fine I have noticed that for a second I get an ugly, nasty, displayed image of the layer before it renders completely.

Look at the screenshot Its ugly. Any idea what could be the issue? I have tried in different OS and with different browsers. Same issue always.


texts: Plotting N-S and E-W Profile of Land Surface Temperature (LST) Across Land Use types in ArcGIS for Desktop?

texts:
I am working on my final year thesis and I need to plot the seasonal North-South and East-West profile of land surface temperature (LST) across various land use types.

I have been able to extract the LST from landsat 7, but I need to plot it using either ArcGIS or if I export the cell LST values into an Excel spreadsheet and plot.


texts: Why is my Arcade Intersects Expression not returning consistently correct results?

texts:
I've written an Arcade Pop-Up expression that uses the Intersects function to return "Intersecting" or "Not Intersecting" based on whether a point feature intersects a polygon feature. I am getting varied results, with multiple cases of the Pop-Up returning "Not Intersecting" when the point is clearly intersecting a polygon feature. In my attached photo, the salmon colored area is a polygon, the white color is outside the bounds of the polygon.
Pop-up expression:
var geom1 = $feature;
var geom2 = FeatureSetByName($map,"Groundwater Plumes");
var intersectLayer = Intersects($feature, geom2);
var cnt = Count(intersectLayer)
var plume_int = " "

if (cnt >= 1) {
    for (var f in intersectLayer){
        plume_int = "Intersecting"
     }
} else {
    plume_int = "Not Intersecting"
}
return plume_int;


texts: Shapefile licence agreement when publishing map made with R's maps package

texts:
I am submitting an article that has a map I made using R's data from R's maps package. I know that most shapefiles come with a license user-agreement or copyright information that accompanies the map as an annotation.

Where can I find the license agreements for maps made with data from R maps?


texts: Draw line between points from multiple datasets

texts:
I have 2 point datasets and want a tool or script to draw a line between all points in one dataset to all the points in the 2nd dataset. Is it possible? I have tried ESRI "Point Distance" and "Generate near Table" but these just give me a table of points. I need to also calculate the distance between the points and this is between MGA Zone 55S and 54S

I checked How to write a script that will automatically draw lines from one point to multiple destination points? (ArcMap 9.3) and tried the arcgis 10 tool but it gives me write errors in ArcGIS 10.2

An ESRI or QGIS solution is fine.

-- The MMQGIS looks perfect but I have a python error. I am using Ver 2.0.1 on a Win 7 Enterprise.

An error has occured while executing Python code:

Traceback (most recent call last):
  File "C:\Users\georgec/.qgis2/python/plugins\mmqgis\mmqgis_menu.py", line 299, in hub_lines
    dialog = mmqgis_hub_lines_dialog(self.iface)
  File "C:\Users\georgec/.qgis2/python/plugins\mmqgis\mmqgis_dialogs.py", line 1397, in __init__
    self.set_hub_attributes(self.hublayer.currentText())
  File "C:\Users\georgec/.qgis2/python/plugins\mmqgis\mmqgis_dialogs.py", line 1411, in set_hub_attributes
    for index, field in enumerate(layer.dataProvider().fields()):
AttributeError: 'NoneType' object has no attribute 'dataProvider'

Python version:
2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]

QGIS version:
2.0.1-Dufour Dufour, d94c044

Python path: ['C:/OSGEO4~1/apps/qgis/./python/plugins\\processing', 'C:/OSGEO4~1/apps/qgis/./python', 'C:\\Users\\georgec/.qgis2/python', 'C:\\Users\\georgec/.qgis2/python/plugins', 'C:/OSGEO4~1/apps/qgis/./python/plugins', 'C:\\INTERG~1\\ERDASI~1\\usr\\lib\\Win32Release\\python', 'C:\\OSGEO4~1\\bin\\python27.zip', 'C:\\OSGEO4~1\\apps\\Python27\\DLLs', 'C:\\OSGEO4~1\\apps\\Python27\\lib', 'C:\\OSGEO4~1\\apps\\Python27\\lib\\plat-win', 'C:\\OSGEO4~1\\apps\\Python27\\lib\\lib-tk', 'C:\\OSGEO4~1\\bin', 'C:\\OSGEO4~1\\apps\\Python27', 'C:\\OSGEO4~1\\apps\\Python27\\lib\\site-packages', 'C:\\OSGEO4~1\\apps\\Python27\\lib\\site-packages\\PIL', 'C:\\OSGEO4~1\\apps\\Python27\\lib\\site-packages\\win32', 'C:\\OSGEO4~1\\apps\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\OSGEO4~1\\apps\\Python27\\lib\\site-packages\\Pythonwin', 'C:\\OSGEO4~1\\apps\\Python27\\lib\\site-packages\\Shapely-1.2.18-py2.7-win-amd64.egg', 'C:\\OSGEO4~1\\apps\\Python27\\lib\\site-packages\\six-1.3.0-py2.7.egg', 'C:\\OSGEO4~1\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode', 'C:\\OSGEO4~1\\apps\\Python27\\lib\\site-packages\\xlrd-0.9.2-py2.7.egg', 'C:\\OSGEO4~1\\apps\\Python27\\lib\\site-packages\\xlwt-0.7.5-py2.7.egg', 'C:\\OSGEO4~1\\apps\\qgis\\python\\plugins\\fTools\\tools', 'C:\\Users\\georgec\\.qgis2\\python\\plugins\\mmqgis/forms']

I have moved the projection issue to Calculate length of line across zones with at least m accuracy


texts: Concatenate or group by values using spatial join in QGIS?

texts:
I have a layer (SQLlite) of city lots and would like to accomplish the following:

For each city lot,

concatenate the list of unique lot id's which are bound within a radius of 30m from the given lot.
or a spatial join which "groups by" both source lot id and lot ids within a 30m radius.

I am stumped, as spatial join will only aggregate data.

Also, I don't have administrator privileges on my computer so cannot install plugins.

(Using QGIS 2.6)


texts: How to toggle on/off the OSM layer in the online editor?

texts:
I want to toggle on/off the OSM layer to see what is in the Bing aerial image.

How to do that in the OSM online editor?


texts: Is there a union function for multiple layers comparable to ArcGIS in open source GIS like QGIS?

texts:
I need a union function for a lot of polygon layers (protected areas of all kind, nature, water etc.) comparable to the union function in ArcGIS. I have only the desktop version from ArcGIS and so it will only work on two layers.

I am looking for the same function in QGIS or another opensource GIS (openjump, gvsig....). I have tested MMQGIS and other functions in QGIS but I need union I think. I have merged layers in QGIS then worked my way with different spatial intersections in ArcGIS but thats all very complicated. I did union theme by theme in ArcGIS but in the end, I will have hundreds of themes so that is just impossible and union is just what I need.

The result should have all the attribute information of overlaying layers and the polygons should be split. An overlaying layer counts as an additional result and would be nice but not absolutely necessary as first impressions of how many different kinds of protected areas overlay. But in the end, it is most important that I do not lose any information for every little split polygon because I have to justify why or why not this exact polygon is convenient or not.


texts: how to generate random points influenced by underlaying variable in R?

texts: I am wondering if in R is it possible to generate a set of random points, within a given study area, with points' intensity being inhomogeneous, i.e. varying according to an underlying variable? The latter would be represented by a RasterLayer object (e.g., a poulation density raster).


texts: MapServer SOS (Sensor Observation Service) Configuration

texts:
I tried to set up MapServer SOS but I faced a problem: the SOS doesn't return anything. You may see the map file I have created below:

MAP
  NAME "SOS_DEMO"
  STATUS ON
  SIZE 400 300
  EXTENT -180 -90 180 90
  UNITS METERS
  SHAPEPATH "C:\ms4w\apps\tutorial\data"
  IMAGECOLOR 255 255 255

  WEB
    IMAGEPATH "C:\ms4w\apps\tutorial\templates"
    IMAGEURL "C:\ms4w\apps\tutorial\images"
    METADATA
      "sos_onlineresource" "http://127.0.0.1:8282/cgi-bin/mapserv.exe?map=c:/ms4w/mysos.map?"
      "sos_title"          "My SOS Demo Server"
      "sos_srs"            "EPSG:4326"
      "sos_enable_request" "*"
    END
  END

  PROJECTION
    "init=epsg:4326"
  END

  LAYER
    NAME "sos_point"
    METADATA
      "sos_procedure"  "ifgi-sensor-1"
      "sos_offering_id" "WQ1289"
      "sos_observedproperty_id" "Water Quality"
      "sos_describesensor_url" "http://127.0.0.1:8181/DescribeSensor.xml"
    END

    TYPE POINT
    STATUS ON
    DATA 'sospoint'
    PROJECTION
      "init=epsg:4326"
    END
    CLASS
      NAME 'sospoint'
      STYLE
        COLOR 255 128 128
      END
    END
  END
END

As you see, I tried to retrieve sensor data from a shapefile. The message returned by the SOS is:

<om:ObservationCollection xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:swe="http://www.opengis.net/swe/1.0.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sos="http://www.opengis.net/sos/1.0" xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:om="http://www.opengis.net/om/1.0" gml:id="WQ1289" xsi:schemaLocation="http://www.opengis.net/om/1.0 http://schemas.opengis.net/om/1.0.0/om.xsd http://mapserver.gis.umn.edu/mapserver http://127.0.0.1:8282/cgi-bin/mapserv.exe?map=c:/ms4w/mysos.map?service=WFS&version=1.1.0&request=DescribeFeatureType&typename=urban">
<om:member>
<om:Observation>
<om:procedure xlink:href="urn:ogc:def:procedure:ifgi-sensor-1"/>
<om:observedProperty>
<swe:CompositePhenomenon gml:id="Water Quality" dimension="3">
<swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:Id"/>
<swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:sensor_nam"/>
<swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:sensor_val"/>
</swe:CompositePhenomenon>
</om:observedProperty>
<om:resultDefinition>
<swe:DataBlockDefinition>
<swe:components>
<swe:DataRecord/>
</swe:components>
<swe:encoding>
<swe:TextBlock tokenSeparator="," blockSeparator=" " decimalSeparator="."/>
</swe:encoding>
</swe:DataBlockDefinition>
</om:resultDefinition>
<om:result></om:result>
</om:Observation>
</om:member>
</om:ObservationCollection>

Although I put 6 observations into the shapefile but the SOS doesn't return any. Would you please let me know what I should do to resolve the problem?!

Thanks,
Ebrahim


texts: Creating Buffer based on Field attribute value in QGIS Modeler

texts:
Working under QGIS 3.16.4 and using the Modeler, I would like to create buffers for a polygons layer.
The polygons layer includes the buffer size as an attribute (e.g. "BUFFER_M") resulting from the field calculator (a previous step in the model).

Although I specified the polygons layer as the Input layer (Using algorithm output), there is no fields available (NULL) in the Expression Dialog.

I tried to fix the Distance with the expected BUFFER_M field as following: Pre-calculated Value > "BUFFER_M" in the Expression Dialog with no success.

All other steps in the model worked well but the buffers layer was generated with a Distance default value of 10,00 m.
Any ideas on how to specify the buffer size (Distance parameter) based on a field attribute of the input layer (vector layer)?
NB: the same problem when done manually as well (generated buffer of 10,00 m), however in this case the "BUFFER_M" field was available in the Expression Dialog.


texts: Does QGIS support parsing of date strings in tables?

texts:
It is straightforward to load GPX files (GPS downloaded tracks / points) into QGIS, then save and manipulate them as shapefiles. However, the recording date (in the comment (cmt) field) of waypoints is in the format YY-MMM-DD HH:MM:SS (e.g. 28-AUG-11 11:57:51) and it would be possible to sort by date only if the format could be parsed to something closer to the ISO 8601 standard (YYYY-MM-DD ...).

String manipulation in the field calculator can take you partway: '20' || substr(cmt,8,2) || '-' || substr(cmt, 4, 3) || '-' || substr(cmt, 1, 2) || ' ' || substr(cmt, 11, 8)
However, you're  then left with YYY-MMM-DD HH:MM:SS - i.e. AUG instead of 08.

Is there a straightforward way to parse the date string directly, providing integer months? (Ideally, something like the R strptime() function)


texts:
I have a shp with a column NOM_CONCAT and I can not explode it to have a unique information,
Each time, I have the same error message and I can't find solutions.
#TypeError: explode() takes 1 positional argument but 2 were given

SHAPEFILE
Code:
import pandas as pd
import numpy as np
import time
import datetime
import sys
import geopandas as gpd

gdf = gpd.read_file('RSF_Fiche_Canalisation-power_shp_ME_Position-04012021.shp')
gdf['NOM_CONCAT'] = gdf['NOM_CONCAT'].str.split(',  ')
gdf.NOM_CONCAT = gdf.NOM_CONCAT.fillna({i: [] for i in gdf.index})
gdf = gdf.explode('NOM_CONCAT')
print ("temp_complet_explode",gdf)

Current situation:

Situation I hope:


texts: QGIS getting crashed on Update Feature Signal

texts:
Like ArcGIS Editor Tracking, I am trying to design attribute field with self update date feature called Updated Date in QGIS. I am following Making automatic updated date and time field in QGIS this link to get calculate it automatically but while doing so, the QGIS project is getting crashed every time. I am selecting only one feature but still it is getting crashed. I checked the code and it is running fine in Python console but not in Plugin. Please suggest.
Python Code for reference:
layer = qgis.utils.iface.activeLayer()

def update():
    field = layer.fields().lookupField('fieldName')
    e = QgsExpression( " $now " )
    for feat in layer.selectedFeatures():
        feat[field] = e.evaluate()
        layer.updateFeature( feat )

layer.attributeValueChanged.connect(update)
layer.geometryChanged.connect(update)


texts: Select from a list of string variables in a custom Python ArcGIS tool?

texts:
I've made a few Python tools for ArcGIS lately and haven't had to use this idea in my tools until now. I am making a looong tool that will deal with 13 different districts worth of data. I want the user to select which district the data they are processing comes from. I want it to be a drop down menu that the user selects from and then that will help to assign attribute data properly.

I have looked around online, but haven't found any resources that might help me accomplish this, and it might just be a really easy thing to do, can anyone help me out here?


texts: Using ModelBuilder Model from ArcMap 9.3

texts:
I have a model that was created in ModelBuilder.  I think the original version is 9.3 ArcMap.  I'm trying to run it and it won't run because it was created in an older version.  So I would have to rebuild the model in my current version of ArcMap which is 10.7.1.
Is there a way to upgrade the model without having to rebuild it?


texts: How to specify column names with v.in.ascii

texts:
I have managed to import a CSV file into a points vector file using GRASS v.in.ascii

v.in.ascii --o input=test1.csv output=test2 format=point fs=, skip=1 x=2 y=3 z=0 cat=0

This is test1.csv ...

p,east,north,band
TD11 3TX,375749,662231,1
AB54 7TH,362375,852448,1
....

However the column names in the .DBF are not the names in my CSV (they become: str_1, int_1 etc).
I though maybe the 'columns' option of the command might help. The manual isn't very clear. It says..

For example: 'x double precision, y double precision, cat int, name varchar(10)'

1)What is 'x'. 'y', 'name' etc? Is this
a) the column names in the CSV file or
b) new column names that will be matched from left to right with the columns in the CSV?

2) If (b) does it include the new 'cat' column (if you use the 'cat=0'option).

I tried this....

v.in.ascii --o input=test1.csv output=test2 format=point fs=, skip=1 x=2 y=3 z=0 cat=0 columns='cat int, p varchar(8), east int, north int, band int'

But I get this error...

Sorry <int,> is not a valid option
Sorry <p> is not a valid option
Sorry <varchar(8),> is not a valid option

I thought maybe it didnt like the apostrophe so I changed to dbl quote marks - but then got other errors so I gave up experimenting until I understand the format of the command.

I'm on Windows7 64 bit, 4GB RAM, GRASS 6.4.250870M (2012)

Thanks


texts:
I have an OpenLayers map project where I currently add dynamic markers based on a query but I really want to show some text instead of the marker icon.

Is there a way I can either render some text to a PNG image and pass that to the marker object,or better still pass text to a marker for display instead of an icon?

Currently using this code to show a marker:

var size = new OpenLayers.Size(32,32);
var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
var icon = new OpenLayers.Icon("./images/DrawingPin2.png",size,offset);
marker = new OpenLayers.Marker(lonlat,icon);
marker.setOpacity(1.0);
airportLayer.addMarker(marker);


texts:
When using ogr2ogr to export from PostGIS to Shapefile a geometry(PolygonZM, 25832) table, the coordinate references system (SRS) is not accurate.

ogrsrsinfo returns the correct SRS (below the SRSs in WKT format from XXX.prj file and from output of gdalsrsinfo  -o wkt epsg:25832). Am I doing something wrong?

PS I tried using ogr2ogr -a_srs EPSG:25832,  but the WKT in the .prj file is still incorrect.

XXX.prj from ogr2ogr

PROJCS["ETRS89_UTM_zone_32N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]

gdalsrsinfo  -o wkt epsg:25832

PROJCS["ETRS89 / UTM zone 32N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","25832"]]


texts:
I have python 2.7 and I have just installed (via pip) a module named 'dicttoxml'. This module should work with 2.6+ python version. I am importing it to my *.py file and using it in my plugin code. When I am lauching QGIS and trying to use my plugin, an error occures:

  File "C:/PROGRA~1/QGISWI~1/apps/qgis-ltr/./python\qgis\utils.py",
  line 478, in _import
      mod = _builtin_import(name, globals, locals, fromlist, level) ImportError: No module named dicttoxml

Anyone can help?


texts: MS SQL Layer - Invalid Layer Error when Attempting to Load a Table

texts:
I have a table called [stg].[Stops] in SQL Server that I would like to load in QGIS for data analysis. This is the first time I use the MSSQL Server connection option in QGIS. Unfortunately, even though QGIS recognizes the table and its geography data type. When I attempt to connect, I get an invalid layer error.

Here is a screenshot of the menu:

and here is the error:

  2017-01-25T11:07:37   1   dbname='TK463' host=******* srid=4326
  type=Point table="stg"."Stops" (GEOM) sql= is an invalid layer - not
  loaded

What could possible cause that?


texts: How do you treat partial 3d features in PostGIS?

texts:
We have features from survey data that contain partial 3d information.

The most common example would be a 2D LineString representing a road, that contains elevation information in certain points where it was surveyed. Other examples include roof shapes - A MultiLineString where some key points have an assigned elevation from the building plan, but not all.

Using PostGIS, which data model would you recommend to store this kind of information, to keep it as accessible as possible, without losing or generating interpolated information?


texts: How to open popup menu on right click in Leaflet

texts:
I want to open a popup menu list on right click with Leaflet map. I have tried the ContextMenu of leaflet but couldn't do it. Here is the sort of code I used.

map.on('contextmenu', L.popup()
.setContent('
Hello world!
This is a nice popup.
'));


texts: How to overlay a jpg onto a google earth image?

texts: I have produced a model from an online engine , and it is in a google earth picture. I want to georeference the below picture and apply the boundaries here on my google earth image. I'm using QGIS2.2. How do I do that?


texts: Convert raster to CSV with lat, lon, and value columns

texts:
I'm looking for a process to convert ASCII gridded data (in this case 60min/1 degree gridded ASCII population data (GPW) from SEDAC: https://sedac.ciesin.columbia.edu/data/set/gpw-v4-population-count-adjusted-to-2015-unwpp-country-totals-rev11/data-download) to a CSV with three columns: lon, lat, and value using open source tools.

This is the data header:

ncols         360
nrows         180
xllcorner     -180
yllcorner     -90
cellsize      1.0000000000001
NODATA_value  -9999

so the data is structured as space-separated values, with each value occupying a position within 360 columns and 180 rows that represents its coordinates via that position:

-9999 -9999 -9999 -9999 -9999 -9999 0.000936705 0.002529013 0.001377391 0.001723122 0.0004472999 ...

I only want to include positive values in the lon/lat CSV.

I've been using GDAL for other tasks and have been looking in the documentation, but I'm not seeing this type of data manipulation in its scope.


texts: Configuring TileCache on Windows and Linux

texts:
I want to do tile caching for MapServer map files by using TileCache application. For this I have installed Python 2.7 and TileCache 2.11 and applied the following sequence of steps:

Extracted TileCache-2.11 tar file to my apache web directory into a folder tilecache
Changed Disk Cache location in tilecache.cfg to my local folder
Replaced name, srs, url with my map file in place of basic layer
tested in browser using the url http://localhost:8088/tilecache/tilecache.cgi?LAYERS=APdem&&SERVICE=WMS&FORMAT=image/png&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&BBOX=-180,-90,0,90

But i'm getting tilecache.cfg python code in the browser as:

  from TileCache import Service, cgiHandler, cfgfiles
if __name__ == '__main__':
    svc = Service.load("tilecache.cfg")
    cgiHandler(svc)

Is there any step missed in my process or what went wrong?
In Linux the apache httpd.conf file is as follows

 ServerRoot "/etc/httpd"
Listen 80
Include conf.modules.d/*.conf
User apache
Group apache
ServerAdmin root@localhost
<Directory />
    AllowOverride none
    Require all denied
</Directory>
<Directory /var/www/tilecache>
     AddHandler cgi-script .cgi
     Options +ExecCGI
</Directory>
DocumentRoot "/var/www/html"
<Directory /var/www/tilecache-2.11>
     AddHandler cgi-script .cgi
     Options +ExecCGI
</Directory>
<Directory "/var/www">
    AllowOverride None
    # Allow open access:
    Require all granted
</Directory>
# Further relax access to the default document root:
<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

<Files ".ht*">
    Require all denied
</Files>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    CustomLog "logs/access_log" combined
</IfModule>
<IfModule alias_module>
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>
<IfModule mime_module>
    TypesConfig /etc/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    # For type maps (negotiated resources):
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
</IfModule>
AddDefaultCharset UTF-8
<IfModule mime_magic_module>
    MIMEMagicFile conf/magic
</IfModule>
EnableSendfile on
IncludeOptional conf.d/*.conf

the tilecache.cfg file is as follows

[cache]
type=Disk
base=/var/www/tilecache
[basic]
type=WMS
url=http://labs.metacarta.com/wms/vmap0
extension=png
[apdem]
type=WMS
url=https://test.com/mapserver/cgi-bin/mapserv?map=RMapFiles/apdem.map
extension=png
srs=EPSG:4326
layers=apdem

I have changed working directory in apache from html to cgi-bin the following error is appearing
I extracted the tilecache code into cgi-bin and now the error was rectified with new error asAn error occurred:

File contains no section headers.
file: /var/www/cgi-bin/tilecache-2.11/tilecache.cfg, line: 1
'd# Configuration for MC TileCache\n'
  File "/var/www/cgi-bin/tilecache-2.11/TileCache/Service.py", line 85, in _load
    config.read(files)
  File "/usr/lib64/python2.7/ConfigParser.py", line 305, in read
    self._read(fp, filename)
  File "/usr/lib64/python2.7/ConfigParser.py", line 512, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)


texts: Using Spatialite to add features to a layer does nothing in custom plugin but works in QGIS python console

texts:
Context

I am developing a QGIS plugin which among other things can save digitized features to existing vector layers in a Spatialite database. I am using the utility class below, to help with retrieving and inserting features.

from qgis.utils import spatialite_connect

class SSDM():

    def __init__(self, path):
        self.path = path

    def connected(func):
        ''' This decorator makes sure connections are opened
            before running func and closed after running func.
        '''
        def handler(self, *args, **kwargs):
            with spatialite_connect(self.path) as con:
                self._con = con
                retVal = func(self, *args, **kwargs)
            return retVal
        return handler

    @connected
    def addFeature(self, layer, fields, geometry=None):
        filtered = dict((k,v) for k,v in fields.items() if bool(v))
        props = [s.lower() for s in filtered.keys()]
        vals = filtered.values()
        properties = ", ".join(props)
        values = "?, ".join(["",]*(len(vals)+1))[:-2]
        srid = self.getLayerSRID(layer)
        statement = "INSERT INTO %s(%s, shape) VALUES(%s, GeomFromText(?, %s))" % (layer, properties, values, srid)
        cur = self._con.cursor()
        cur.execute(statement, (*vals, geometry))

    @connected
    def getLayerSRID(self, layer):
        cur = self._con.cursor()
        cur.execute("SELECT srid FROM vector_layers WHERE table_name=?", (layer,))
        return cur.fetchone()[0]

To use it:

ssdm = SSDM(path_to_sqlite_file)

fields = {"id": 1}
geometry = 'MultiLineStringZM ((31.73134211549897543 33.50656579852068973 0 0, 31.73292725366940914 33.5060147109505948 0 0))'

ssdm.addFeature("vector_layer_name", fields, geometry)

The problem

Oddly enough, when copy pasting this code in the QGIS Python Console, my vector layer is updated with the expected geometry, and with the correct fields in the attribute table.

When running this in my plugin context though, nothing happens. I don't even receive error messages.

Note that the function SSDM.getLayerSRID works in both locations (I have checked via remote debugging).


texts: Generalizing exact location of certain data points using Carto CSS?

texts:
I am dealing with some sensitive data for which providing a high resolution of accuracy of the location would be detrimental. However, the general location is not sensitive and useful to share.

I would like to use Carto CSS to generalize the point visualization above a certain zoom level.  The goal would be to style the points as a non scaling marker of a fixed large width .. or a question mark icon or something similar.  I know naturalists does this with certain sensitive biodiversity data.

Any advice or examples?


texts: Correctly calculating attribute table column in gvSIG

texts:
I am trying to conduct a multicriteria evaluation, and it is necessary to check the compatibility of two different land-use types that I have in seperate layers. I am working in gvSIG 1.12, and have a unioned layer which contains polygons which are made up of land use A and B, included in the table is compatibility of Land-use A with each instance of B, but I need to create a final column that can select the correct number. An example of my attribute table is shown below.

Compatibility:

ID  |  Land-use A |  Agr  |  Urb  | For  | Com |  Pub | Land-use B | Compat
 1       N           1        4      3      0      2      Agr
 2       G           2        3      5      1      0      Pub
 3       K           4        2      3      5      1      Urb
 4       N           1        4      3      0      2      Urb

I am particularly struggling with getting the syntax correct for the Expression calculator. Should this be feasable using the preset commands in gvSIGs expression calculator or do I need to import the expression from a file (for instance a .py). In excel this is a simple if statement does the job but I am unable to execute this in gvSIG.

An example of my desired attribute table can be seen below:

Desired:

ID  |  Land-use A |  Agr  |  Urb  | For  | Com |  Pub | Land-use B | Compat
 1       N           1        4      3      0      2      Agr          1
 2       G           2        3      5      1      0      Pub          0
 3       K           4        2      3      5      1      Urb          2
 4       N           1        4      3      0      2      Urb          4


texts: Adding auto incremented value to existing ID

texts:
I am having a table where two columns are "ID" and "maintenance_ID". The "ID" column is unchangeable and comes from another table but the "maintenance_ID" is calculated from other fields like the "Date".
Example:
ID     Date        maintenance_ID
EH001  21/11/2020  EH001M20201121
EH001  21/11/2020  EH001M20201121
EH002  21/11/2020  EH002M20201121

To create the "maintenance_ID" I am using the following code:
"ID" + 'M' + format_date("Date", 'yyyyMMdd')

What I would like to do is adding to this formula a parameter where generates a new number at the end of the "maintenance_ID" to make it unique. As you can see in my example the two first records are the same so I would like to add a "0" to the first one and a "1" to the second one and so on until 9 ( I won't be more than 9 records with the same "ID". Example:
maintenance_ID
EH001M202011210
EH001M202011211
EH002M202011210
Anyone knows what can I add to my expression to achieve this?


texts:
I am trying to write geodata to a Microsoft SQLServer 2017 using rgdal.

dsn = 'MSSQL:server=XXX;database=XXX;trusted_connection=yes'

data=data.frame(lat=c(52.52437), lon=c(13.41053), value=c("v"))
colnames(data) <- c("lat", "lon", "value")
data_coords = data
coordinates(data_coords) <- ~ lat + lon
data_sp = SpatialPointsDataFrame(data_coords, data)

writeOGR(data_sp, dsn=dsn, driver="MSSQLSpatial", layer="NewMSSQLSpatialTableName", layer_options=c("SRID=28355"), verbose=TRUE)

However, this code fails with:

> writeOGR(data_sp, dsn=dsn, driver="MSSQLSpatial", layer="NewMSSQLSpatialTableName", layer_options=c("SRID=28355"), verbose=TRUE)
Object initially classed as: wkbPoint
Error in writeOGR(data_sp, dsn = dsn, driver = "MSSQLSpatial", layer = "NewMSSQLSpatialTableName",  :
  Layer creation failed

I have permissions to create tables in the database.
Am I missing additional permissions or did I do something else wrong?

Versions:

> library(rgdal)
rgdal: version: 1.2-16, (SVN revision 701)
 Geospatial Data Abstraction Library extensions to R successfully loaded
 Loaded GDAL runtime: GDAL 2.2.0, released 2017/04/28
 Path to GDAL shared files: C:/Users/User/Software/R/R-3.4.3/library/rgdal/gdal
 GDAL binary built with GEOS: TRUE
 Loaded PROJ.4 runtime: Rel. 4.9.3, 15 August 2016, [PJ_VERSION: 493]
 Path to PROJ.4 shared files: C:/Users/User/Software/R/R-3.4.3/library/rgdal/proj
 Linking to sp version: 1.2-7


texts:
I am trying to style a DEM I created with QGIS. I have created the DEM as a GeoTiff and can successfully display the layer with Openlayers with the standard raster style in GeoServer. However, when applying a custom sld style I get no data displaying. My sld is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:sld="http://www.opengis.net/sld">
    <sld:UserLayer>
        <sld:LayerFeatureConstraints>
            <sld:FeatureTypeConstraint/>
        </sld:LayerFeatureConstraints>
        <sld:UserStyle>
            <sld:Name>DEM_3857</sld:Name>
            <sld:Title/>
            <sld:FeatureTypeStyle>
                <sld:Name/>
                <sld:Rule>
                    <sld:RasterSymbolizer>
                        <sld:Geometry>
                            <ogc:PropertyName>grid</ogc:PropertyName>
                        </sld:Geometry>
                        <sld:Opacity>1</sld:Opacity>
                        <sld:ColorMap>
                            <sld:ColorMapEntry color="#2b83ba" label="17.000000" opacity="1.0" quantity="17"/>
                            <sld:ColorMapEntry color="#abdda4" label="72.750000" opacity="1.0" quantity="72.75"/>
                            <sld:ColorMapEntry color="#ffffbf" label="128.500000" opacity="1.0" quantity="128.5"/>
                            <sld:ColorMapEntry color="#fdae61" label="184.250000" opacity="1.0" quantity="184.25"/>
                            <sld:ColorMapEntry color="#d7191c" label="240.000000" opacity="1.0" quantity="240"/>
                        </sld:ColorMap>
                    </sld:RasterSymbolizer>
                </sld:Rule>
            </sld:FeatureTypeStyle>
        </sld:UserStyle>
    </sld:UserLayer>
</sld:StyledLayerDescriptor>

Is there perhaps something I am missing here? The style shows in GeoServer as an option and functions when applied in QGIS so I assume there is another hidden issue.


texts: Converting Latitude and Longitude to multiple UTM zones

texts:
I have a data set of 3000 plots with coordinates in Lat/Long. It spans 13 UTM zones. I want to break it up into chunks corresponding with the 13 UTM zones, and convert the coordinates in each chunk to their appropriate UTMs.

How would I figure out which UTM zone each coordinate should be in? I would prefer to use R, but could use QGIS if necessary


texts: Summary statistics from feature iterator and select by location - missing selected feature name. Arcmap 10.2

texts:
I'm trying to calculate summary statistics for a subset of a point feature, based on selecting by location. I'm using a feature selection iterator to get statistics for each polygon feature in the 'polygons shp', and merging the summary statistics to a final table.

So far the summary statisitics can be calculated, but I'm looking for a way to get a field in the final output table that shows the name (or other field) from the iterated polygon. Without this, I have statistics based on a selected location, but I don't know which location this refers to.

I know that I could do a spatial join for the selecting polygon and point feature, then use that in the summary stats, however, the dataset is very large, and this is likely to take a long time. Hence my reluctance to copy the datasets and then do a large spatial join.

How can I carry this information through to the final output stats?


texts: Getting the childcount in leaflet markercluster

texts:
I have created a custom icon for clustering my data, using leaflet markercluster. As default markercluster have the "childcount" in the icon. How can i put that number in my divicon?

var markers = L.markerClusterGroup({
iconCreateFunction: function(cluster) {
    return L.divIcon({className: 'mydivicon', html: 'childcount'});
}
});

of course it just puts the text "childicon" in the circle. The child icon is a 'var' in the leaflet.markercluster-src.js

var childCount = cluster.getChildCount();

How can i write it in my L.divicon?


texts: Qgis python: no interaction with Map Canvas

texts:
I've created a simple python script to load and show two layers and zoom to the first one. It looks like the script doesn't run the last 4 lines after I uncomment'print lyr1'. Anyway the map canvas is not changing.

from PyQt4.QtCore import *
from PyQt4.QtGui import *

canvas = iface.mapCanvas()

lyr1= QgsVectorLayer("C:\\Area1.shp", "Layer 1", "ogr")
lyr2= QgsVectorLayer("C:\\Area2.shp", "Layer 2", "ogr")
reg = QgsMapLayerRegistry.instance()
reg.addMapLayers([lyr1, lyr2])

#print lyr1

rect = QgsRectangle(lyr1.extent())
rect.scale(5)
canvas.setExtent(rect)
canvas.refresh()


texts:
I have implemented zoom in by box selection using openlayers 4 , like this

$('#zoomin').click(function () {
        // var currentZoomLevel = map.getView().getZoom();
        //map.getView().setZoom(currentZoomLevel + 1);
        dragBoxInteraction = new ol.interaction.DragBox({
            // condition: ol.events.condition.platformModifierKeyOnly
        });
        map.addInteraction(dragBoxInteraction);
        dragBoxInteraction.on('boxend', function () {
            var extent = dragBoxInteraction.getGeometry().getExtent();
            map.getView().fit(extent, map.getSize());
            //source.forEachFeatureIntersectingExtent(extent, function (feature) {
            //    console.log(feature);
            //});
        })

    });

I need to implement zoom out by box , i've searched a lot , but no luck with openlayers , by box selection i need to zoom out to the area which user selects


texts: OpenLayers 3, map.on('moveend',..): Differentiate between user interaction and map.setCenter() calling

texts:
I am implementing OpenLayers for a GIS application and want to add a 20 seconds timeout when the user scrolled the map, after which the GPS auto track function should resume.

For that I am utilizing the map.on('moveend', move_func(..)) listener. The problem is that it cannot differentiate whether the user scrolled or the position change came from map.setCenter(..).
Although I could implement a state variable which is set to true every time map.setCenter() is called, this does not only seem inelegant but also wrong in case the setCenter call and a user interaction would overlap.

So is there any better solution to this?


texts:
I have a problem with QGIS (2.2 and 2.4). Sometimes, when I'm going to insert some new features on a layer, the pop-up window that appears at the end is empty (all gray, no attributes are displayed). So I must open the table and insert the new values. It happens even if I use layers from postgis or shape files.
Its not a problem of the layer because the same layer used in another machine does not have this problem.
Someone have the same problem? Could it be a problem linked to some plugin?

EDIT:
Ok now I can replicate the error. If I load a shape file with no style I don't have any problem. If I apply a style (from qml or from database postgres) it happens. Tested on the pc, with a clean qgis 2.4 installation.

Can someone confirm to me the error?


texts: Area Estimation for Several Regions and Several Dates in GEE

texts:
Following the previous question, I have a new question. From the following code, I estimate the water areas for selected regions in Google Earth Engine. However, as you could see from the second line of the code, it only estimates for selected date (.filterDate("2010-03-01");). I want it to estimate for all the available dates (months in the dataset) and the regions. Shortly, I would like to add a simple loop for the dates in this code.
//Opening the JRC Water Data
var water_data = ee.ImageCollection("JRC/GSW1_2/MonthlyHistory").filterDate("2010-03-01");
var water_area = ee.Image(water_data.first())

//Creating Region Variable
var turkeyProvinces = ee.FeatureCollection("FAO/GAUL_SIMPLIFIED_500m/2015/level1")
    .filter(ee.Filter.eq("ADM0_NAME", "Turkey"));

//Calculating Water Areas
var calculateClassArea = function(feature) {
    var areas = water_area.eq(2).selfMask().multiply(ee.Image.pixelArea()).divide(1e6)
    .reduceRegion({
      reducer: ee.Reducer.sum(),
      geometry: feature.geometry(),
      scale: 30,
      maxPixels: 1e10
    })

    return feature.set(areas)
}
var waterAreas = turkeyProvinces.map(calculateClassArea);

//Exporting the Results
Export.table.toDrive({
    collection: waterAreas,
    description: 'water_area_by_province',
    folder: 'earthengine',
    fileNamePrefix: 'water_area_by_province',
    fileFormat: 'CSV',
    selectors: ['ADM1_NAME', 'water']
    })

Here is the Google Earth Engine link:
https://code.earthengine.google.com/f024358da930db6444ea29820867a7dd


texts: Create a NO2 chart with only urban areas

texts: I want create a chart to measure NO2 emissions in Mexico on a monthly basis. So far, I've been able to develop the code for it. However, I'd like to create this chart only considering urban areas. I'm using a land cover dataset (MODIS) to identify urban areas. However, when I try to mask non-urban areas in every image of the NO2 image collection, I got this error.  I don't have a clue where is the problem. I attach my code for reference: https://code.earthengine.google.com/b45f7215d9741f25d58551105f51521b


texts: Selecting points with specific attributes in ArcMap ModelBuilder?

texts:
This is the example of my problem:

I need to collect points that are within polygons. There are some polygons that contain more than one point. In this case I need to select one point with a specific attribute which represents the polygon. For example: There are two points in selected polygon ("NAZ_LAU1" = Kladno) and I want a point with a higher "POCET_OBYV" to be selected.

Since I work with a large dataset and do not have any Python skills, I need to do it in ModelBuilder.


texts: Appending or merging consecutive line segments (contours) as one single line of same elevation value?

texts:
Is there a way using python (ArcPy) or ArcGIS 10.1 tools to collect consecutive line segments having the same elevation value and appending/merging/generating one single line from them?

Each resulting line will have the same elevation value as the original segments.


texts: Problem converting from float 32 tif to 8bit tif in QGIS using GDAL

texts:
I am using GDAL translate to convert tif in float 32 to Byte format. When I run the conversion using GDAL translate, the output is useless (see pictures). GDAL does not seem to have this problem with other formats, Int 16 worked fine, but I need these images in Byte.

Command:
gdal_translate -ot Byte -of GTiff "D:/QGIS ASTER TEST/Singleband/StAustell/RT_StAustell_14.tif" "D:/QGIS ASTER TEST/test4.tif"

Log:
Processing algorithm…
AlgorithmDialog
Input parameters:
{ 'COPY_SUBDATASETS' : False, 'DATA_TYPE' : 0, 'INPUT' : 'D:/QGIS ASTER TEST/Singleband/StAustell/RT_StAustell_14.tif', 'NODATA' : 0, 'OPTIONS' : '', 'OUTPUT' : 'D:/QGIS ASTER TEST/test4.tif', 'TARGET_CRS' : '' }

GDAL command:
gdal_translate -ot Byte -of GTiff "D:/QGIS ASTER TEST/Singleband/StAustell/RT_StAustell_14.tif" "D:/QGIS ASTER TEST/test4.tif"
GDAL command output:
Input file size is 969, 872

0...10...20...30...40...50...60...70...80...90...100 - done.

Execution completed in 0.12 seconds
Results:
{'OUTPUT': }

Loading resulting layers
Algorithm 'Translate (convert format)' finished


texts:
I have a point shapefile and want to create a polygon shapefile that intersects all the points.

For instance:
- Point shapefile with 4 points (representing a square area);
- Want to automate the process of creating a polygon that intercepts the 4 points forming the square;

Since I need precision, automating the process will garantee that each polygon vertice is on the exact position.

On QGIS 2.x I used a plugin named Points2One which is not available for QGIS 3.


texts: Downloading entire image collection from GEE with metadata?

texts:
I develop code in python using Google Earth Engine Python API, to download the entire collection of NOAA LAI that is stored in GEE. Despite the fact that the whole downloading process is painfully slow, I noticed that the downloaded data does not come with the original metadata. Below is the code that I developed using the tool of Rodrigo E. Principe

Here is my code.

from geetools import batch
import ee

ee.Initialize()

collection = ee.ImageCollection('NOAA/CDR/AVHRR/LAI_FAPAR/V4').select('LAI')
reference = collection.filterDate('1981-12-31', '1982-12-31')
tasks = batch.ImageCollection.toDrive(reference, 'MyFolder', scale=5000)

How can I download the data in a faster way (if possible) with the original metadata?


texts: Importing vector data into Earth Engine via asset manager

texts:
I am trying to import the shapefile of my country into the Earth Engine asset manager in order to perform some analysis, but I keep getting the error message below on every attempt after the task runs for just a few seconds. How can I possibly solve this?
I earlier imported a previous shapefile and it was ok, though that was from another region of the world. I can display my shapefile in my ArcGIS application and it works well without projection error, so this is baffling and confusing for me.
Error: Projection exception. Ensure the projection is specified correctly and
  the coordinates are within its valid area.
Detailed error: Unable to transform edge (582813.687498, 570842.062498 to
  582813.688795, 570842.063945) from EPSG:4326 PLANAR to EPSG:4326..


texts: Number inputs as raster calculator variables in QGIS Modeler

texts:
How can i use input numbers as variables in any of the raster calculator algorithms in QGIS through the modeler? One very simple example of that would be a model that allows me to divide raster cell values by an input number:

The thing is: none of the raster calculator algorithms lets me pick the number input as a variable. Is that not possible solely through the application's modeler?


texts:
Reading through Rosenberg & Mateos' The Cloud at Your Service I stumbled upon the concept of database sharding.

Authors point out to several advantages of such approach including high (online) availability, faster queries, handling higher user loads and better parallelization (they also warn of potential pitfalls!)

Is sharding used in geospatial world? What are the applications? Advantages? Disatvantages?


texts: I have applied for Earth Engine API access with my gmail account. I have not received the "welcome to Earth Engine " access email, hence I am unable to access the Earth Engine API for development. I am a software developer but currently I do not have an affiliation (self-employed). Is Earth engine only for affiliated users?


texts: Offset the extent of a map projection in QGIS

texts:
I got this dataset from Natural Earth which contains every country on Earth as a shapefile. When I load it into QGIS, the easternmost part of Russia is cut and find itself west of Alaska, and I would like to offset the extent of the map so that no country is cut.
I assumed this was because the extent of the map projection is [-90,-180,90,180], and the land masses are getting cut at 180°. I thus tried to change it to [-90,-185,90,175] through a custom projection in Settings -> Custom Projections. I copy/pasted the Winkel_I WKT data from Properties -> CRS, and modified the extent to BBOX[-90,-185,90,175]],, but I couldn't get it to validate, probably because it was to similar to Winkel I. I also couldn't find a way to create a custom CRS with custom extent on the wiki.
While switching between different project and layer CRS, I ended up with this set of two horizontal abominations, which happened in Russia and New Zealand, where the shapefile crossed the extent of the map. I really don't know how this has happened and was not able to reproduce it after reloading the file. I found two similar (first one, second one) questions, but none of them provided a satisfactory answer.
My questions are:

how do I prevent Russia from being cut in the east? Was I right to assume it was caused by the map extent?
why did the strips appear in the image?


texts:
I am using QGIS 1.7.3 on  Mac and when I try to use the tool "join" in the properties toolbox, I have no possibility to add a name for either the file or the field used to join tables.

Has anyone encountered this problem and solved it ???


texts: How to get a multiline labeling if it is too long to fit? (QGIS 2.14)

texts:
How do I get multiline labels if the text is too large to fit in the length of one line (street).

I know "wrap on character", but I need an automatic way to do it.

Update:

More details
After trying the @CarlosLópezQuintanilla sugestion and fail:

Analysing the problem again.

Maybe using a variable?

Perhaps here in Rule Properties > "Filter", using some kind of filter?

or in another place...

Lets think, the fluxogram should be something like:

Measure the lenght of line.
Measure the lenght of the text string (not by charaters, but by mm)
Compares the lenght of the text string with lenght of the line (road).
If the lenght of "line" is equal or less than the lenght of "text" label it with "normal" BUT If the lenght of "line" is greater than the lenght of "text" label it with "multiple lines".

Is conditional or variable. But how?


texts: Is it possible to take automatically a "screenshot" of my selected feature in QGIS using Python?

texts:
I am implementing a tool which allows the user to create a profile of a feature (in my case urban parcels). Is it possible to automatically take a screenshot of this feature (displayed in a QGIS window) and to display it in the PDF profile?

The picture should only show the extent of the feature and maybe a WMS-layer that lies beyond the feature. Are there already some tools which you could suggest?


texts: GeoDjango - faster way to use polygon.crosses?

texts:
I have a polygon and a line segment. I want to know if the line segment is both inside and outsize the polygon.  Using "prepared" has helped but it's still no where near fast enough.  how can i speed up this process? I really want to use geoDjango but I'm all ears if there is something else out there (still in python).

myPolygon = Polygon(....)
myPreparedPolygon = myPolygon.prepared
myPreparedPolygon.crosses(lineAB)

:::EDIT::: I'm using "myPreparedPolygon.crosses(line)" because it's a prepared polygon.  Using "line.crossed(myPreparedPolygon)" with not work.


texts: Saving selected features by default in QGIS?

texts: Is it possible in QGIS (2.14 or higher) to check by default "Save only selected features" when saving a layer and when features are selected ?


texts: Perform closest facility analysis with Euclidean distance (without network analyst)

texts: Is there anyway to use the closest facility analysis tool from Network analyst without actually having a network (streets) layer which means without using the network analyst? Because I want to find out the distances from each point to every other point based on straight line Euclidean distances.


texts: ArcGIS Server account is a local user, does it exist outside the local machine?

texts: I'm working with an ArcGIS Server that was configured as a local account (as opposed to a domain user).  I am attempting to register a non-local (on the shared drive) data source with the server and grant the ArcGIS Server account user permissions to read the data.  I realize there is a work around that involves creating an identical local user account (same name and password)on the machine with the data source or to run the utility that allows me to change the ArcGIS server account.  My question is simply, does the Arcgis Server local account not exist outside of the local environment?


texts: My 3D map view in QGIS goes blank when I try to drape over a DEM raster.  All the data appears fine in the "Flat terrain" view but the desktop goes white when I change the Terrain Type to DEM.  And yes all the data exactly overlays and is valid etc.  There appears to be some postings of the error on a site that will not load but that is all I have found on the subject.


texts: Robust importing of shapefile into spatialite database?

texts:
I am trying to import shapefiles into a spatialite database using spatialite-gui.

I am having problems with the types of the variables since spatialite-gui has no obvious way to handle shapes which use "," as decimal separator, and mangles my date fields which are in YYYY/MM/DD format.

QGIS 1.7.4 imports the same shapefiles without any issues, handling all the conversions transparently, but will not let me save to a Spatialite database.

Is there a more robust way of importing a shapefile into Spatialite?


texts: ArcGIS Desktop 9.3 conflict with Internet Explorer on Windows XP?

texts:
I have been told that ArcGIS Desktop 9.3 will not function on a Windows XP computer if its got Internet Explorer newer than version 6.

Is this true?

Seems like a huge security hole if you can only have IE 6 on your computer.

If so, how can this be fixed?


texts: Export a DEM from GRASS and import it to ArcMap

texts:
I've been asked to export a raster map DEM as an ESRI ASCII grid file from GRASS and import it into ArcGIS. The issue is once I add this file to ArcMap I do not know how to view DEM as I just have a data layer with an attribute table. I tried the add XY data tool but the subsequent box only allowed me to add the y data in both columns and then led to an error. How can I display the data in this file?

I also tried ASCII to Raster and got the following error message:

ERROR010067: Error in executing grid expression