texts: IQueryFilter where Clause quering two feature class at a time

texts:
I need to query two feature class at the same time using IQueryFIlter.

For eg -

FeatureClass -- A has field OBJECTID

FeatureClass -- B has field OBJECTID

what i am tring to do is --

IQueryFilter iqf = new QueryFilter();
iqf .setWhereClause(B+".OBJECTID = "+A+".OBJECTID");
IFeatureCursor resultCursor = B.search(iqf, false);

Is this possible , if yes what is the correct methord because currently i am facing error--

  "Too few parameters. Expected 1"

Might its not taking A.OBJECTID properly ////


texts: How to 'trace' areas from the layer below?

texts:
I have some Ordnance Survey vector data for my local area. I want to create a new layer and on it 'trace' some of the areas, fields, verges etc from the layer below with the intention of then colouring the areas I have traced. I am sure I saw a tutorial or instructions for this somewhere but can no longer find it.

Using QGIS Lisboa.


texts: ArcMap 10.2 Viewshed vs ArcPy Viewshed results in different Rasters

texts:
I recently wrote a Python script that uses Esri's viewshed (arcpy.sa.Viewshed) and it seemed to work fine until I compared the output (area size) to what ArcMap's Viewshed_sa itself (which seems to point to arcpy.gp.Viewshed_sa instead) gives me and I was shocked by the difference of the total area.

e.g. a Viewshed clipped to a buffer of 10km gives me a visible area of 2,119,389 square meters in my script but executed with the !SAME! params gives me 1,898,640 square meters

Please see the screenshot for a clearer explanation.
Green is the resulting area that is shared by arcmap itself and the script execution.
Yellow is the area that is only part of the script's result.
Blue is the area that is only part of arcmap's result.

Now I tried a few things to get both results a bit closer together (e.g. if I completely remove the extent for the viewshed execution in my script it gets a little bit better, but it's still off by a few percent)
I even harvested all environment settings from my ArcMap instance and fed them to my script. It, sadly, didn't change a thing and results are still off by ~10%

(the Python console output does not compare standalone script to ArcMap)

Edit 1 (ad. Fezter's comment):

The projected coordinate system is called 'BMN M31'
Calculation of the total area is done by a searchcursor (I also compared the area through the statistics function within the toc)
All the environment settings of the script are the same as in the application (I literally copied them over)
The results here are rasters directly resulted from the viewshed function, later on I tend to create polys - but the problem is already there, in the rasters itself (I edited the title from polys to rasters through)
As for the function calls there is really nothing fancy going on: It's a simple arcpy.sa.Viewshed (script-wise) and a Viewshed call through the toolbox' tool in arcmap. The call looks like this:
arcpy.sa.Viewshed(dom, single_pnt, z_factor="1", curvature_correction="CURVED_EARTH", refractivity_coefficient="0.13")


texts: How to draw a rectangle on a Leaflet map from GeoJSON data

texts:
I am trying to draw a rectangle on a Leaflet map with JSON data which looks like this.

    var geojsonfeatures = {"type":"FeatureCollection","features":[
    {"type":"Feature",
        "geometry":{"type":"Polygon",
                    "coordinates":"[[354,844],[425,933]]"},
        "properties":{"name":"area1"}
    }
    ]};

The coordinates need to be transformed which if it was a Point could be done like this:

    coordsToLatLng: function (newcoords) {
    return (map.unproject([newcoords[0], newcoords[1]], map.getMaxZoom()));
            }

I am lost as to how to do this for an array of Points.  coordsToLatLngs look like it would be the right one but not sure how to use it.  Or is it geometryToLayer?


texts:
I am trying to add the following WMS to QGIS:

https://land.copernicus.eu/pan-european/high-resolution-image-mosaic/very-high-resolution/vhr-2012

It is published by ArcGIS for Server and here is the URL:

https://copernicus.discomap.eea.europa.eu/arcgis/rest/services/GioLand/VeryHighResolution2012/MapServer

Adding it to ArcGIS as an ArcGIS Server or a WMS Server works perfectly fine.

However, I am unable to connect to it in QGIS (2 + 3).

I've tried loading it with the buttons Add WMS/WMTS Layer and Add ArcGIS MapServer Layer, but keep getting the following error:


texts: Is it possible to download the OpenRailwayMap tiles?

texts:
I'd like to do an experimental visualization with OpenRailwayMap tiles, however they take long to load from the official server using leaflet. I was thinking about downloading all the tiles I need, but since the server is slow, I would think of it as "bad attitude" to bomb it with requests until I have all the tiles; and if I wait after each tile, it would take forever.
Is there any way to download all the tiles I need en block from somewhere?
As an alternative, I could render them for myself, but all the documentation I found on rendering OSM data describes how to set up live-rendering servers (which I do not need), and, more important, I do not know the OpenRailwayMap render settings.


texts: How to add item to an existing selection layer

texts:
I have a selection layer of about 150 properties in ArcGIS ArcMap, and I want to add one more building to it (see image, area outlined in red circle). The problem is that I missed this building in particular when I clicked to add all the buildings one-by-one originally.

When I click on it using the Selection Interactive tool to add it to the selection, I can't seem to make it a part of the existing selection layer called "LargeBuilding selection" (nor can I change its color to green).

I am relatively new to ArcGIS.


texts: How to use Record Set to prepopulate table in ModelBuilder?

texts:
I'm running ArcGIS 10.2.1. and am trying to prepopulate a record set in model builder. The record set is set as a Modeled Parameter.

I open the record set enter the information into the table and hit "apply" then hit "OK."

However when I open it again, all the information that was previously enter is gone. The  model tool dialog box also shows that there is no information in my record set. What can be done to rectify this?? I need to prepopulate this table but still have it be easily editable from the tool dialog box. This should be working but it isn't.


texts: MMQGIS Animate Sequence Index Error: list index out of range

texts:
I am trying to use Animate Sequence in MMQGIS on two layers together that are practically identical (the only differences being the icon svg and icon's offset from the point). Animate sequence works perfectly on each individual layer, but whenever I select both I get a python error and one becomes edited in a way that it disappears from the map (dependent on which layer I select first).
My error is copied below:
An error has occurred while executing Python code:
IndexError: list index out of range
Traceback (most recent call last):
  File "C:/Users/marias/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\mmqgis\mmqgis_dialogs.py", line 446, in run
    frame_directory, self.mmqgis_status_callback)
  File "C:/Users/marias/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\mmqgis\mmqgis_library.py", line 323, in mmqgis_animate_sequence
    geometries[layer_index].append(QgsGeometry(feature.geometry()))
IndexError: list index out of range

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
QGIS version: 3.8.2-Zanzibar Zanzibar, 4470baa1a3
Python Path:
•   C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python
•   C:/Users/marias/AppData/Roaming/QGIS/QGIS3\profiles\default/python
•   C:/Users/marias/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
•   C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python/plugins
•   C:\ArcGIS\Desktop10.7\ArcToolbox\Toolboxes\USGS_EGISTools\scripts
•   C:\Program Files\QGIS 3.8\bin\python37.zip
•   C:\PROGRA~1\QGIS3~1.8\apps\Python37\DLLs
•   C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib
•   C:\Program Files\QGIS 3.8\bin
•   C:\PROGRA~1\QGIS3~1.8\apps\Python37
•   C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\site-packages
•   C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\site-packages\win32
•   C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\site-packages\win32\lib
•   C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\site-packages\Pythonwin
•   C:/Users/marias/AppData/Roaming/QGIS/QGIS3\profiles\default/python
•   C:\Users\marias\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\mmqgis/forms
S:/Arias/StoryMap/Story map gis/Sondra chase track


texts:
I have some waypoint locations that I have entered into a spread sheet in Nad83 the format of table looks like this

NAME, -, -, UTM ZONE, Easting, Northing, -, Comment

1184236, 1, CP, 15, 451596, 5664617, 20, No post

["-"'s  Are information only needed in the spreadsheet]
 I have to get these coordinates into some software that will let me export the points as .GPX. I use to do this using a wizard in mapinfo but I no longer have the software. Basically I'm looking for something that will let me define the coordinates as NAD83 and let me select which columns are to be used for Name/Zone/Easting/Nothing.


texts:
We would like to offer a small exhibition about GIS but have very little time to prepare. As a GIS coordinator I would probably make this much too complicated for the general public who know very little about what the job of a GIS analyst actually entails. Also the subjects that I find interesting such as topologies and coordinate systems and FME Transformations will be utterly boring for anyone not intimately involved in GIS.

Has anyone done a similar kind of GIS Exhibition for the general public?

What advice would you offer regarding themes, content and presentation?

I thought about offering a few PCs to zoom in onto houses in high resolution but most people do this in Google Maps every day.


texts: pgRouting TSP: is it possible to apply to the roads network?

texts:
I want to solve a TSP problem on a set of points from a road network (given N points, find the shortest possible route to visit them all). It seems that pgrouting pgr_tsp function doesn't take into account roads existence - it simply estimates Euclidian distance between the points, so it's like walking by a straight line.

Is there a way to achive what I want with pgrouting? I saw something like tsp_dijkstra function in the old release, but, it's now removed and I cannot find a documentation for it.

Or maybe there're other tools (not pgrouting)?

Thanks.


texts: Access Shapefiles from PostgreSQL/Postgis in R

texts:
I successfully setup a connection to my PostgreSQL/PostGIS database on Ubuntu Server from my Laptop (Ubuntu 12.04).

Therefore I installed RODBC in R to setup a connection and I made a correct entry in the /etc/odbc.ini file to setup the DSN as described for example here. Now I'm able to connect to my database with

ch<-odbcConnect("database")

After connecting, I'm am able query all the tables inside the database with SQL queries and even use the spatial functionalities of PostGIS inside the db.

Now I would like to work with the spatial data inside R so I downloaded the RGDAL package. The driver for PostGIS should be automatically included in Unixbased systems so I execute

ogrDrivers()

to check this. It gives me back that PostgreSQL = TRUE so I assume this includes the PostGIS driver?! Otherwise it isn't listed.

Now, in theory I should be able to read-in a layer like this:

test<-readOGR(ch,"state")

but unfortunately I gives back:

Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv) : Cannot open file

So did I miss anything? What can I do to make it work?


texts: OGR2OGR workaround for gpx-json conversion bug

texts:
ogr2ogr produces invalid GeoJSON when multiple layers are involved (http://trac.osgeo.org/gdal/ticket/3842). For example:

ogr2ogr -f GeoJSON "$f.json" "$f" tracks routes

For me the bad GeoJSON seems to be a missing "] }" at the end of the file, but I don't know if that's consistent.

I'm trying to batch convert a number of GPX files. Some have tracks, some have routes; none have both. Is there a workaround that will work on both types?


texts: Tiling large single GeoTIFF raster into smaller GeoTIFF tiles?

texts:
I have traditionally used proprietary software tools for tiling raster datasets but I am keen to explore the open source solutions as well.

Are there any open source solutions that can easily tile a GeoTIFF into smaller GeoTIFF (not png or jpg tiles) where you can set the dimensions yourself?

From what I have seen in QGIS, GDAL this is not as flexible as I hoped whilst Saga shows some promise.


texts: What Methods are out there for Dynamic Location Referencing?

texts:
I'm looking for (industry) standards and implementations to solve the problem of dynamic location referencing (communication of location between systems which have dissimilar maps).

I would like to communicate information from one system using a map from vendor A to another system using a map from vendor B. It's not possible to exchange the maps.

The only thing I've been able to find were:

OpenLR™ by TomTom which is open source (but doesn't seem to have an active community), and
AGORA-C a non-free ISO standard

Do you know any other standards/methods to approach this problem? What's your experience with them?


texts: How to randomly select three points in each polygon?

texts:
I have two layers: first layer includes polygons of districts, second layer containts points (phytocoenological relevées).

The goal is to create a new layer that will contain max 3 randomly selected phytocoenological relevées belonging to one district area (now, particular district contain 0-16 relevées).

I went through all QGIS vector selection tools but was not successfull in it..


texts: How to reference shapefile in folder for input to ArcGIS Copy Features python function?

texts:
I am trying to write a python script that would allow me to download data and copy it to a file geodatabase.  The script currently downloads and extracts a zip folder from a FTP site.  Ideally I would like my script to then copy the extracted shapefile into a geodatabase.  The workspace in which the data is extracted remains constant. Where as the name of the data that is downloaded and extracted is variable.  How can I reference the downloaded data regardless of its name for the input argument of the CopyFeature tool?

arcpy.env.workspace = r'C:\Users\Desktop\ExtractedData'

arcpy.CopyFeatures_management( downloaded shapefile, 'C:\Users\Desktop\Test.gdb')


texts: Saving Style as SLD in QGIS but after reloading unit changes from map units to pixel?

texts:
I have a style I am saving in QGIS (2.18) as an SLD.
After reloading the Style onto the layer the ouline width changes to pixels instead of map units.

I even checked the .sld in notepad and the uom-Tag is there.
(uom="http://www.opengeospatial.org/se/units/metre">)

Any ideas?


texts: Converting single line into polygon plane in QGIS?

texts:
Is there a way to convert a line or multiple lines into polygon?

I have a feature attribute as with, and the line represents the road.
I want to convert every route into a polygon plane that somewhat looks like a road.

I think if line turns, then polygon will look disconnected. How to fix it, if possible?


texts: Examining spatial and temporal correlation between points and polygons

texts:
I have 2 kinds of events I want to examine correlation between, lightning strikes and earthquake events. The lightning strikes are defined by lat lon points and a timestamp, whereas I have represented the earthquakes with buffers of variable radius(corresponding to earthquake magnitude) around an epicentre. I am interested in the time just before a quake happens, and whether seismic processes effect lightning activity. A graphic of my data is included below, where colour gradients represent times.

I feel like the Space Time Pattern Mining toolbox would do what I need, but I only have access to ArcGIS for desktop 10.2.2.

I am able to code stuff in python if needs be but Im not sure where to start.


texts:
How to add labels above lines using OpenLayers?

Labels are added as follows:

    var styleMarkersLabels = new OpenLayers.Style( // стили для надписей узлов
                {
                    strokeWidth: 2,
                    labelYOffset: 10,
                    label: "${label}",
                    fontColor: 'red',
                    fontSize: 9,
                    fontWeight: "bold",
                    labelOutlineColor: "black",
                    labelOutlineWidth: 1
                });
            var vectorPoint = new OpenLayers.Layer.Vector("Узлы (надписи)",
            {
                styleMap: new OpenLayers.StyleMap(
                { "default": styleMarkersLabels,

                "select": { pointRadius: 20}
                })
            });
            map.addLayer(vectorPoint);

            function addPoint(lon, lat, title, ident, layr){
                var ttt = new OpenLayers.LonLat(parseFloat(lon), parseFloat(lat));
                ttt.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));
                for (var k = 0; k < layr.features.length; k++) {
if(layr.features[k].attributes.PointId==ident) {
                        layr.features[k].move(ttt);
                        layr.features[k].attributes.label=title;
                        return false;
                    }
                }
                var point0 = new OpenLayers.Geometry.Point(parseFloat(lon), parseFloat(lat));
                point0.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));
                layr.addFeatures(new OpenLayers.Feature.Vector(point0, { label: title, name: title, PointId: ident }));
            }

            var lat2, lon2, title, ident;
            for (l = 0; l < nodesLabels_Count; l++) {
                lat2 = nodesLabels_arr[l]["points"][0]["lat"];
                lon2 = nodesLabels_arr[l]["points"][0]["lon"];
                title = nodesLabels_arr[l]["title"];
                ident = nodesLabels_arr[l]["ident"];
                addPoint(lon2, lat2, title, ident, map.layers[4]);
            }

But I got it:

Map here: http://softez.pp.ua/fiberms/fiberms/map.php


texts: Creating OGR FDW to Teradata ODBC from PostgreSQL?

texts:
In my PostgreSQL/PostGIS I need to create FDW to an instance of Teradata Database. My aim is to get attributic-nonspatial data from the Teradata. I opted to use OGR_FDW instead of ODBC_FDW as this article recommends OGR_FDW as the performance is generally better, and the fact that I am using PostGIS in my PostgreSQL DB.

In order to create the FDW with OGR_FDW I have to do several steps that include CREATE SERVER, CREATE USER MAPPING, and IMPORT FOREIGN SCHEMA. Unfortunately I can not find example specifically for Teradata ODBC. I need to now what are the accepted OPTIONS values for Teradata ODBC.

So then I read several reference: (1) by Paul Ramsey and (2)  by Leo Hsu & Regina  Obe .

The one from Paul Ramsey states that we can use command ogr_fdw_info to generate server and table definition, but I do not understand what is the datasource used in the  ogr_fdw_info call?

I have the config for the Teradata in my PostgreSQL server. As the PostgreSQL server is with Windows Server i made it in the ODBC Data Source Administrator 64-bit, as system Data Sources:

And subsequent connection test was a success:

However, when I tried to use this tdprod in the ogr_fdw_info call, but the ogr_fdw_info does not recognize it:

I tried to create th remote server anyway, but failed:

Can anyone :

show me how to issue ogr_fdw_info with my Teradata ODBC so i can get the CREATE SERVER scripts? or
point me to example of setting up OGR_FDW to Teradata ODBC?

My environment is:

PostgreSQL 9.6.1 64-bit & PostGIS 2.3.3
Windows Server 2016 Standard, 64-bit
Remote datasource: Teradata Database version 16.00.00.14
Teradata ODBC Driver 16.20 64-bit


texts: PyQT: QFileDialog keeps on opening window after clicking on cancel or ok

texts:
I use to write QGis plugins, which is based on PyQT.
I use to create QButtons and connect their click to a function that itself calls a QFileDialog.

For example:

def doOpenFile(self):
        fname = QFileDialog.getOpenFileName(self.dlg, self.tr("Open input file") )
        if fname:
            self.dlg.editInFile.setText(fname)

    # ____________
    def doInitGUI(self):
        # connect buttons
        self.dlg.buttonInFile.clicked.connect( self.doOpenFile )

So: I click on a button, which triggers a QFileDialog interface.
Quite ofter (but not always, and I could not define the conditions), the QFileDialog will re-open itself after clicking on "OK" or "Cancel". It requires me to cancel several times to stop the QFileDialog re-opening.
I suppose that the click event is thrown several times, is it correct?
How can I solve this behavior?


texts: How to identify data frame which scale bar corresponds to in ArcMap?

texts: I need help to identify the data frame (from several data frames) that corresponds to a scale bar in ArcMap?


texts:
I have a set of historic drawings which show a local site grid.  I'd like to setup a custom CRS for this grid in QGIS so i can convert layers to/from this grid and MGA94 Zone 56 (EPSG:28356).
Presumably the drawing is shown with north to the top of the page, but after georeferencing it's rotated approx 9.4 deg clockwise.
I've read some grid intersections points from the drawing
Point 1:
local xy = 7950, 1000
MGA94 Zone 56 = 383276.37, 6359888.50
Point 2:
local xy = 7650, 850
MGA94 Zone 56 = 382941.47, 6359791.40
Point 3:
Local xy = 7850, 850
MGA94 Zone 56 = 383155.14, 6359756.31
I've spent the day trying to wrap my head around:

Reprojecting local CRS using PROJ
WKT for local mine grid and
Define custom CRS in WKT from point and angle

but can't make anything work.  Can anyone help me out?


texts: Banding appears when reprojecting shapefiles using R?

texts:
I have downloaded a shape file (Marine Ecoregions (last one on the page)) from the nature conservancy http://maps.tnc.org/gis_data.html

I am then using R and the sf package to project this shapefile. If I plot this map on NAD83, WGS84 etc., the map looks good. If I project it to Eckert4, Lambert Azithmuthal, or Mollweide I get banding across the map.

Any idea why this happens?

Here is some reproducible code:

You will need to download the shapefile from the link above and add them to same folder as the function below

# set chooseProjection to one of the following" "WGS84","Eckert4","molli","lambertaz"
project_maps <- function(chooseProjection) {

  projection <- switch(chooseProjection,
                       "WGS84" = "+init=epsg:4326 +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0",
                       "NAD83" = "+init=epsg:4269 +proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs +towgs84=0,0,0",
                       "NAD27" = "+init=epsg:4267 +proj=longlat +ellps=clrk66 +datum=NAD27 +no_defs +nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",
                       "Eckert4" = "+proj=eck4",
                       "molli" = "+proj=moll",
                       "tranmerc"= "+proj=tmerc",
                       "lambertaz"="+proj=laea +x_0=0 +y_0=0 +lon_0=0 +lat_0=0")
  MEco <- sf::st_read(dsn=here::here(),layer="meow_ecos",quiet=T)
  MEco <- sf::st_transform(MEco,crs=projection)

  # plot ecoregion
  plotMEco <- ggplot2::ggplot() +
    ggplot2::geom_sf(data = MEco, ggplot2::aes(fill = ECOREGION)) +
    ggplot2::theme(legend.position = "none") +
    ggplot2::ggtitle("Marine Ecoregions")
  print(plotMEco)
}

Sample figures:

If i crop the bounding box using

MEco <- sf::st_crop(MEco,c(ymin = -89.99, ymax = 89.99, xmin=-179.99, xmax=179.99))

Then the Eckert4 projection displays just fine. However the Lambert Azithmuthal is still strange.


texts: Which one must be the result of st_difference of polygons? st_touches true or st_intersects true?

texts:
I've two tables of polygons, one has 1282 polygons, other has one big polygon. I use st_difference to have polygons that are not part of the bigger one. After st_difference i tried st_touches on result table and one polygon table. Results were all false. On the other hand st_intersects gives some trues what I expected from st_touches function.

Why is that st_difference function works that way? Are there anything that fits my expectation on that function?


texts: Retrieving start and end points for each line in line shapefile in ArcGIS Desktop or QGIS?

texts:
I have a vector(polyline) shapefile and I need to retrieve each line´s  start and end points(nodes) and create a shapefile with these points. Then I need to add to the polyline´s attribute table the start and end point for each line based in the points ID.

How could I do that in a simple way in ArcGIS Desktop or QGIS?


texts: Is it possible to setup ArcGIS Online edits to post to ArcGIS Server?

texts: I've got ArcGIS Online setup and have all relevant layers on ArcGIS Server shared out as map services and added to ArcGIS Online. But what I'd like to find out is if they can then be edited in Online and those changes would reflect in Server.


texts: Opening GeoServer Admin returns HTTP ERROR: 503?

texts:
I try to open Geoserver Admin and returns the following error.

  HTTP ERROR: 503

  Problem accessing /geoserver/web/. Reason:

  Service Unavailable

What is causing this?


texts:
I need to make a map using equidistant cylindrical projection with normal
orientation. But I'm getting confused - I've tried 2 projections -

WGS_1984_Plate_Carree
WKID: 32662 Authority: EPSG

Projection: Plate_Carree
False_Easting: 0,0
False_Northing: 0,0
Central_Meridian: 0,0
Linear Unit: Meter (1,0)

And

 World_Equidistant_Cylindrical
WKID: 54002 Authority: ESRI

Projection: Equidistant_Cylindrical
False_Easting: 0,0
False_Northing: 0,0
Central_Meridian: 0,0
Standard_Parallel_1: 60,0
Linear Unit: Meter (1,0)

Both look completely different. Is that because of "standard parallel", which 2nd projection has? Is 1st projection the right one or should I use something else?


texts:
My goal is to grab a bunch of feature classes, select the first feature class, list the fields, and return that list to parameter 1 as a filtered list.

My ArcGIS toolbox is setup with 2 parameters.

The first parameter is a multivalue featureclass

The second parameter is a string with filter set to: "Value List" which is empty. I'm hoping to populate this. When I run the following code:

def updateParameters(self):

    if self.params[0].value: #when user inputs feature classe(s)

      fcs = self.params[0].value.value # getting list of fcs as string?

      spl = fcs.split(";") #splitting list of fcs

      fields = arcpy.ListFields(spl[0]) #getting list of fields from 1st featureclass

      self.params[1].filter.list = fields #return list of fields to param 1

When I input the fcs into param 0, I get this error:

ERROR
updateParameters Execution Error: Runtime error : 'ValueTable' object has no attribute 'value'


texts: organizing attribute table: multiple sets of variables per point

texts:
I would like to have hints on the best way to organize my dataset (I am working with ArcGIS 10.1, advanced license). I would like to build a points layer, each point being a weather station in the study area. For each weather station, I wish to store some data, consisting in the winds speed, average direction, air temperature, and the like.
My main issue is that each set of variables is repeated for each month of the year. I am not managing to get my head around the best way to arrange the attribute table. May be I should only build a layer of points with the attribute table storing only the station name, and a sub-table with further data....
But I would like to have feedbacks on this, and possibly practical examples (i.e., URLs) of a good strategy to tackle the issue.


texts: Errors when filling/replacing NoData values with Raster Calculator FocalStatistics

texts:
I have the following raster, which has many NoData values. Only the NoData values that are in the ocean need to be filled.

I made a seperate raster with all the NoData cells that are in the ocean. I am trying to apply this method: https://support.esri.com/en/technical-article/000004792 to fill them.

To do this, I wrote the following code in the Raster Calculator:

Con(IsNull("%GapsToFill%"), FocalStatistics("%OceanSalinity%", NbrRectangle(10,10, "CELL"), "MEAN"), "%OceanSalinity%")

However, I keep getting the following error message. Does anyone know why this error occurs?

ERROR 000539: Error running expression: rcexec()
Traceback (most recent call last):
  File "<expression>", line 1, in <module>
  File "<string>", line 5, in rcexec
  File "c:\program files (x86)\arcgis\desktop10.6\arcpy\arcpy\sa\Functions.py", line 5375, in FocalStatistics
    ignore_nodata)
  File "c:\program files (x86)\arcgis\desktop10.6\arcpy\arcpy\sa\Utils.py", line 53, in swapper
    result = wrapper(*args, **kwargs)
  File "c:\program files (x86)\arcgis\desktop10.6\arcpy\arcpy\sa\Functions.py", line 5369, in Wrapper
    ignore_nodata)
  File "c:\program files (x86)\arcgis\desktop10.6\arcpy\arcpy\geoprocessing\_base.py", line 510, in <lambda>
    return lambda *args: val(*gp_fixargs(args, True))
ExecuteError: ERROR 000875: Output raster: Z:\WUR\GasDrive_Thesis\ArcGIS\Application\IA_GasDrive_Step.gdb\FocalSt_ps_a2_S1.tif's workspace is an invalid output workspace.
ERROR 000581: Invalid parameters.
Failed to execute (FocalStatistics).

Failed to execute (Raster Calculator (2)).

I also tried to skip the GapsToFill raster and just use the following code, which gives exactly the same error message

Con(IsNull("%OceanSalinity%"), FocalStatistics("%OceanSalinity%", NbrRectangle(10,10, "CELL"), "MEAN"), "%OceanSalinity%")


texts: Georeference Plug-in not Opening in QGIS?

texts: for some reason georeference plug in will not open. I click on it and nothing happens. I have never had any issues with it before. I have also just installed version 2.6.0 to see if that solves issue but it doesn't.


texts: How to use the Maplex abbreviation dictionary only if space is not available for the full label?

texts:
Maplex has a nice feature which can abbreviate labels based on a dictionary that you configure. eg, replace STREET with ST.

However, it seems to be an all-or-nothing setting, with Maplex always replacing the words in the dictionary, even when the abbreviation is not necessary.

In the case below, Maplex has abbreviated STREET even though the word would easily fit in all cases:

In these examples, I want SKITTLE LN and TEMPERANCE LN to be abbreviated, but not the STREET names.

Edit:

According to the Help File entry mentioned by ChrisW:

  the Maplex Label Engine first attempts to place the full text of the
  label, then abbreviates any words found in the dictionary for labels
  that could not be placed.

Why then is Maplex abbreviating the word STREET in these examples below?

I've simplified the options so that the only Fitting Strategy used is Abbreviation Dictionary. The style is Centered Straight with Regular placement. Using a line featureclass in an fGDB. The selected line is a single feature, so it's clear there is ample room for the full label. There are no other layers drawn.

It sure looks like a bug to me....


texts: Perpendicular Distance Markers on Polyline in MapInfo?

texts:
I have added chainage to a creek polyline in MapInfo v11.0.3 using the 1999 version of "Distance Marker" by Meridian.

It looks poor as it does not have the functionality to create the markers perpendicular to the winding creek.

Any other tools I can try?


texts: Getting number of tables loaded with integrated mapping

texts:
I am integrating a MapInfo map into a form in an Access database. I am trying to find out the number of tables loaded but NumTables() and MapperInfo() are both getting "unrecognized command" errors.

Is there another way to get the number of tables?


texts: URL too long for adding WFS? How to make a shortcut?

texts:
I'm trying to get a public WFS into my QGIS Desktop (2.18.13) on Windows, so I tried adding an ArcGIS-FeatureServer-Layer and get the prompt:

  Couldn't load service properties: :

I noticed, that QGIS is cutting off the URL I'm trying to use:

http://geodienste-umwelt.hessen.de/arcgis/services/inspire/gewaessernetz/MapServer/WFSServer?&request=GetCapabilities&VERSION=1.1.0&SERVICE=WFS

is cut off to:

http://geodienste-umwelt.hessen.de/arcgis/services/inspire/gewaessernetz/MapServer/WFSServer?VERSION=1.1.0&

If I paste the URL in my Browser, it seems okay, but:

Is QGIS really cutting off URLs?
Is there a way to shorten the URL? (I'm thinking of my Windows Host file or a similar solution)


texts: Calculating the geographical distance between two points (especially Gnomonic)

texts:
I tried to get geographical distance between two points by using spherical trigonometry, Mercator and Gnomonic projection.

The detail of 2 points

point A ( 15º 55’ S, 5º 44’ W) , B( 32º 19’ N, 64º 51’ W)

As a result, I got 8262.132km in trigonometry, 8631.378 in Mercator.

But I couldn't understand why the result in Gnomonic is different depending on chosen origin.

Used formula from http://www-history.mcs.st-and.ac.uk/Projects/Hoyer/S3.html

For example, I set (0,0) and (0, 30º W), and difference is more than 6000km!

We know Gnomonic can show the shortest path, but I don't know why the actual calculation is not correct..

How can I calculate geographical distance by Gnomonic well?


texts: Counting Features to Calculate Field Value

texts:
Generally, I am trying to find the # of features in one shapefile within 1000 feet of EACH feature in a second shapefile - and then populate a field in the first shapefile with that #.

More specifically, I trying to get a count of features in one shapefile (call it Practice_Stops.shp) that lie within a certain proximity (1000 feet) of EACH feature in a second shapefile (called Practice_Stops1.shp).  I also want to restrict the count of features to only include those that also occurred within a certain time period, determined by the date attached to the feature in Practice_Sales1.shp.

I think this script is pretty close, but I have messed up some syntax and I don't know where:

Import arcpy module

Practice_Sales1 = "Practice_Sales1"
Practice_Stops = "Practice_Stops"
I_Practice_Sales1_FID = "I_Practice_Sales1_FID"

cursor = arcpy.SearchCursor("Y:\\mfriedma\\Practice_Sales1.shp", "")

#Iterate through the rows in the cursor for row in cursor:

#Select all features in Practice_Stops within 1000 feet of the current row in Practice_Sales1

arcpy.SelectLayerByLocation_management(Practice_Stops, "WITHIN_A_DISTANCE", row.POINT_X, row.POINT_Y, "1000 Feet", "NEW_SELECTION", "NOT_INVERT")

#Within selected features, further select only those features that occurred within >365 days of the current row in Practice_Sales1

arcpy.SelectLayerByAttribute_management("lyr", "SUBSET_SELECTION", ' "stopdateindex" >=< row.getValue(saledateinndex) AND "stopdateindex" > (row.getValue(saledateinndex)- >365) ')

#Returns the # of selected features
    count = int(arcpy.GetCount_management(Practice_Stops).getOutput(0))

#Replace row value in COUNT field of Practice_Sales1 with
    row.setValue("COUNT", count)

    row = rows.next()

Using model builder I have come up with the following:

The idea is that I go row by row in the Practice_Sales1.shp file, where the Iterate Row Selection tool conditions on date and location so as to select every row in the table.  For each row, I use the Select Layer By Location tool to compare the Sale location to features in the Practice_Stops.shp file and select those within 1000 feet.  This selection is then input for the Select Layer By Attribute tool, which refines the selection to only include features from the Practice_Stops file that occurred within a certain time proximity from "Value (2)" - the date field in each row of the Practice_Sales(1).shp file.  Finally, I want to count all the features and populate a field in the row currently being iterated from the Practice.Sales.shp file.  The problem I have is that the Get Count tool doesn't seem to give me output that I can populate a table field with - how can this be done.


texts: Calc vs. Overlay for speeding up band math in R 'raster' package?

texts: Regarding Speeding up band math in R 'raster' package, would it be the same to use overlay to calculate NDVI instead of calc and, if that is not the case, then what is the hidden advantage of calc with that particular kind of operation?


texts: Calculate distance between consecutive GPS points for each id

texts:
I'm working with ArcMap 10.6. I have a big dataset of GPS points (so my coordinates are in latitude and longitude) with around 800 user ids.

I want to calculate the distance between each GPS point, for each user. I have done a test using one user in Excel, where my VB code looks like:

Public Function getDistance(latitude1, longitude1, latitude2, longitude2)
earth_radius = 6371
Pi = 3.14159265
deg2rad = Pi / 180

dLat = deg2rad * (latitude2 - latitude1)
dLon = deg2rad * (longitude2 - longitude1)

a = Sin(dLat / 2) * Sin(dLat / 2) + Cos(deg2rad * latitude1) * Cos(deg2rad * latitude2) * Sin(dLon / 2) * Sin(dLon / 2)
c = 2 * WorksheetFunction.Asin(Sqr(a))

d = earth_radius * c

getDistance = d

End Function

Then in the cell I just put: =IF(C3=C2;getDistance(D2;E2;D3;E3);"")

This ensures the distance is calculated, providing the user id is the same as in the above row.

I want to translate this to VB script or Python in the Field Calculator in ArcMap because my file with all users combined is too large for Excel (over one million points).

Using Python, I got as far as this in the codeblock:

from math import radians, sin, cos, sqrt, asin

def haversine(lat1, lon1, lat2, lon2):
    R = 6372.8  # Earth radius in kilometers

    dLat = radians(lat2 - lat1)
    dLon = radians(lon2 - lon1)
    lat1 = radians(lat1)
    lat2 = radians(lat2)

    a = sin(dLat / 2)**2 + cos(lat1) * cos(lat2) * sin(dLon / 2)**2
    c = 2 * asin(sqrt(a))

    return R * c

And this underneath:

haversine( !LATITUDE!, !LONGITUDE!, !LATITUDE!, !LONGITUDE!)

So, how can I (1) refer to the row underneath for my second latitude and longitude points, and (2) ensure that it is only done when the user id matches the one above?

I don't know any Python, just some R. I tried trying to select a particular cell using LATITUDE[1,], and tried to put in an IF statement, but so far my attempts have not been successful.


texts:
I have a HDF5 file with a field of radar observations. I'd like to read this data and produce a GeoTiff that contains the spatial metadata. I can access the data, but I can't access the geographical metadata (which I assume it must be inside the file).
The file is one of these that can be freely downloaded here.
The code I have is:
import h5py
filename = 'RAD_NL25_PCP_NA_202103111340.h5'
f = h5py.File(filename, 'r')

data = f['image1']['image_data'][:,:]

This works to get a numpy array with the data. Now, the metadata seems to be in the group f['geographic']['map_projection'] but this seems to be an empty without dataset.
Do you know how to inspect this file to get the metadata, or how to assert that it is really an empty group?


texts: arcpy SearchCursor return a OBJECTID value not as an integer

texts:
I use summary statistics GP tool to extract the max OBJECTID from a feature layer. After that I use arcpy SerachCursor to get the OBJECTID value from the statistics, but the result returned is not an integer.

The statistics contents:

The result of SearchCursor:

The python code:

import arcpy

arcpy.env.workspace = "C:/Users/lyao/Documents/ArcGIS/Default.gdb"
feature = "C:/Users/lyao/Documents/ArcGIS/Default.gdb/BQ_Segment_1_Statistics1"

with arcpy.da.SearchCursor(feature, ("MAX_geri_db_DBO_BQ_Segment_1_OBJECTID",), '"OBJECTID" = 1') as cursor:
for row in cursor:
    print str(row[0])

I want to know:

How to get the exact same OBJECTID as in the statistics.
I am using vb.net, so I want to know how to return the result to vb.net.

I am using arcmap 10.2.


texts: Get CostDistance IGeoDataset as raster in C# ArcObjects

texts:
I have a CostDistanceCode that works correctly. I cannot cast the IGeoDataset result into a raster. The last line returns a null raster. How can I resolve this?

            // Declare the output raster object
            //Note: Adjust the IDistanceOp.CostDistance method options to suit your applications need.
            IDistanceOp distanceOp = new RasterDistanceOpClass();
            object object_missing1 = System.Type.Missing;
            object object_missing2 = System.Type.Missing;

            IFeatureClass in_source_Featuer2 = null;
            ClsGeneral.OpenFeatureClass(cmbSource.SelectedValue.ToString(), cmbSource.Text, out in_source_Featuer2);

            IRaster backlinkraster = new Raster();
            IGeoDataset g1 = in_source_Featuer2 as IGeoDataset;
            IGeoDataset g2 = rasOut as IGeoDataset;

            IGeoDataset geoDataset_output = distanceOp.CostDistance(g1, g2, ref object_missing1, ref object_missing2);
            IRasterDataSet raster_out = geoDataset_output  as IRasterDataSet ;


texts: Modify script so only empty fields are changed in ArcGIS Pro?

texts:
I currently use a script that converts the integer in OBJECTID to a string and combines it with another string (in this case UAW,) to populate a field

Field = str(!OBJECTID!) + "UAW"

Now that I have populated my fields how can I modify my script so only empty fields are changed moving forward?

I am using the Python Parser in Calculate Field of ArcGIS Pro.


texts:
I am developing a database for my organisation that could be spatially enabled.
I have to use MS Access 2007 on Windows and am therefore looking for any possibilities to incorporate my Access Database into a mapping tool to embed inside my Access application.
Has anyone successfully created an MS Access project which embeds a mapping window?
I would ideally like to simply geocode my datasets - digitize a point after inputting my data into the DB.


texts: Cached map performance when view ArcGIS Server map services in ArcMap?

texts:
ArcGIS server cached map service that displays at the following scales:

1:20,000
1:10,000
1:5,000
1:1,000

Refresh takes 1 second when using the Javascript/silverlight viewer, but 4-7 seconds when consuming the service in ArcGIS Desktop.

Any thoughts to as why this might be?


texts:
I have duplicated features in point layer (Land Marks)
but these duplicate has 2 cases :

they might be not all have their center above each other (some have it at center , some is a bit far but its the same point)
they might have little different in name like a letter different or a character like dash is in one of the names

like for example a branch for Pizza Hut at Main street is represented by two points that are some distance apart , when its suppose to be at one location and same point . (and it might be there is another point of different land mark near it too )

or like "Zeid Haritha Shrine" and the 2nd one "Zeid Haritha / Shrine" or "Zeid Haretha Shrine"

is there any way i can find them automatically in any of these cases instead of going by all the points (its large number of points)

i use Arcgis but if there is a way in another program i can do it too


texts: Conversion of .csv file to MapInfo generates very large .dat file

texts:
I am converting an .xls file (500kb) to a .csv (150KB) then using this to generate a MapInfo .tab file format using both QGis and ArcGIS. I can use an intermediate file ie. mif/mid format which gives a file size of about 250KB in both cases however when I convert this to .tab format I get a .dat file of about 6MB (the .id, .map and .tab total 14KB) using both programs. Note that QGis will not allow me to generate the .tab without generating a .mif first. Zipping these for emailing drops the size from about 6MB to less than 500KB so lot of empty space somewhere.

Have looked within the text files (.csv and the .mif/mid) but see no issues. I have used this method before on an older versions of this.xls file to generate MI format files totaling less than half a meg without any issues.

Any suggestions as to what is going on? Currently have no access to MapInfo to try.


texts: Database Editor Tracking Time Stamp Issue

texts:
I have Esri Tech Support looking into this but I thought I would post it here too. I have a File Geodatabase with Editor Tracking Enabled. The date is fine but the time stamp for creation and edits are all 3h ahead of my time. Using Database Time,Database is up to date, my Windows time settings are -4 Atlantic Standard Time, no other clocks running, database creation date/time is accurate. Running Windows 7, Arc 10.3.
Any Suggestions?


texts: QGIS 3.16 – Maptip shows contents only once

texts:
I'm working with QGIS version 3.16.0-Hannover on both Mac and Windows OS and I encounter the same problem with using map tip.
I added images and videos to point location by adding in the layer properties (display) the following code:
 [% Target %]

<video src="file:///[% @project_home %]/images/[% "Videos" %]" width="290" height="180" type="video/mp4" controls/> </video>

Then, when I hover over the points with the map tip activated I can correctly see images and videos in the pop-up. However, the pop-up only appear one time and to see its contentsagain I have to close and reopen QGIS.
I'm sure there is something wrong in the code or in the properties of the file. Can anyone relate to this issue and know how to resolve it?


texts: Creating an QGIS Action to change a field value from yes to no

texts:
So I'm working on a project where I have to check the classification of a bunch of points in a QGIS project. I have created a styling which means I can perform this task with visual inspection.
I have a field simply called 'check' with default value of 'no', which I then change to 'yes' when I have checked a point.

Is there any way to create an action so that I can simply click on a point and auto-change its value to yes without having to open my attribute table every time?


texts: Adding 3rd Party Live JSON API in AGOL using Koop

texts:
I want to create a Dashboard in AGOL based on Real Time Data. I know that Koop helps creating a geoservice provider from an API to be used directly  in ArcGIS Online. I have created the provider from samples in Koop's GitHub. Now when I run npm install and npm start on command and hit the URL in browser I get  this data as shown in SS. Also the URL - http://localhost:8080/github/koopjs::geodata::north-america/FeatureServer/0/query .
Now that i can see the data in my local server, I need to know how can I get a URL that can be consumed by AGOL (Adding items from URL). I went through a Medium Article but there was no mention of how to make it for AGOL rather creating the koop Provider.
Thanks


texts: Street-view Image not rendering in CartoDB infoWindow

texts:
Following instructions on Infowindows with Google Street View Images, I'm trying to add this feature to a visualization

Instead of an image, I'm simply getting the link to the image via the SQL query as text:

Wondering if I've done anything wrong.

Thanks!


texts: Hyperlinking in QGIS - Add Data to current window

texts:
I am looking to add to my current action in QGIS so that a hyperlinked file will open in the current QGIS window, rather than in a new window.  Here is what my action looks like:

"C:/Program Files (x86)/Quantum GIS Wroclaw/apps/qgis/bin/qgis.exe" "C:\Users\Ryan Garnett\Dropbox\SpatialData\Imagery\Landsat\%Image"

I am hoping I can use this as a means to share data so that users can load in satellite images basked on a click with the Hotlinks plugin.

Thanks Nathan,
I tried this, but it did not load the file.  It came back with the following error:

C:\Users\Ryan Garnett\Dropbox\SpatialData\Imagery\Landsat8020_nad83_utm_30m_123457.jp2 is not a valid or recognized raster data source

This is what I have written in the action:

qgis.utils.iface.addRasterLayer("C:\Users\Ryan Garnett\Dropbox\SpatialData\Imagery\Landsat\%Image")

With is set to Python. I have noticed in the error that there isn't a \ in between Landsat and the file name, plus the file name has been cut short, from 028020_nad83... to Landsat8020_nad83...

Any thoughts?  My other way is still working.


texts: Data type changing in ArcMap 10.4 Model Builder?

texts:
I have a simple model constructed in ModelBuilder that takes a Feature Class as an input parameter, then adds and calculates a series of fields based on data from a table that is joined during the model.

The data type for the input parameter is set as "Feature Class", but once I run the first "Add Field" tool, the data type changes to "Table View or Raster Layer or Raster Catalog Layer or Mosaic Layer". As a result, the Add Join tool will not accept this data as an input because it is the wrong type. I can only get the tool to function properly if I add a Make Feature Layer tool before the Join, which seems like it should not be necessary.

The datatype again reverts back to "Table View or etc." after the Join as well, meaning I have to add an additional Make Feature Layer tool.

Any ideas what is happening here?

The input is definitely a "File Geodatabase Feature Class", so I'm really stumped as to why this is happening.


texts:
Does anybody know if there is a way to statistical calculate the similarity of two polygons using QGIS?

I want to know how similar is the polygon (red outline) with the polygon (black outline).


texts:
I'm making a map which enables routing over hiking trails. I have GeoJSON data containing my custom hiking trails and they are displayed as layer on the map. User can click on that layer and add lngLat as starting/destination point. Mapbox directions API gives me optimal route between those points. The issue is when received path is not part of my layer.
I want to restrict routing to only my custom routes.
I know that using Mapbox is not possible to exclude specified routes from being taken to calculating directions routes.
But it's somehow made by many sites.
Do you have idea how to achieve my concept?
EDIT:

I want to be able to generate route only using mu custom trails (in the picture black colour, but route generated by mapbox is different due to algoritm which routing uses). I know, user can add another point on black line and then it will generate proper route, but I have seen some web aps where in this scenario they generate black route in the picture.


texts:
I am using Google Satellite (via QuickMapServices) in QGIS to count settlements in a certain area, and I'm looking to compare this settlement data to satellite imagery from a few years back.

Is there a way to know what year the current Google Satellite imagery was taken? Does QuickMapServices update this continuously?


texts: Counting occurrences across a record in ArcGIS 10.0

texts:
I'm a student at Millersville University, PA studying for a BA in Geography with a concentration in GIS. I've stumbled across this site for questions I've had over the past year or so with getting introduced to ArcGIS. So thank you all here for helping a student out :)

I have come across a problem that I can't figure out and my textbook didn't offer any help so I'm hoping one of you can.

I have a table which consists of 3 attribute joins, and I have a text field which has 2 unique values. I want to create a field in which I can summarize the number of times a particular text occurs.

For Example: Jx = Join #

ObjectID 1 |J1: A | J2: A | J3: B | CountFldA: 2
ObjectID 2 |J1: B | J2: B | J3: A | CountFldA: 1

I have a feeling that the answer lies somewhere in python but I have no formal experience in it.


texts:
I would like to know which applications or libraries (proprietary or open source) offer transactional Web Feature Service (WFS-T) client functionality. Those include:

Desktop or online applications that offer the functionality "out of the box", or
Libraries that can be used to develop a WFS-T client, like OpenLayers.


texts: Running only newly added portion of python script?

texts:
I was wondering if there is a way to run only the newly added portion of a python script?

Usually I add a few lines of codes in the end of my script but I have to run the whole script to reach them and see the results. It is very time consuming specially if I have many lines of codes above.
Sometimes when previous results are already saved on the local hard drive by previous runs, I use triple-quoted strings not to run previous line of the script.

Is there any other method to mange this more effectively?


texts: How can I do segmentation using OTB plugin? I searched it in the Plugin section but was not able to find it out.


texts: Calculate slope/gradient along streams (lines) segments in R

texts:
I would like to calculate the slope for stream segments in R. The stream network has been derived from the DEM. I have split the stream segments into equal parts of 100m (or less) and I have the DEM (1m resolution). I have attempted to use the openSTARS package that runs through GRASS without success (I am finding the initial steps to start using GRASS very difficult).
I am aware of tools in QGIS and ArcGIS but I would like to make as many of my steps within R as possible (Calculate slope of line segments with QGIS ;
Workflow for determining stream gradient?)


texts: Hacking QGIS plugin Midvatten to allow capacity explanation label on stratigraphy plot?

texts:
I have been trying to make a local addition to the python code for QGIS plugin Midvatten to allow labels on the stratigraphy plot that give the capacity explanation rather than the capacity value. In my case these capacity values are just meaningless codes but the explanation is the information that I wish display about the plot. The screenshot shows the type of plot with capacity value label and attribute tables that I am using with explanation field.

I found the file stratigraphy.py in .qgis2>plugins>midvatten>tools and have added the following lines of code:
                elif self.GeoOrComment == "explanation":
                   p.drawText(tRect, PyQt4.QtCore.Qt.AlignVCenter, '' if layer.hydro=='NULL' else self.digitToText(layer.hydro, 'explanation'))

at line 469
    def digitToText(self, id=''):    # A function to return 'explanation' for 'capacity' value
       """ returns explanation for the specified capacity """
    if id in self.hydroColors:
        return getattr(PyQt4.QtCore.Qt, self.hydroColors[id][2])   # Or possibly [0]?
    else:
        return PyQt4.QtCore.Qt.nolabel

at line 509
        self.GeologyOrCommentCBox.addItem('explanation')

at line 572
This does not produce any syntax errors and adds explanation to label menu but interferes with the content of the stratigraphy plot content as shown in the screenshot:

I am now trying to figure out what I need to change. In .qgis2>plugins>midvatten>definitions>midvatten_defs.py I found def hydrocolors(): which has the line of code:
    res, dict_qt1 = utils.get_sql_result_as_dict('select a.capacity, a.explanation, b.color_qt from zz_capacity a, zz_capacity_plots b where a.capacity = b.capacity')

This suggests to me that I am looking in the right dictionary to find the explanation label. In the getattr statement I have tried changing the number in [ ] between 0,1 and two to see if this has any effect but it doesn't.
What am I missing?


texts: How to split a polygon by a polygon using PostGIS?

texts:
I've a large polygon (table_a) that contains a smaller polygon (table_b). Now I want to split the larger polygon by the smaller polygon.

Unfortunately st_split(table_a.geom, table_b.geom) isn't working (Error: Splitting a Polygon by a Polygon is unsupported).

Is there any way to split a polygon by a polygon using PostGIS?


texts: QGIS Select by expression - buffer selection

texts:
I want to select points 2 and 3 with a 'selection with expression' in QGIS 3.4. I want to do this by using the buffer function in the expression builder.

I already managed to create a separate buffer and then selecting points that are overlapped by the buffers.

I expect that the expression will select points 2 & 3. The expression buffer( $geometry, 5000) is not giving the result i expect.


texts: How to draw a rectangle a the map using C#?

texts:
I have two points, Ipoint upperRight; and Ipoint lowerLeft; points.

from the previous points i can get the height and the width for the rectangle.

How can i draw a rectangle on the map?.

I think i should use IGraphicsContainer.AddElement Method, but i don't know how, i searched through the internet but didn't find any useful example.


texts: Finding network routes based on facility attributes

texts:
I am trying to find a way to find routes between locations, based on attributes of the destination.  For example, I have a shapefile of multiple destinations, each with attributes A, B, C, D.  The fields are boolean and the destinations either have A or don't, have B or don't, etc.
Is there a way to find closest routes based on which attributes are present i.e. if I'm looking for a route to destination which has A, B, and C it will ignore nearer facilities containing just A and B?
I am using ArcMap.


texts:
I have recently updated to fedora 28 and tried to install the latest version of gdal using yum install gdal gdal-devel gdal-libs. I tested this and it worked fine.

After installing other packages I type gdalinfo --version and I get the following error

gdalinfo: symbol lookup error: /lib64/libgdal.so.20: undefined symbol: wrapper_dgbsvx_

What packages are interfering with gdal? Here is a list of what i've installed

python2-gdal
python-devel
grass
grass-devel
grass-gui
qgis
R

Geany
cmake


texts: Service Network Area Polygons are longer than their distance limit

texts:
I want to check the percentage of a city that is accessible to a forest (in green in the image) within a 2 km range from its entry points (purple dots). My first approach consists in creating buffers with a 2 km radio (blue circles) from the entry points. For a more realistic one, I am using Service Network Areas (ArcGIS 10.7) to use the network of streets of the city with the same distance limit (orange polygon). I got the network of streets of the city from OpenStreetMap and then I cleared it from rivers, streams, electric lines, railways and such. From the polyline shape I created a new network dataset with only length in meters as attribute, and then created a New Service Area and loaded the 10 entry points of the forest as facilities. For the polygon creation I am merging the polygons and not trimming them (I'm also using Disk as overlap, even though I don't think this is important in my case, since I have only one break). The default break is 2000 m, which is the limit I defined for my study.
As you can see in the image, the maximum distance that could be covered should be the direct approach using the blue circles buffers. Nevertheless, the Network Service Area exceeds this maximum direct distance on some areas, reaching a distance of 2600 m from the entry points, for example. Whereas the limits of the Network Service Area polygon should be shorter than the direct approach, since the distance is being measured by using the network of streets. I am new in using this tool, therefore I don't know if I am overlooking something or making a mistake in my procedures.


texts:
I am working on a project that involves mapping community anchor institutions and at a point where I need to verify that the points are in the correct parcels.
I have the address information for the point file and some of the address info for the parcel layer as well.
The institutions have a Name field and the parcels have an owner field.
I also have the parcel Id tied to the points through a spatial join. My intention is to

Select points and parcels that have the same ID
From those with matching IDs select the records that have matching name and owner name
From the matching IDs and Names select the records that have matching address information.

This will likely leave me with around 4,000 points to verify spatial accuracy.

I am looking for any ideas of how to automate this task.

I have a little experience with python but not much so it would be best if the solution would not be terribly complex but sound.


texts: Finding nearest distance between point and polygon layers in QGIS

texts:
I am using QGIS to undertake an analysis for a project.

This involves a polygon shapefile, which represents a boundary of a site, and a series of points which represents the location of parks.

I am able to create labels and numbering of the points quite easily through the custom labeling tool and related queries.

Is there a way to calculate/show the points which are closest to the site boundary (shape polygon) rather than having a random numbering approach?

Which means the closest to the site would say be number 1 and the furthest away would say 12.


texts: Python: Using re and update cursor over three columns

texts:
I'm working on this code and got a little to excited...only to find out it wasn't perfect!
I'm trying to eliminate the suffix (row1) of roadnames(row0) and parse just the roadname to a new field(row2). I got it to work, however it also eliminates the suffix within the roadname.
For instance, in the suffix column I could have "St" and roadname "Bathhurst St" What I want is for the new field to say "Bathhurst"  instead, it says "Bathur".

I know if you add a '$' it will make it match to just the end of the field, however I can't figure out how to make it work with variables. Here is the code:

import arcpy
import re

fc = r"G:\GIS\Shapes\SeptParcels.shp"
fields = ["STREETNAME", "SUFFIX", "NAME1"]

with arcpy.da.UpdateCursor (fc,fields) as cursor:
    for row in cursor:
        row0 = str(row[0])
        print row0
        row1 = str(row[1])
        print row1
        query = re.sub(row1,"", row0)
        row[2] = query
        print query

        cursor.updateRow(row)


texts: Save As CSV puts extra comma on header line

texts:
I was attempting to save a Shapefile point file as a CSV.  My Shapefile only has one attribute (id).  I use the Save Vector Layer as... tool by right clicking on the shapefile I want to convert.

I have chosen Comma Separated Value (CSV) from the Format

I select the folder and file name I want to save the file as.

I left encoding to UTF-8

I have selected the id field I want to export from the shapefile

I set GEOMETRY to AS_YX

I set LINEFORMAT to CRLF

I set SEPARATOR to COMMA

I leave WRITE_BOM as NO  *btw, what is this?

I then save the file.  Another program I was using to read that file kept giving me grief until I opened the file in Excel and then saved it again.  It was driving my nuts.  I happen to open the file in Wordpad just to see the raw data once and noticed the header line.

The file had the following data in it:

Y,X,id,
46.5139490255807,-110.990074324009,1
46.4904918688525,-110.989960260943,1
46.4904314614628,-110.992750419033,2
46.5127715775017,-110.992811837607,2
46.4904405225755,-110.999357302811,3
46.5084993401582,-110.999515236288,3
46.5005246052244,-111.002094816409,4
46.4976285297097,-111.002077268245,4
46.496432607856,-111.002182557229,5
46.4907244366764,-111.002112364573,5
46.4899965262764,-111.002950289408,6
46.4899361183366,-111.009640526966,6

Notice the header line.  It has an extra comma on the end of the line.  Is this a bug or do I not have a setting set right?  I'm running v 2.18.12.


texts:
Unfortunately but i have to make a tile server on Windows system. I were already generated tiles. Now i want publish it.
Tiles volume can be big - around city with city's local area.
When i did same on Linux i used nginx. What a bes practice to do tile server o Windows?


texts:
I'm trying to use lidR to range correct the intensity values in my point cloud. I'm running into some trouble with running lasrangecorrection due to producing an unrealistic range value.

The mean sensor altitude as provided in the las tile metadata is 2260 meters.

The sensor_tracking() function indicates that the point cloud might be "wrongly populated" - in what way might it be wrongly populated?

The lasrangecorrection() function suggests checking correctness of sensor position and gps times, but what is considered incorrect?

Warnings and error messages:

lastile <- readLAS("/tmp/u_5370088700_2015.las")
lastile
#> class        : LAS (LASF v1.4)
#> point format : 6
#> memory       : 594.3 Mb
#> extent       :537000, 538500, 4887000, 4888500 (xmin, xmax, ymin, ymax)
#> coord. ref.  : +proj=utm +zone=18 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0
#> area         : 2.05 km²
#> points       : 6.77 million points
#> density      : 3.3 points/m²
#> names        : X Y Z gpstime Intensity ReturnNumber NumberOfReturns ScanDirectionFlag EdgeOfFlightline Classification ScannerChannel Synthetic_flag Keypoint_flag Withheld_flag Overlap_flag ScanAngle UserData PointSourceID
sensor <- sensor_tracking(lastile)
#> Warning message:
#> 7991 pulses with multiple returns were not actually paired. The point cloud is likely to be wrongly populated. These pulses were removed
range_corrected <- lasrangecorrection(lastile, sensor, 2000)
#> An high range R has been computed relatively to the expected average range Rm = 2106
#> Point number 851196 at (x,y,z,t) = (538442.61, 4888494.26, 548.58, 115043523.41)
#> Matched with sensor between (538020.25, 4888520.48, 2601.76, 115044213.00) and (538020.03, 4888486.40, 2598.99, 115044213.50)
#> The range computed was R = 47387.71
#> Check the correctness of the sensor positions and the correctness of the gpstime either in the point cloud or in the sensor positions.
#> Error: Unrealistic range: see message above

Visualization of sensor positions overlayed with bounding box of las tile:

Bounding boxes for sensor positions and lastile:

bbox(sensor)
#>         min       max
#> X  536890.6  539228.8
#> Y 4886784.4 4888531.6
lastile@bbox
#>       min     max
#> x  537000  538500
#> y 4887000 4888500

lascheck() output:

> lascheck(lastile)

#> Checking the data
#>  - Checking coordinates... ✓
#>  - Checking coordinates type... ✓
#>  - Checking attributes type... ✓
#>  - Checking ReturnNumber validity... ✓
#>  - Checking NumberOfReturns validity... ✓
#>  - Checking ReturnNumber vs. NumberOfReturns... ✓
#>  - Checking RGB validity... ✓
#>  - Checking absence of NAs... ✓
#>  - Checking duplicated points...
#>   ⚠ 1474 points are duplicated and share XYZ coordinates with other points
#>  - Checking degenerated ground points...
#>   ⚠ There were 4 degenerated ground points. Some X Y Z coordinates were repeated.
#>  - Checking attribute population... ✓
#>  - Checking flag attributes... ✓
#> Checking the header
#>  - Checking header completeness... ✓
#>  - Checking scale factor validity... ✓
#>  - Checking point data format ID validity... ✓
#>  - Checking extra bytes attributes validity... ✓
#>  - Checking coordinate reference sytem... ✓
#> Checking header vs data adequacy
#>  - Checking attributes vs. point format... ✓
#>  - Checking header bbox vs. actual content... ✓
#>  - Checking header number of points vs. actual content... ✓
#>  - Checking header return number vs. actual content... ✓
#> Checking preprocessing already done
#>  - Checking ground classification... yes
#>  - Checking normalization... no
#>  - Checking negative outliers... ✓
#>  - Checking flightline classification... yes


texts: Choosing R package for discrete choice model?

texts:
I am at a loss as to which R package and approach to use for my modeling.  The background is: I have a transportation survey dataset combined with many other GIS datasets.  I am attempting to determine the effects of household and urban characteristics surrounding each respondent on their choice to drive or take any other form of transportation.

Having read the Bivand book "Applied Spatial Data Analysis", and most of the documentation of the packages listed below, I am still unclear as to whether this should be done as a point pattern model, since I have a point for each location of survey respondents, or whether it is a spatial probit model, etc.  Much of the documentation has only function definitions with very little examples of application from start to finish, and I can't make heads or tails of which chapter of Bivand would be the correct one to follow.  From this, can anyone point me in the direction of whether I should be using R packages spatstat, McSpatial, GWmodel, spatialprobit, spdep, sphet, splancs or some other package?  I am also having trouble creating any type of spatial weights matrix other than a binary neighbor weight, but would like to create a Gaussian or some other exponentially declining weighting scheme for spatial dependency.


texts: Extracting features with equal field value using graphical modeler of QGIS

texts:
Is it possible to automate the following procedure with graphical modeler in qgis 3.4 or is it easier to perform such action with a python script using PyQGIS?

Identify a feature (a line) in a vector layer using the mouse pointer, features have an attribute named RLID
Then let the model select all features with the same attribute value in the vector layer

Right now this is done manually, a very time-consuming process. The manual process starts by identifying a feature and copying the RLID attribute value. Then the features with the same RLID value are selected using "Select features by value".

I am completely new to qgis but know how to program with python.

Speed is important since we have 200k features to process. I tried a little python script (with a selected feature) for extracting features with the same attribute value and it took 30s, which is very long time compared with F3 - Select features by value.

layer = iface.activeLayer();
features = layer.getFeatures()
selected = layer.getSelectedFeatures()
for f in selected:
    rlid = f['RLID']
    print(rlid)

fs = [f.id() for f in features if f['RLID'] == rlid]
print(fs)

Found by older posts that a quicker way to obtain the features fs is:

expr = QgsExpression( "\"RLID\"='"+rlid+"'" )
it = layer.getFeatures( QgsFeatureRequest( expr ) )
fs = [i.id() for i in it]


texts: Can't specify CRS in QGIS Add Delimited Text layer

texts:
Add Delimited Text Layer dialog does not have anywhere to specify the CRS of the data.  The layer imports, but defaults to WGS84, which in this case is not correct (it needs to be geographic, but with a different datum).

When importing it gives an error message that CRS was not specified, so it defaulted to WGS84.

I believe previously (earlier QGIS versions) this used to open the CRS dialog when the add layer dialog was dismissed with "OK".

As a work around, you can reset the CRS in the layer properties after it is imported.  This seems to work OK, so this is not an emergency, but it seems a little kludgy;>)

I am using QGIS 2.18.16 in Ubuntu 16.04.


texts: Get feature class names inside Esri file geodatabase

texts:
I have a project folder with many many folders within that. Some of these child folders contain a Esri .gdb file geodatabase. I want to list all the feature classes that are inside the GDBs that have AOI (Area of Interest) as a prefix.
I've tried the following:
import sys
from pathlib import Path
import arcpy

# -------------- FUNCTIONS --------------------
def searching_all_files(directory):
    file_list = []
    for x in directory.iterdir():
        if x.is_dir():
            if (x.suffix == '.gdb'):
                arcpy.env.workspace = str(x)
                for f in arcpy.ListFeatureClasses( "AOI*" , "Polygon" ):
                    file_list.append(f)
            else:
               file_list.extend(searching_all_files(x))
    return file_list

# -------------- INIT --------------------
folder_path = r'C:\Projects'
folder_path = Path(folder_path)

list_of_files = searching_all_files(folder_path)
print(list_of_files)

This code is not listing the features, after many trials, I couldn't figure out what I've missed.
Could someone give a hint how to reach that?


texts: Upstream to a river and tributary of a river - What is the underlying difference

texts:
What is the difference between a stream/ river upstream to a river A and a tributary of River A? I know that all tributaries are upstream to its river (A) and feeds into river A, but can there be a stream / river / lake upstream to river A but does not flow into it.

In other words, if a waterbody is not connected to  river A , can you still call it upstream to River A.

Edit:
I am interested in the semantics of these terms. This question is not related to any software, however modelling streams as either Tributaries of a river or just as upstream to a river is a GIS task (outside the scope of this question). If I say a particular stream "stream 1" is a tributary to a river A, then it automatically implies that "stream 1" is upstream to "river A". If so then modelling explicitly that "stream 1 is upstream to river A" is redundant, unless there is indeed a case where "stream 1 is upstream to river A, but its not a tributary of River A"


texts: Avoiding Displacement of Marker Symbols with X-Offset in QGIS?

texts:
I'm trying to mimick a line symbol style that is comprised of the line and 2 alternating markers. I use an interval placement of 10 units for the 'blocks' (custom svg) and 5 for points, thus every second point is covered by a block. With this trick all marker are aligned at the line properly. However, I'd wish to make the 'blocks' bend along with the line.

Is there any way I can achieve this?

I found a way by using a custom dash pattern (dash 5, space 5) and vertical marker lines with interval 5, instead of my custom svgs. This works perfectly well - but now I don't know how to add the point markers. I could use a simple marker with interval 5 and offset 2.5, but this is buggy because then the points wouldn't align along the line, where it bends..


texts: Create PDF Reports with a previous design for all records (Or selected ones) in QGIS

texts: I have 3 different point layers in a project, they share an ID (they are trees and each tree has same ID in all layers). I would like to know how can I create a PDF with a combination of attribute information from all layers (maybe in different tables and little map if possible). I would like to generate a PDF for each tree automatically without having to customize every tree or PDF one by one manually.


texts: How to change the font color of an attribute field using attribute table?

texts:
I'm using QGIS 3.0.1 and I would like to change the font color of some attribute fields with a changing value in attribute table (depends on which value was entered). My idea is to use signal "attributeValueChanged" but I can't find any information about how I can change font color or how I can access it via python. Does QGIS 3.0.1 / Python support something like this or rather not?

Example:


texts: How do you account for no geometry at location of overlay during Intersect Analysis?

texts:
I have a script that takes a user-provided lat/long, plots it as a point and performs overlay analysis using arcpy.Intersect_analysis() in order to acquire attributes of interest such as land ownership, county, and township/range. The script works correctly, yet townnship/range has gaps in the state of New Mexico, which will create an output with no geometry or attributes if the point overlays one of these gaps (see hypothetical example in screenshot).

The output of arcpy_Intersect_analysis() is used in subsequent code, so I need to account for instances where township/range doesn't exist. Any ideas?

Would some use of a SearchCursor work? If the output of arcpy.Intersect_analysis() was called "temp.shp", could code go something like this?

cursor = arcpy.da.SearchCursor("temp.shp", ["SHAPE@XY"])
for row in cursor:
     if row[0] == None:    do this...
     else:                 do that...

Code above does nothing of course, but if I could check the existence of the output feature's centroid, I'd be able to provide a work-around for instances where township/range is absent at the location of the point.


texts: Overwrite a Map Service on ArcGIS Server in Python

texts:
I tried to automate the overwriting of an existing map service using a stand-alone Python script.

I mirrored the Esri's sample scripts. But when I ran it, the second print statement was never executed. However, when I ran the same script from the Python window inside ArcMap, the script ran as expected.

import arcpy

wrkspc = 'C:/GIS_Projects/'
mxd_name = 'Test.mxd'
mxd = arcpy.mapping.MapDocument(wrkspc + mxd_name)
server_con = 'GIS Servers/arcgis on myserver_6443 (admin)'
service = 'Test'
sddraft = wrkspc + service + '.sddraft'
sd_file = wrkspc + service + '.sd'
print 'local variables set'

analysis = arcpy.mapping.CreateMapSDDraft(mxd, sddraft, service, 'ARCGIS_SERVER', server_con, True, None, 'test', 'test')
print 'SDdraft file created'


texts:
I have made a custom form with a QgsRelationEditorWidget and with a QToolButton. I want to select a feature in this QgsRelationEditorWidget and press the button to open another form with this selected feature. For it, I need to get this selected feature attributes. The code is a py file.

I think I have to access to the QgsRelationEditorWidget with this code:

childFormWidget = dialog.findChildren(QgsRelationEditorWidget)[0]
childForm = childFormWidget.findChildren(QgsRelationEditorWidget)[0]
featureManager = childForm.featureSelectionManager()
infraManager.selectionChanged.connect(partial(changeSelection, featureManager))

But I have this error:

  IndexError: list index out of range.

Also, I don't know how to access the attributes with featureManager.

How can I do it? How can I reach to the selected feature?


texts: How can I find a shapefile for GP surgery locations in the UK

texts:
I am doing some research on accessibility to GP surgeries in South Norfolk and want to find a GIS data file with all the GP surgeries' locations on it that could be used in ArcMap.

Is there anywhere online I can find this? I have been looking for quite a while but cannot find anything.


texts: GeoServer not reading bounding box from PostGIS geometry correctly

texts:
We are using GeoServer (tried on version 2.2 and 2.4) to render WMS with a PostGIS (version 1.5) data store.  We set up the geometry field with all the appropriate constraints and validated/cleaned the geom. However, when publishing a specific table (srid 4326) that has regional level data geoserver computes incorrect bbox values. North, West, and South are only slightly off but the East value is off by about 1 degree. The resulting WMS cuts off the eastern part of the dataset. The strangest part is that this table renders perfectly in Qgis, ArcGIS, and the Open Layers preview in GeoServer. When we calculate the extent in PostGIS and manually add those values to the service bbox form it will then work as expected. That is fine but we are managing hundreds of services and I want to rely on the automatic bbox computation. Does anyone know why geoserver might be reading an incorect bbox?

EDIT:  forgot to mention we are using GeoWebCache/geoserver for the tile cache.


texts: Getting the line middle point with SQL in QGIS

texts:
Using SQL in a Virtual Layer is it possible to get the midpoint of a line on the line?

I have tried Finding middle point (midpoint) of line in QGIS? but got an error

I also tried

SELECT road, st_centroid(geometry) as Mid_Point
FROM CSC_Roads
GROUP BY road

but these points are then not always on the line.

I'd also like the final value to be formatted as (x,y)-tuple as I need to display the value in a table.

So this should be

Airport      | 507889.784, 8044651.312
Allan Howies | 483040.867, 8066200.614

It runs now but the point is not the midpoint but the start of each road (all segments grouped by 'Road').

SELECT Road, AsText(Line_Interpolate_Point(CSC_Roads.geometry, 0.5)) as Road_Location,
       Line_Interpolate_Point(CSC_Roads.geometry, 0.5)
FROM CSC_Roads
GROUP BY road


texts: Why does arcpy.Delete_management not work when published in web tool or Geoprocessing Service

texts:
I have a tool that I am publishing to ArcGIS Server and the tool runs fine except for one line
result = arcpy.Delete_management(newfolder)
if result.getOutput(0)=="true":
    message = "success"

What I don't understand is why the output of the result variable returns true when the Delete_management does not delete the folder I am passing it. I have tried shutil.rmtree as well with no success.


texts: I'm trying to create a RGB-encoded DEM file like the one that mapbox has for Maputnik that is being hosted on TileserverGL. I've converted a single-band DEM into a color-mapped RGB DEM then converted it into an MBTile via QTile but don't have a height-differentiated hillshade layer in Maputnik. Is there any documentation on how to create the same DEM file that Mapbox uses?


texts: What is the proper convention for storing rasters in PostgreSQL database?

texts:
Just starting to implement PostgreSQL at work and want to make sure I'm building something that will be efficient down the road. Let's say I have a raster of surface temperature for every hour of every day for the past 10 years. What is the best way to store this? Could I do multiple hourly rasters per table? For instance could I store a year's worth of hourly rasters in each table (10 total tables) or should I just store each hourly raster as its own table (87,600 total tables)? Does anyone have any resources on the theoretical aspects of creating a database?
In the future I will be referencing the rasters for mapping, querying, and analysis using python.


texts: ArcObjects 10.0: Adding Annotation Feature Class To Map

texts:
ArcObjects 10.0,
SDE on MS Sql Server,
Visual Studio 2010,
C#.Net

Using ArcObjects, I am able to add feature classes to the map with no problem.  However, when adding an annotation feature class to the map, the layer appears with the red exclamation point, which indicates that it is not valid.

Can someone provide some code that shows how to properly add an annotation feature class to a map?

Thanks in advance.


texts: Chained rendering to create contour gives correct WMS but incorrect WFS using openlayers

texts:
I'm trying to create a contour as vector layer using this example: http://boundlessgeo.com/2013/01/chaining-rendering-transformations-in-geoserver/. My setup is GeoServer v2.5.3 and gwt-openlayers. When I create the contour as WMS layer, the layer shows OK with correct contour lines, but when I create the same layer as WFS layer, the layer only shows the original points used for the barnessurface.

Is my assumption  correct it should be possible to create the contour layer as real vectors/features and how can I accomplish this? Or is it only possible to create the contours as WMS layer?

Here is a code section for the two layers. WMS shows correct contours, WFS only displays the points:

        WMSParams wmsParams = new WMSParams();
        // wmsParams.setFormat("format");
        wmsParams.setLayers("ws:values");
        wmsParams.setFormat("image/png");
        wmsParams.setTransparent(true);

        WMSOptions wmsLayerParams = new WMSOptions();
        wmsLayerParams.setUntiled();
        wmsLayerParams.setTransitionEffect(TransitionEffect.RESIZE);
        wmsLayerParams.setSingleTile(false);

        String wmsUrl = "http://localhost:8080/geoserver/gwc/service/wms";
        WMS wmsLayer = new WMS("WMS contour", wmsUrl, wmsParams, wmsLayerParams);
        wmsLayer.setIsBaseLayer(false);
        wmsLayer.setIsVisible(false);
        map.addLayer(wmsLayer);

        // now set style (seems like can't be done before layer is added to
        // map)

        wmsLayer.getParams().setStyles("contours");

        WFSProtocolOptions wfsProtocolOptions = new WFSProtocolOptions();
        wfsProtocolOptions.setUrl("http://local3:8080/geoserver/ws_geotax/wfs");
        wfsProtocolOptions.setFeatureType("values");
        wfsProtocolOptions.setGeometryName("GEOMETRIE");

        WFSProtocol wfsProtocol = new WFSProtocol(wfsProtocolOptions);

        VectorOptions vectorOptions = new VectorOptions();
        vectorOptions.setProtocol(wfsProtocol);
        vectorOptions.setStrategies(new Strategy[] { new BBoxStrategy() });
        vectorOptions.setStyle(new Style("contours"));

        Vector wfsLayer = new Vector("WFS contour", vectorOptions);
        map.addLayer(wfsLayer);


texts: Geoprocessor Select By Location Using Features Instead of Layers

texts:
I have a simple spatial feature selection function that includes:

 public static void SelectByLocation(IFeatureClass sourceFC, ILayer selectLayer)
        {
            Geoprocessor GP = new Geoprocessor();
            SelectLayerByLocation selectLoc = new SelectLayerByLocation();
            selectLoc.in_layer = selectLayer;
            selectLoc.select_features = sourceFC;
            RunTool(GP, selectLoc, null);
            ArcMap.Document.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, null, null);
        }

It works correctly passing an IFeatureClass and an ILayer, however I would like to pass a selected subset of records from the IFeatureClass (for example: only the record with the most recent date or count). I've tried changing it to accept an ILayer as the first parameter and applying a selection to that with no result. I've also tried passing an IFeature object of the intended feature dynamically cast as an IFeatureClass. This latter method returns every row in the select features layer.
For reference, I'm calling it now like this:

 List<string> affectedFeatures = featureSelector(polyFC, layerList["SelectionLayer"], SelectList);

Where featureSelector() calls the spatial select with "polyFC" as IFeatureClass, layerList["selectionLayer"] as a reference to the ILayer selection layer, and SelectList as a list referencing fields to return from the selection layer. So, I suppose what I'm asking is: is it possible to pass an IFeature to the first method and get a proper spatial selection returned? For what it's worth this is always polygons selecting polygons.


texts: How to join maximum values from a polygons layer to other gridded polygons layer in QGIS?

texts: I have two overlapping SHPs. One is with two noncontinous polygons - values 0 is blue and 1 is green. Now I have 9 meters grid for the same area, but I need to "fill" the grid with values from previsous shapefile - not by averaged, but by maximum value (it means when one small polygon with value 1 is underlaying the grid, then the whole grid cell has new value 1).  Below is the picture. I'm afraid all this spatial join tools does it only by averaged values.


texts: arcpy.SelectLayerByLocation_management gives ERROR 000368?

texts:
I have 2 shape files. One is a polygon while other is polyline. I need to select all the polylines that are completely inside the polygon. However this doesnot seem to work in any way.

NewLinks = "NewLinks.shp"
Buffer = "Buffer.shp"
Buffer1 = "Buffer1.shp"
arcpy.MakeFeatureLayer_management(Buffer, Buffer1)
arcpy.SelectLayerByLocation_management(NewLinks, "COMPLETELY_WITHIN", Buffer1, "", "NEW_SELECTION", "NOT_INVERT")

Error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\management.py", line 7860, in SelectLayerByLocation
raise e
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000368: Invalid input data.
Failed to execute (SelectLayerByLocation).


texts:
I have a GeoJSON layer with continents info (got it from here), and I want to select a feature(continent) based on its name value or "CONTINENT" in this case.
I did some research and ended up with something like this:

var match = featureGroup.eachLayer(function(layer) {
    if (layer.feature.properties.CONTINENT == continentName) {
        return layer
    }
})

but it doesn't work, because layer doesn't have a feature.

My featureGroup is

$.getJSON("/static/continents.json", function(continents) {
        geojson = L.geoJson(continents, {
        style: style,
        onEachFeature: onEachFeature
    }).addTo(worldMap);
    featureGroup.addLayer(geojson);
});


texts: Change the colors of the pie chart in compouse (plot) in QGIS 3.10

texts:
When using the new plot command available in QGIS 3.10 for compouse pie chart generation, I didn't find any option to change colors.
Is there any way to choose colors?


texts:
im wondering if there is a way to build something like this in Arcmap 10 since VBA isnt supported anymore.

I need a tool to handle Polygons and their Information like in the picture with a simple window. I thought of a connection with a access Database.


texts: QGIS spatialite layers 'Could not commit changes to layer'

texts:
I am running into problems with saving spatialite layers in QGIS 2.18. To illustrate I am following this tutorial:

http://www.qgistutorials.com/en/docs/digitizing_basics.html

Creating a new spatialite layer works, and a new file is written, and I can set up a point, line or polygon layer within the db. But when any data is added (digtitzed) within the db (in this case to the 'road' layer, QGIS fails with the error:

Could not commit changes to layer roads

Errors: ERROR: 1 feature(s) not added.

  Provider errors:
      SQLite error: roads.geometry violates Geometry constraint [geom-type or SRID not allowed]
    SQL: INSERT INTO "roads"("geometry","pkuid","name","class") VALUES (GeomFromWKB(?, 4326),?,?,?)

It is then not possible to save the layer and the project closed without saving changes.
If a layer is successfully created it has a habit of becoming invisible after a random but short period of time and cannot be located. Changing symbology, zooming to layer or selecting the area know to contain the data will fail to find the point, line or polygon.

Deleting .qgis2 folder has no affect.

Problem affects QGIS 2.18.9 in Linux (Xubuntu 16.04, 64-bit)
Problem is not present in QGIS 2.14.15 in Windows (Windows 7 Ult, 64-bit)

Is there a known solution or workaround?

No, not root of the problem, or I am not following you argument. Taking your suggestion verbatim produces the same error:

Could not commit changes to layer roads

Errors: ERROR: 1 feature(s) not added.

  Provider errors:
      SQLite error: roads.linestring violates Geometry constraint [geom-type or SRID not allowed]
    SQL: INSERT INTO "roads"("linestring","pkuid","name","class") VALUES (GeomFromWKB(?, 2193),?,?,?)

And as I originally posted, this exercise works with the 'ambiguous' geometry entry in 2.14. The problem continues to occur in other geometries too (polygons, points) whatever name is given to the geometry column.


texts: Getting set of points (cloud) that are given distance in SpatiaLite?

texts:
I have a set of points and need to get the groups of points that are within a distance x.
Ie, determining the point clouds that are up to the distance x from each other.

Additional information:

Example of a table with coordinates (in EPSG:4674)

The extension of the data is variable. Will be implemented in several counties, separately.

I need anything like this:

And I need make this in SQL from SpatiaLite.
I can make this using buffer and union but I get just one polygon because I don´t have a "group by" attribute, and I need polygons separately for each group.

I´ve been trying this:

CREATE TABLE "T_bufEndR" AS
      SELECT "PK_UID" as "ID_end",
             ST_BUFFER(geom_ce, 0.00025) AS "geom_bu"
        FROM "T_CoordEnd"
       WHERE "situacao" IN (4, 5, 6, 7, 8)

and

CREATE TABLE "T_unbufEndR" AS
      SELECT ST_UNION(b.geom_bu, a.geom_bu) AS "geom_bu"
        FROM "T_bufEndR" AS "b", "T_bufEndR" AS "a"
       WHERE ST_OVERLAPS(b.geom_bu, a.geom_bu) = 1 AND
             "b"."ROWID" IN (SELECT rowid from SpatialIndex
                              WHERE f_table_name = "t_bufendr" and
                                    search_frame = "a"."geom_bu")

Is that!


texts: Correct syntax for loading virtualxl spatialite table?

texts:
I believe I have successfully loaded a virtual Excel table into a spatialite database using the SQL below - typed into the qspatialite plugin for QGIS.

create VIRTUAL TABLE MyVirtualTable1 USING VirtualXL("C:\Users\[path-to-file]\TestExcelSheet.xls");

I'd like to understand how to specify any additional arguments. I can't find any documentation I can understand.

I think that it is possible to specify whether the first row has column names. I imagine it might be possible to provide other arguments. I don't know how (and experiments haven't worked).


texts: Why can't I publish my layers using OpenGEO explorer plugin?

texts: Like in the image, the publish & other commands are not enabled.


texts: Using OGR2OGR to re-project a shapefile Error

texts:
I want to use ogr2ogr command to convert projection of a shapefile. The conversion code is as following:

ogr2ogr -f "ESRI Shapefile" -t_srs EPSG:3573 G:\CIS_Sea_Ice_Chart\cis_SGRDRWA_20160606T1800Z_pl_a.shp G:\CIS_Sea_Ice_Chart_3573\cis_SGRDRWA_20160606T1800Z_pl_a.shp

However, I encountered am error as Fig.2. I don't know the whether the output shapefile should be established in advance.

Unable to open datasource `G:\CIS_Sea_Ice_Chart_3573\cis_SGRDRWA_20160606T1800Z_pl_a.shp' with the following drivers.

How to solve the problem?


texts: Even though we have a lot of web technologies now, why are all WFS and WPS still cgi based? PHP allows tp read from postgres or other db's and HTML5Canvas or SVG can render the maps on the web. C++/Java Web Toolkits are available now which can talk to GDAL. But still, if we need a WPS, it uses cgi. Can anyone answer why?


texts: Where can I find non-rectified stereo satellite imagery?

texts:
I'm looking for free (as in beer and as in commercial-use-friendly freedom) sources of stereo satellite imagery. I assume that such imagery should not be rectified since that would remove the benefits of having a stereo image pair, i.e. the geometry of the resulting images would be nearly identical.

So far I found a usable IKONOS dataset from the May 2008 China earthquake from the University of Maryland's Global Land Cover Facility (GLCF).

Do you know of any other stereo free satellite image sources besides GLCF?


texts: Trying to fuse 4 local authorities (polygons) as one

texts:
I am trying to extract 4 polygons (LA) from a country shapefile, combine them together as one. However, I ended up extracting those specific 4 polygons I was looking as a shapefile, but was unable to merge them together.
Question now is: how do I merge these polygons together?

  import fiona
  from collections import OrderedDict

  SOURCE_FILE = "counties.shp"

  with fiona.open('counties.shp') as source:

  DESTINATION_FILE = "merged_polys.shp"
  SEARCH_STRING = "Dublin"
  SEARCH_PROPERTY = "nuts3name"
  geometries_to_merge = []

 with fiona.open(SOURCE_FILE) as source:

      total2011 = 0.0
      for feature in source:

           if feature['properties'][SEARCH_PROPERTY] == SEARCH_STRING:
              total2011 += feature['properties']['total2011']

            geometries_to_merge.append(shape(feature['geometry']))

            merged_polys = unary_union(geometries_to_merge)
            merged_polys_mapping = mapping(merged_polys)

            destination_feature = {}
            destination_feature["properties"] = OrderedDict()
            destination_feature["properties"]["total2011"] = total2011
            destination_meta = source.meta
            destination_feature['geometry'] = feature['geometry']
            destination_meta["schema"]["geometry"] = f"{merged_polys_mapping['type']}"
            destination_meta["schema"]["properties"] = OrderedDict()
            destination_meta["schema"]["properties"]["total2011"] = "float:33.15"

            with fiona.open(DESTINATION_FILE, "a", **destination_meta) as destination:
               destination.write(destination_feature)


texts: Summing polygon area by category using QGIS

texts:
I have a vector layer of habitats. Each feature belongs to a category and has its area calculated. I'm trying to find out the total area of each type of habitat.

I've looked at QGIS "Statistics by categories" which gives everything but the Sum of each category.

The GroupStats plugin looks like it would do it, but I can't get the "calculate" button to activate.

I'm new to QGIS tools/scripts etc but happy to try to modify an existing tool but haven't yet found where they are or how to do this.


texts:
Is it possible to create a Print Composer; then later, after altering the map that it is based on, go back to that print composer and have it show the altered map? In other words, I want to retain the view extent, and the text labels, etc., that I have created—but have the map image be updated with the changes I’ve made since I created it.
Thanks
TVZ


texts: How to zoom an Ordnance Survey OpenSpace Pro map to make it bigger rather than to show more features

texts:
I'm trialling Ordnance Survey OpenSpace Pro WMS, and I have a basic map showing all the layers I'm going to be licensed for (free ones plus vector map local). This works fine, but I'd like to make the most zoomed level of mapping (VML) bigger on the screen if that's possible? i.e. so I can see it more clearly and the location of pins plotted on the screen more clearly. Obviously I'm not expecting any more data features/detail to become visible (as I'm not paying for any more detailed layers of mapping) - I just want to zoom in on the same map tiles more closely.

I'm initialising my map as follows:

var options = {products: ["OV0", "OV1", "OV2", "MSR", "MS", "250KR", "250K", "VMDR", "VMD", "VMLR", "VML"]};

osMap = new OpenSpace.Map('map', options);

Would be grateful to know if this is possible. I'm not a mapping/GIS/OpenLayers expert, so hopefully there's a simple way to do it.

Here's a OS map with max zoom level (showing vector map local).

Here's the same map but magnified using browser zoom to achieve the affect I want - i.e. the same map layer, but bigger.

I've achieved this using browser zoom which is a fudge and I can't expect my users to do this. I will be plotting points on the map too, so using browser zoom will just make all the point markers massive too.  Ideally I want to make the map bigger, and leave the markers, copyright statement, zoom control etc all the same original size.

p.s. This question seems to be similar, but the recommended actions don't seem to be compatible with my situation.


texts: What Are ArcGIS Client and ArcGIS Portal?

texts:
I can understand what does it mean when people are talking about ArcGIS Server but not understanding what is the ArcGIS Client and what is the ArcGIS Portal for?

Can you please let me know what are these two concepts?