texts: OL-Cesium improve tileWMS quality in very high zoom level

texts:
I'm developing an application which is based on OpenLayers v6.5.0. OL-Cesium 2.11, Cesium v.177 and GeoServer v2.17. The scale of the map view is very large. The camera height is only 20 meters. I use tileWMS layers and their quality is not so good. The tiles are blurried.
The code in OL:
        var wmsLayer = new ol.layer.Tile({
    visible: true,
    source: new ol.source.TileWMS({
      url: 'http://localhost:8080/geoserver/work/wms',
      params: {'FORMAT': 'image/png',
               'VERSION': '1.1.1',
               tiled: true,
            "STYLES": '',
            "LAYERS": 'work:sample_polygons',
            "exceptions": 'application/vnd.ogc.se_inimage',
         tilesOrigin: -4.47449493408203 + "," + 42.4401245117188
      }
    })
  });

I tried to change the interpolation method in GeoServer, but without any results.
Is it possible to get better quality?  Do you ahve any suggestions to improve the visibility? I also tried with WFS, but it's very slow. The view will be changed often (like a car navigation), so the performance is very important.


texts: How to remove '0' values from the text graph in QGIS

texts: I am trying to do some distribution maps using QGIS with text diagrams. The problem is that the graph shows also all the cases with No data or '0'. I do not want these in my graph. Any ideas where I can find the function that removes the 0 values from the graph?


texts: Split polygons into equal squares using custom QGIS tool

texts:
I am trying to split polygons into equally sized pieces using a grid. The polygons are all image segments derived from 2.4 meter satellite imagery. So each polygon is a grouping of 2.4m x 2.4m squares. I want to produce a QGIS processing tool to simplify my current workflow of individually running the "Create Grid" and "Split with Lines" QGIS processing tools. The workflow should also edit the selected polygon in the existing layer, not create a new layer.

Example input polygon (with the polygon to be split selected):

Expected output from processing tool:

from qgis.core import *
from qgis.gui import *
import qgis.utils
import processing
import re
from PyQt5.QtCore import *

#the spacing of the cut grid
cell_size = 2.4

#get current layer, selection, CRS from QGIS map canvas
layer = qgis.utils.iface.activeLayer()
selected = layer.selectedFeatures()
crs = qgis.utils.iface.activeLayer().crs().authid()

for lay in selected:
    #get the ID of the feature we've selected in QGIS map canvas
    id = lay.id
    print("working on: " + str(id))

    #get the extent of the selected feature
    x_max, y_max, x_min, y_min = re.split(":|,",  lay.geometry().boundingBox().toString().replace(" ", ""))
    extent = x_min + "," + x_max + "," + y_min + "," + y_max
    print(extent)

    #create our grid in memory
    grid_parameters = {"TYPE":  1,
                                    "EXTENT": extent,
                                    "HSPACING": cell_size,
                                    "VSPACING":cell_size,
                                    "HOVERLAY": 0,
                                    "VOVERLAY": 0,
                                    "CRS": crs,
                                    "OUTPUT": "memory_grid"}

    grid = processing.run("qgis:creategrid",  grid_parameters)

    #split the selected feature, store the results in memory
    split_parameters = {"INPUT": layer.getFeature(id),
                                    "LINES": grid["OUTPUT"],
                                    "OUTPUT": "memory_split"}

    split = processing.run("qgis:splitwithlines", split_parameters)

    #delete the original feature,  add the split results to the original layer

with edit(layer):
    layer.deleteFeature(id)
    layer.addFeatures(split["OUTPUT"])

When I run this code I get an error on line 39 (split parameters dictionary) that reads: "TypeError: QgsVectorLayer.getFeature: argument 1 has unexpected type 'builtin_function_or_method"

I have tried several different approaches, including directly feeding my selection, the entire layer, layer.getFeatures(), etc. but nothing has been an acceptable input for the Split with Lines tool.


texts: Unable to join double type data into a label expression

texts:
I'm struggling to include the field data from a double type attribute in a label.
I've managed fine to pull in the data from the "Code" and "Features & Remarks" columns... I also wanted to encase the "Code" field in parentheses followed by a space, so used the following;
'('+"Code"+') '+"Features & Remarks"

Which also works fine when the latter column is empty. Both columns are QStrings.
Now I'm also trying to pull data in from another column "Depth of Burial" which is a double type. As a note, either "Depth of Burial" or "Features & Remarks" is always NULL - they never both have data in a given row, but often both are NULL.

'('+"Code"+') '+"Depth of burial [m]"+"Features & Remarks" gives me no labels anywhere.
'('+"Code"+') '+(coalesce("Depth of burial [m]","Features & Remarks")) only gives me labels where there is data in "Features & Remarks".
'('+"Code"+') '+(coalesce("Depth of burial [m]","Features & Remarks",' ')) displays all labels correctly EXCEPT rows with "Depth of Burial" data - they have no label.
I have also tried concatenate and if statements. The only way I could display the "Depth of Burial" column data was to either call it on its own or in the following;
if("Depth of burial [m]"=NULL,'('+"Code"+') '+"Features & Remarks","Depth of burial [m]")

However this one did not show any labels other than the "Depth of Burial" values.
My ideal aim to generate labels that are all prefixed with the "Code" column in parentheses then contain either the "Depth of Burial" value or the "Features and Remarks" column depending on which has data for a given row.


texts: Generating bus network segments between stations

texts:
I have a network I downloaded from OpenStreetMap. I created bus station points on it and I want to create segments between each two successive stations, each segment with a start_station & an end_station. I tried with the network plugin in QGIS,but it takes too long and the software stopped responding.
I created a small network and it worked but not the way I described, it just cuts the lines.
Is there any way to automatically create segments with start and end information (I have an empty segment table) ?
I'm using PostgreSQL & QGIS.


texts:
When I run qgis (version 2.14) from the command line in Ubuntu 14.04 LTS I get a Segmentation fault (core dumped) (detailed error messages included below). However QGIS opens and runs perfectly when I launch it from the Applications launcher. QGIS has been installed using the standard Ubuntu repositories. I have tested the suggestions outlined here, but they have not resolved the issue.

Error Messages output to terminal:

Warning: loading of qgis translation failed [/usr/share/qgis/i18n//qgis_en_IE]
Warning: loading of qt translation failed [/usr/share/qt4/translations/qt_en_IE]
Warning: QCss::Parser - Failed to load file  "/style.qss"
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory
Warning: QFileSystemWatcher: failed to add paths: /home/dmci/.qgis2//project_templates
Warning: QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
Warning: QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
Segmentation fault (core dumped)

What is the solution if it is caused by the following issues:

Warning: QCss::Parser - Failed to load file  "/style.qss"
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory


texts: Shortest distance from pgrouting with cost not being length: optimal solution

texts:
I'm using pgrouting shortest_path_astar with a complicated cost function. It gives back the edges, vertices and costs.
I would like to get the total distance of this shortest path (i.e., the sum of lengths of edges, not the sum of costs of edges).

For now, I use:

SELECT SUM(t2.length) FROM (
    SELECT edge_id FROM shortest_path_astar(..., TRUE, TRUE)
) as t1,
routing.edges as t2 where t1.edge_id = t2.edge_id

Is it the most efficient way to get the distance? I need to run this query many times and I want to be sure to do it in the fastest way.


texts: Arc Python add in - dynamic combo populate

texts:
I am attempting my very first python add in. what I would like it to do is look at a feature class, look through the town field. when the user selects a town I want the next combo box to populate with the LABELTEXT field with all of the values in that town and when a LABELTEXT is selected zoom to that bad boy.

I dont know how to get the town return into the ComboClass2 class or build the query to filter based on the town result

class ComboBoxClass1(object):
    """Implementation for addin2_addin.combobox (ComboBox)"""

    def __init__(self):
        self.editable = True
        self.enabled = True
        self.dropdownWidth = 'WWWWWWWWWWWWWWWW'
        self.width = 'WWWWWWWWWWWWWWWW'

    def onSelChange(self, selection):
        layer = arcpy.mapping.ListLayers(mxd, "block_cards", df)[0]
        a = arcpy.SelectLayerByAttribute_management(layer, "NEW_SELECTION", "town = '" + selection + "'""'")
        return a
        df.extent = layer.getSelectedExtent()
        arcpy.RefreshActiveView()

    def onFocus(self, focused):
        global mxd
        mxd = arcpy.mapping.MapDocument('current')
        global df
        df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
        layer = arcpy.mapping.ListLayers(mxd, "block_cards", df)[0]
        arcpy.SelectLayerByAttribute_management(layer, "CLEAR_SELECTION")
        self.items = []
        values = [row[0] for row in arcpy.da.SearchCursor(layer, ["town"])]
        for uniqueVal in sorted(set(values)):
            self.items.append(uniqueVal)

class ComboBoxClass2(object):
    """Implementation for addin2_addin.combobox (ComboBox)"""

    def __init__(self):
        self.editable = True
        self.enabled = True
        self.dropdownWidth = 'WWWWWW'
        self.width = 'WWWWWW'

    def onSelChange(self, selection):
        layer = arcpy.mapping.ListLayers(mxd, "block_cards", df)[0]
        arcpy.SelectLayerByAttribute_management(layer, "NEW_SELECTION", "town = '" + ComboBoxClass1.onSelChange() + "' AND LABELTEXT = '" + selection + "'" )
        df.extent = layer.getSelectedExtent()
        arcpy.RefreshActiveView()

    def onFocus(self, focused):
        global mxd
        mxd = arcpy.mapping.MapDocument('current')
        global df
        df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
        layer = arcpy.mapping.ListLayers(mxd, "block_cards", df)[0]
        arcpy.SelectLayerByAttribute_management(layer, "CLEAR_SELECTION")
        self.items = []
        values = [row[0] for row in arcpy.da.SearchCursor(layer, ["LABELTEXT"])]
        for uniqueVal in sorted(set(values)):
            self.items.append(uniqueVal)


texts: How does the audience visualise a WFS in Geoserver?

texts:
I recently started learning Geoserver. WMS is straighforward but in case of WFS, I have read a lot of user manuals and training pages but I cannot figure out how does the actual visual map served out to the audience in the end?

I read everywhere that we make a query through an URL and get an XML document as output but i'm sure this XML is not for the audience.

The audience will be making queries in some point and click interface next to the map and directly looking at the results in the map right? So how is this interface served to them?

Everywhere I read its the same- queries through URL and output in the form of XML. This cannot be what the audience is supposed to see?

Can someone please point me to a resource which explains this? Or does this have something to do with coding the visual final map with Java separately?


texts: Moving labels with "easy label engine" tool of QGIS

texts:
I am using QGIS 2.6 and looking for an similar tool like "converting label to annotation" as you can find it in ArcGIS Desktop.

The "easy custom labeling" Tool in QGIS seems to come close to the ArcGIS solution. However, after I created my custom label layer I am not able to move my labels at the required location. Even the leaders are pointing in different directions and are not linking the label and the feature on the map.

Especially if features are clustered in one region it is helpful to drag them a little bit apart to make the map clear.

Is there another way to individually format and locate my labels?


texts:
After running a ST_MakeValid() on a table with about ~400k records, I receive the following error:

update "parcel15B"
set geom = ST_MakeValid(geom)

ERROR:  could not extend file "base/16390/655718": wrote only 4096 of 8192 bytes at block 95300
    HINT:  Check free disk space.

I have run this query before on larger tables with no problems.  How should one check in which directory to free up space or is there another way to rewrite the same query which would use up less space?


texts:
I have been trying to write a custom application to generate contour from QGIS.
This is my starting code:

import os;
from qgis.core import *;

This is the error i am getting:

Traceback (most recent call last):
  File "D:\Projects\Python\test\script.py", line 2, in <module>
    from qgis.core import *;
  File "C:\Program Files\QGIS Wien\apps\qgis\python\qgis\__init__.py", line 26, in <module>
    import sip
ImportError: No module named sip

Now, i'm stuck here. Don't know what to do.


texts:
I'm using osm2pgsql to import the entire planet database. I've followed the instructions from the switch2osm (https://switch2osm.org/serving-tiles/manually-building-a-tile-server-14-04/) page and used the following command:

osm2pgsql --slim -C16384 --cache-strategy sparse -d osm_2015 --number-processes 4 planet-latest-september-5.pbf

Note that I am doing the import on a virtual machine (VM). Other details are as follows:

Planet file size: 29GB
RAM: 24GB
CPU: 8 X Intel(R) Xeon(R) CPU X5650  @ 2.67GHz
4TB disk mounted remotely
OS: Ubuntu 14.04
psql (PostgreSQL) 9.3.9
PostGIS Version 2.1.2

I've completed importing but osm2pgsql took 1817529 seconds overall to import the data, which comes to about 21 days!

My question is, what can I possibly do to optimize/minimize the import time in the future using the specifications that I've listed above? Please note that I'm really new to this.


texts:
I'm using python 2.7 and app engine. To do bounding box we used geomodel but it executes more then 5 seconds in table with 350 records. It's to slow.
Can you please suggest better solution ?
Is there online solution to store data and then execute bounding box search ?


texts: Parcel Width by Line Segment Closest to Street

texts:
My end goal is to calculate parcel widths (polygons). I use ArcGIS 10.6 but can also use QGIS if a solution requires it.

please note not all parcels are regular shapes, some are irregular

I converted my parcel polygons to polylines and calculated the length of each line segment.

I am now stuck on how to select the line segment closest to the road center-line and use that length for the parcel width (either temp join and add new field with field calculator or???)
the image below is an example, the selected segments would be the ones I need to use length of and write that value to its corresponding polygon feature-- road center line is the dark grey)

For parcels on corners that have two line segments facing two different streets I need to find the smallest value (narrowest segment)--

I have over 30k parcels I cannot manually go through each polygon and measure the width and add a value to a field.


texts: How can I export/calculate the accumulated explained variance per principal component from a PCA done with the Orfeo Tool box in QGIS?


texts: Iterate through all fields in attribute table and multiply by field

texts:
I have a table with a whole bunch of census variables (race, age, education, etc). I want to multiply all of these fields by a factor that I calculated. For example:

Field1 has values of 10,20,30,40

Field2 has values of 120,340,230,210

Field3 has values of 500,3402,0342,9402

Multiplier field has values of 0.1, 0.2, 0.3, 0.4

I want to 'iterate' through all the columns and multiply them by my multiplier field. Traditionally, I would use field calculator and do !Field1! * !Multiplier!, but I am trying to avoid having to do this for 200+ fields.

Any suggestions?

I am using ArcMap 10.2.2.


texts: Spatial join drops values from fields in ArcCatalog

texts:
I'm running ArcEditor 10.0 SP5 with the Spatial Join patch installed. I am aware that spatial joins tend to fail on larger datasets, so I have  two polygon feature classes with about 700 features each. When I use Spatial Join from the toolbox in ArcMap (with join features HAVE_THEIR_CENTRE_IN target features, keep only matching), my output contains 600 features, with the attributes from my join features nicely associated with my target features, as expected.

I perform the same operation, using the same data, in ArcCatalog, and it decided to NULL some of my fields from the join features. Note I said some - before I installed the patch and SP4, doing the spatial join in Catalog would result in the output having the correct number of matches and all the attributes from the target features, while all the attributes of the join features would be null. After patching, roughly half the attributes from the join features are NULL, so it did improve somewhat.

I'd like to know if anyone else has been having this problem after patching, because as I run all my models in Catalog, I now have had to split one of my models in half, run the first part, open ArcMap, do the Spatial Join, and then carry on in Catalog.


texts: Mapserver / Default to a GetCapabilities version if not set

texts:
We have some users with a legacy client that does not use the "version" parameter in the GetCapabilities request. However they cannot handle WMS 1.3.0 (and the CRS parameter) yet, which our installation defaults to. Hence, in a transition phase I would like to default to WMS 1.1.1 - if possible for a single map service, otherwise for the whole installation.

Is there a setting in the mapfile or mapserver configuration to achieve this?


texts:
I am trying to work with GRASS in QGIS 3.10.1. I went to "Manage and Install Plugins", searched for it, and checked the box for GRASS 7. That brought up an error message that says "Grass was not found in '/use/local/opt/osgeo-grass/grass-base' - I can't see if the error message says more, because it is timed and disappears within a couple of seconds.

After that message, I go to Plugins > Grass and all of the options to open a new mapset, etc. are greyed out. When I got to Grass Options > General the default location is selected (/use/local/opt/osgeo-grass/grass-base) and underneath it says "Currently selected location is not valid".

I downloaded a new version of GRASS and installed it on my Mac as I would any other program (dragged it to the Applications folder), but I don't know if that was necessary or what to do next, and I have not been able to find documentation that addresses this issue.


texts: Skewing/rotating a plot in matplotlib.Basemap

texts:
I am currently plotting data onto an orthographic projection in matplotlib's Basemap. I would like to rotate or skew the plot to a 23.5 degree angle, corresponding to the Earth's axial tilt.

The map I am using is

`map = Basemap(projection='ortho',lon_0=-45,lat_0=30,resolution='l')`


texts: Splitting area polygons into line segments in QGIS for using to edit OpenStreetMap

texts:
I've got the following vector Shapefiles (not .shp format but some .xml formats):
.gml-File of Linz, .xsd-File of Linz
They represent the areas of the statistcal districts of Linz, Austria. I want to them into line segements, where each line segment expands from one intersection to the next intersection of a the district's boundary nodes.
These line segments finally should be exported into a .shp or even better into a .gpx File (QGIS-lines should be tracks and trackpoints within the .gpx).
The reason is, I want to import this .gpx into JOSM, an editor for OpenStreetMap, to use them for creating and improving boundaries (in this example the districts of Linz). Therefor the lines have to be split from intersection to intersection as I explained above.
Now to my question: How to do this mostly automatically using QGIS? I already found out how to do it with several manual steps. But that's not very comfortable if the number of source polygons is much higher compared to the 16 of Linz.
My steps are:

Add Vector Layer, choose .gml file
Vector > Geometry tools > polygons to lines
Toolbox > Grass > v.clean: "bpol"-tool
now most of the line-segements are created but still there are some individual lines, sharing the same start/end-vertex which should belong
to to the same segement, for example the node on the bottom right (see Screenshot 2)
manual selection of 2 lines, Toggle Editing, Merge Selected Features
click on vector name, Save as..., .GPX, next dialog: Layer name= "tracks" (to create a GPX-track with trackpoints instead of single waypoints or Routepoints)

Edit:
The lines should be split at each corner (= where the line contacts with at least 2 other line segments). And there shouldn't be overlappping duplicate line segements above each other in the resulat, the duplicates should be removed.


texts: Open source library to display offline shapefiles in Android?

texts:
I am involved in developing a Android application that needs to be able to make use of Esri Shapefiles. Hardware used will be 7" Android rugged tablets running Android 4.2 or later.  It is an offline application, the shapefiles gets loaded onto the device’s SD Card. The application would show a map with shapes representing different premises that needs to be audited. The user would then click on a shape representing the premises and I need to get the data for to the clicked shape to identify which premises is being audited. I also need to make sure that the user’s current position falls within the boundaries of the shape. The user will only pan and zoom on the map. Map needs to be centred on the users current position and the current position needs to be indicated. Audit data is synced via Wi-Fi once the user is back at the office as mobile carrier coverage is poor in some of the areas.

Please recommend a free/open source library with which this can be accomplished.


texts: Updating ArcGIS Online with Safe FME without Edit Mode turned on

texts:
I have an ArcGIS Online Group with approximately 60 Layers that need updated weekly from our Fiber Network. I have done some research on updating the ArcGIS Online Layers but the issue is having to change the settings to "Allow Edits."

This is causing a couple issues. The people using the maps should not be allowed to edit these particular layers, also it is causing confusion when I need to update and they see 60+ layers that can be edited. The second issue is the time it takes every week to update these layers when I have to go to each layer, turn on edit mode, update, then go back through and turn edit mode off on each of the layers. I am hoping there is away around this in some fashion.


texts:
How can I change the alias of a dbase table without completley renaming the file?

I've tried right clicking the the file, opening properties, and changing the alias, but it will not allow me to edit the alias or name this way.
Any suggestions?


texts: Documentation on the format of a Leica SOL file

texts:
I have a file in Leica's SOL Sensor Trajectory Format (the filename has
the pattern yyyymmdd_HHMMSS.sol) which I'd like to read.  Can anyone
point me to documentation on the format?  Supposedly it stores
information on the trajectory of an aircraft (similar to an sbet file).
I've got as far as determining that there are 184 bytes per record and
locating where in the record the latitude and longitude are stored.
However, I'd prefer to avoid guessing what the other fields are.


texts: editor clip with multiple selected features

texts: I have a layer where the creator drew overlapping polygons instead of clipping or cutting them out, (30,000) polys and 10,000 overlapping after topology was run. I do not want to manually fix one at a time. I have a way of selecting all the overlaps (through intersecting the layer by itself) but arc does not allow an editor tool to clip with multiple features selected (as far as I know) and the clip (Analysis) tool will not preserve the polys outside.


texts: I cannot manage to export coordinates to a shapefile using Python

texts:
This is the test code I have written:
import shapefile
w = shapefile.Writer(shapefile.POLYGON)
w.poly(parts=[[[1,5],[5,5],[5,1],[3,3],[1,1]]])
w.field('FIRST_FLD','C','40')
w.field('SECOND_FLD','C','40')
w.record('First','Polygon')
w.save('shapefiles/test/polygon')

However, it does not work and I am prompted with an error:
Traceback (most recent call last):
  File "C:\src\Python\coordinates.py", line 33, in <module>
    w = shapefile.Writer(shapefile.POINT) #shapefile.POLYGON)
  File "C:\Python39\lib\site-packages\shapefile.py", line 1293, in __init__
    self.shp = self.__getFileObj(os.path.splitext(target)[0] + '.shp')
  File "C:\Python39\lib\ntpath.py", line 204, in splitext
    p = os.fspath(p) TypeError: expected str, bytes or os.PathLike object, not int

What seems to be the problem?


texts: How can I find the farthest point from a set of existing points?

texts: I have a set of points as a shapefile and I want to find (the coordinates) of a new point which will have the longest possible distance from each of the existing points. Is that possible? If yes, is there any sample VB code?


texts: How to render vector data with muliple geometry types to georefrenced raster

texts:
I am using OSM vector data which has been converted into shapefiles.  I have polygons representing buildings, landuse and lines representing roads as shown bellow:

I want to assign some symbology to the features like blue color for the buildings, green for landuse and white color for the roads with different width and convert them into a raster file, some thing like this:

I know that there are several tools for rending vector data into raster like mapnik and Maperitive etc.. but I want to do this task independent of such tools in a open source environment. I tried gdal_rasterize, the problem with it is that it only accepts one geometry type at a time, I can cannot feed multiple geometries like polygon and lines together. I can use it separately for each geometry type and then somehow merge all the rasters but an other problem in this approach is that I cannot specify width to the line, rather it will take the line with single pixel width.

Some folks have suggested me to simply export the Map to Image by setting the background of canvas as black in QGIS, but I need georeferenced maps which doesn't seems to be possible with this approach.


texts: How to recognize original group from unified set of polygons in R

texts:
I have simple question. How can I know the original group after apply z = sf::st_union(x, y)?

I have 2 sets: length(x[[1]]) = 4253, length(y[[1]]) = 91. Finally, I have z of lenght 411 but don't know which polygons came from which input set, x or y. At the end, I need to leave the x group only.

Can I set some attribute for x and y before union? If so how? Maybe there's simpler way to achieve it?


texts: Is it possible to install GeoServer On Google Cloud?

texts: How can I can install GeoServer on Google Cloud?


texts: How to reproject point if I only have the source TIFF extent

texts:
I made a point shapefile (using PySHP in Python) that represent objects detected through AI.
This shapefile has no CRS and each point is X,Y relative to the image it was processed from (actually a TIFF converted to JPG)
ex : point1 = (200,300) ; point2 = (600, 500)

I have the original TIFF and I can extract its information using some Python library (Rasterio):
tiff shape : (7579, 13887)
EPSG:4326
BoundingBox(left=-73.3363245134031, bottom=45.18278294324435, right=-73.33487807770662, top=45.18357239348942)

What is the correct process to build the point shapefile in order for its extent to be the same as the original TIFF?
-Should I modify the EPSG and boundaries of the shapefile so it recover the TIFF?
-Should I reproject each point while creating the SHP using pySHP? It seems this is the legitimate method, but how can I recalculate each point coordinates knowing only the EPSG and the boundaries of my TIFF?
EDIT
I was able to modify the pixel Points coordinates by using the rasterio.transform method, the SHP file works on QGIS, and the coordinates are almost aligned, but not exactly.
I tried many combination but never the shape exactly cover the TIFF extent...
import rasterio
from rasterio.plot import show
from rasterio.windows import Window
import shapefile

flat_list = [item for sublist in B for item in sublist]

w = shapefile.Writer('03-c')
w.field('name', 'C')

image = '/content/drive/My Drive/ML/03.tif'
with rasterio.open(image) as src:

    for i in range(len(flat_list)):
      ### X & Y is the center of the rectangle in flatlist[]
      X = (int((flat_list[i][0])/2+flat_list[i][2]))
      Y = (src.shape[0] - int((flat_list[i][1]+flat_list[i][3])/2))
      Point = src.transform * (X, Y)
      w.point(Point[0], Point[1])
      w.record('linestring1')
    w.close()


texts: How to use IRelationalOperator2 and GeometryBag

texts:
I want to use the IsNear method of IRelationalOperator2. The documentation says that GeometryBag supports the IRelationalOperator2 interface. But this just doesn't work and results in an exception
"... unable to cast COM object ... No such interface supported..."

IRelationalOperator2 relationalOperator = (IRelationalOperator2)geometry;

The same code works fine with IRelationalOperator but there is no IsNear method:

IRelationalOperator relationalOperator = (IRelationalOperator)geometry;

What is wrong - the code, the documentation or is it a bug?
"geometry" is a geometry of geometry type esriGeometryBag and contains some polylines. I used the straight cast to get the .NET exception.


texts: Why am I missing the the geometry column (geometry_columns)?

texts: Can anyone tell me what could I be doing wrong? I have installed OpenGeo and started doing the exercises. I noticed that every time I create a database through the pgAdmin, the geometry column (geometry_columns) is not created. Did I missed a step?


texts: Extracting contours as shapefile from DTM (tif) in QGIS?

texts:
I am looking to convert a tif. file from the Scottish Remote Sensing Portal (Scottish LiDAR) into contours which can be used for a surface in civils 3D.

I have tried this myself with a full DTM and a clipped DTM and when I try to extract contours to a shapefile (.SHP), I get the message:

ERROR 6: GDALDriver::Create() ... no create method implemented for this format.

I have very little experience with QGIS but I know that this can be achieved in ArcGIS.

I am still running version 2.18.27 as well but will gladly upgrade if necessary.


texts: How to change layer transparency of wms layer in arcgis android sdk

texts:
I wish to overlay a transparent WMS layer onto a basemap in arcgis android. Here is my code snippet. It loads only the BaseMap but not the WMS layer, i tried on Online Arcgis and it works.

    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_home, container, false);

m_MapView = (MapView) rootView.findViewById(R.id.map);
        ArcGISDynamicMapServiceLayer tileLayer;
        WMSLayer weatherlayer = new WMSLayer ("http://wms.openweathermap.org/service?");

tileLayer = new ArcGISDynamicMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer");
        Envelope env = new Envelope(103.5, 1.52,
               104.22, 1.18);
        m_MapView.setExtent(env);
        m_MapView.addLayer(tileLayer);

        String[] layers = {"precipitation"};
        weatherlayer.setVisibleLayer(layers);
        weatherlayer.setOpacity(0.5f);
        m_MapView.addLayer(weatherlayer);


texts: How can I add a popup on hover for a graphic using the ArcGIS JavaScript API?

texts:
I created this JSFiddle for an example.

Currently, a user needs to click on the graphic point to see the attribute. How can I make it so the user only needs to hover over the graphic for the popup to open?

Thanks.


texts: 10.3 js callback appended to query call not working

texts:
I have two 10.3 ags servers that i thought were the same. But on one i can send this request to the rest api endpoint and it does not work:

http://xeballl03/arcgis/rest/services/Integrator/RouteMap/MapServer/3/query?f=json&where=STATE_NAME%3D%27Hawaii%27&returnGeometry=true&spatialRel=esriSpatialRelIntersects&outFields=*&callback=dojo.io.script.jsonp_dojoIoScript5._jsonpCallback

returns

dojo.io.script.jsonp_dojoIoScript5._jsonpCallback({"error":{"code":400,"message":"Failed to execute query.","details":[]}});

but on my other 10.3 server this does work

http://xeballl03/arcgis/rest/services/Integrator/RouteMap/MapServer/3/query?f=json&where=STATE_NAME%3D%27Hawaii%27&returnGeometry=true&spatialRel=esriSpatialRelIntersects&outFields=*

the call with the extra param in the url is being generated by a client app that i have (js api 2.0). How is that extra part generated? is it a setting in the js api?


texts: Automating line adjustment to a point or a series of points in ArcGIS Suite?

texts:
There are multiple toolboxes in ArcGIS Suite that deal with geographic transformation and correction, such as Spatial Adjustment, Rubbersheeting, and Snap. I'm not sure how to best use a tool to correct my line to a series of points as shown in image #3:

1) is what I currently have;
2) is what I get when I use the Snap tool; and
3) is what I want.

The points are considered accurate geographic "anchors" for the lines, but don't otherwise share any field attributes with the lines. I have access to a list of all of the point coordinates.

If I snap the line without vertices with the Snap tool, the tool doesn't work at all, even with a high tolerance set (higher than the distance between the line and the point).

I'd like to stick to ArcGIS Suite, and to use something that has a corresponding arcpy tool. I realize that I can move the anchors/delete the middle anchor (vertex) to get the shape in Figure #3, but I plan on automating this process because I have hundreds of lines and thousands of points.


texts: TurfJS Intersect not functioning with real coordinates the way it does with regular numbers

texts:
I have function that takes a users coordinates and tests it against a polygon. When I create the fence with whole numbers such as [3,2], [3,4],[5,6],[3,2]. My function returns correctly. I tried inputting real data to create a geofence and used the chrome devtools to simulate a custom geolocation that was within the geofence. However, with real coordinates ( 40.225928, -111.660785) it does not return that the point is within the polygon. Below is my object and method.

const fence = {Fence1: turf.polygon([
  [[40.225,-111.658], [40.2229,-111.664],
  [40.223,-111.667], [40.225,-111.668],
  [ 40.226,-111.666], [40.225,-111.658]]
 ])
};

module.exports = {
check_fences: (req,res,next) => {
    var pt1 = turf.point([req.body.latitude, req.body.longitude]);

for (key in fences) {
  if(turf.intersect(pt1, fences[key])) {
   console.log(key)
   fence = key
 }
}
 if(resort) {
    return res.status(200).send(resort)
} else {
    return res.status(200).send('NOT IN FENCE')
}

The req body object is coming in as:
{ latitude: 40.224411, longitude: -111.66478 }

Developing with ReactJS

I am at a loss for why this is not working.


texts: Calculate the number of points in a freehand polygon ArcGis Javascript API

texts:
I'm drawing a free hand polygon on my map. Now I want to calculate the number of points found in that polygon.

I have done this code, which my now is giving me the number of points found in the map extent rather than the polygon. Now I'm stuck how I'm going to do it since I am new to JavaScript.

function computeZonalStats(evtObj) {
        var geometry = evtObj.geometry;
        map.showZoomSlider();
        map.graphics.clear();

        var symbol = new SimpleFillSymbol("none", new SimpleLineSymbol("dashdot", new Color([255, 0, 0]), 2), new Color([255, 255, 0, 0.25]));
        var graphic = new Graphic(geometry, symbol);

        map.graphics.add(graphic);
        toolbar.deactivate();

        var features = [];
        features.push(graphic);

        var featureSet = new FeatureSet();
        featureSet.features = features;

        var count = 0;
        dojo.forEach(featureLayer.graphics, function (feature) {
                count++;
        });
        alert(count);
    }

Any idea how I could do this please?


texts: QGIS cannot open layer properties and crashes

texts: I have loaded raster and trying see the properties from the layer explorer it is crashing (qgis-2.18.20). I have deleted .qgis2 folder as well


texts: Saving objects to Storage -- what is a "file-like object"? (Descartes Labs)

texts:
I am trying to save a numpy array, the output of a Descartes Labs Platform Workflows pipeline, to Storage. The docs for storage.set and storage.set_file state that the second argument should be a file name or "file-like object". However, when I call storage.set(fname, X) where X is the numpy array, I get the error:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
The same happens when I try to save a GeoDataFrame.
What should the object's type be?


texts: Loading multiple SpatiaLite layers into a single database

texts: I have many SpatiaLite layers, each in a separate database. I want to load all these SpatiaLite layers into a single database. How can this be done?


texts: How does ArcGIS Pro 1.0 choose default color for first layer added to Map?

texts:
When I add my first vector dataset to the Map in an ArcGIS Pro 1.0 project that I created using the Map.aptx project template, it always comes in using a gaudy brown color like in the graphic below.

Doing the "equivalent" in a Blank Map of ArcMap seems to choose a random pastel color which is much more pleasant to look at.

How does ArcGIS Pro 1.0 choose the first color to apply?  Perhaps it can be configured to something more pleasant.


texts:
I went through the oL3- Cesium examples provided on their website.
There was an example here which comprised of selecting the features in 2D view and the same will be reflected in the 3D one as well. But, when I went through the code, there was no interaction defined as such. They were extracting the feature present on the highlighted/ clicked coordinate,if any, and were applying styles.

What I mean to say is, there was no predefined interaction for selection thing, like it is in OL3 documentation here.
So I wanted to ask are there actually no predefined interactions as of now, in this OL3-Cesium integration or am I missing out on something ? I primarily followed those examples provided on their website to understand the working.

Update :

In the example I provided above,they extracted the feature, if any, present at the clicked coordinate.That's reflected in 3D view as well.
But when I try to add Ol3's select interaction in this :

 var selectClick = new ol.interaction.Select({condition: ol.events.condition.click});
 select = selectClick;
 if (select !== null) {
  map.addInteraction(select);
  select.on('select', function(e) {
  select.setStyle(selectionstyle);
 });
}

Features in 2D are being selected fine but it's not reflecting in the 3D view. So are these interactions not yet supported in Ol3-Cesium or I'm doing wrong?


texts: Using leaflet or google map to create layer of multiple attributes

texts:
I am creating a map with leaflet layer. Right now, each marker has three different attributes and I would like to create layers base on these three attributes (Model, group, and status). I am able to show only all the models, only all the groups, or only all of the status.

THE NEED : I was wondering if anyone knows how to create layer that can do AND filter? So I can filter something like show all the Model A in group 2 and status is active? Or show all the model B and status are active?


texts: Change Leaflet Marker Icon(.png) color programatically

texts:
I have a list of markers. I am assigning an icon to each marker and creating that icon from a black .png circle. I want to change color of that marker based on input value from user.

I have searched this on Google and found out that we can apply filter to PNG to change color but its not working.
Any other ideas ?

The problem is I have been provided the circle PNG from client and I have to use that.


texts: Postgis intersection behaves strangely when getting closer to poles

texts:
We use Postgis for Django to locate the objects inside a certain viewport. It works great at the equator, but the farther we move, the more distorted the viewport becomes.
Here is the result (the red line shows the "ignored area"):

Same on the southern hemisphere:

We retrieve the viewport from Maps, build a Polygon and intersect it with the coordinates of the objects:
viewport = Polygon.from_bbox((southeast_lng, southeast_lat, northwest_lng, northwest_lat,))
result = queryset.filter(coordinates__intersects=viewport)

The coordinates field in the object are defined as following:
coordinates = models.PointField(_('Coordinates'), srid=4326, null=True, geography=True)

Additional info:

The "missed area" depends on zoom level and vicinity to the pole
Setting geography=False fixes it! But then we have problems at the 180th meridian.

Does anyone know what might be causing this?


texts: NearestNeighbor producing bad quality tiles

texts:
I have been using Bicubic interpolation to render some basemaps because this produced good results. This is what I get when using Bicubic:

However, when using Nearest Neighbor interpolation, a white line pattern shows up. So lines and labels seem to be "split". This is only a slight change but it makes the map pretty much unreadable:

I know that theoretically, Bicubic produces better results than NearestNeighbor. However, differences in my case are too big and my guess is that I am doing something wrong in the layer setup that generates the rendering issue when using Nearest Neighbor.

If possible, I would like to use NearestNeighbor because it requires less resources.

Can anybody provide some feedback on what I'm doing wrong with this basemap?

P.S. Edit: Have removed all references to GeoWebCache in this question because I realized that the issue has nothing to do with GWC but with the interpolation method itself.


texts: Adding pictures to the shapefile objects in QGIS/QField?

texts:
Here is the thing, I want to add pictures that either are georefered (BY GPS Camera) or added manually to both new created objects and existing objects.

Now to be clear I do not mean adding pictures to the map canvas itself, but the objects themselfs. I want know how to do this both in QGIS (by adding local images from a computer) and Qfield (by taking a picture from the Smartphone/tablet camera which is then georefered.

I have made an illustration about what is going to happen, this is actually bigger than the questions itself. Because I am gonna ask some other question compared to this. What I ask in this questions is marked in orange.

How do I do this?


texts: Reverse Geocode latitude longitude with Geotools using Natural Earth Shapefiles in Java

texts: I am trying to perform reverse geocoding in Java using GeoTools and Natural Earth Shapefiles. I just want to pass latitude longitude and get the corresponding country name + state name. I have searched entire internet and all the posts on this forum but couldn't find an answer for my specific use case. I am not sure how to pass the latitude longitude value and use Natural Earth shape files to get the country name and state name. I don't want to display anything on the map. Just the country and state name would be enough.


texts:
I'm looking to use Odyssey to create an interactive introduction to various data layers on an interactive web map I've created using CartoDB.js. I'd like to have different data layers turned on / off each time the user clicks through an Odyssey slide.

From what I understand that this can be done in the odyssey.js code by calling the cartodb.js methods for hiding and showing sublayers. I've tried searching for examples of this but haven't come across any.

Can anyone provide a link to an example such as a Github GIST / bl.ock?

I was able to use a hack where I create a custom javascript event to be fired when the odyssey slides change. I then created a function that listened for the custom event and tracks the index of the current slide in the div.slides-container array. This way it is possible to tell what current slide the user is viewing and then call cartodb.js methods outside of Odyssey.js as needed.

A Gist of the code may be found here and a live version may be viewed here.

Ideally I'd like to cut down on the redundancy of this code and call cartodb.js methods for showing or hiding layers, setting SQL or CartoCSS of various sublayers of a layer when calling cartodb.createLayer().


texts:
How do I see the map on GPS as a background layer?

In QGIS, I could see the map which is converted from shapefile and raster data on QGIS with "Garmin Custom Map".

I need to do the similar thing through ArcGIS.

GIS: Arc info 10.1
GPS: Garmin GPS map 62sc

Any comment or advice is very helpful.


texts: date in shapefile created by geospatial python module appears wrong, but isn't

texts:
I noticed something weird when messing with the geospatial python's shapefile module (no complaints here, this module is awesome and the only pure python way to write shapefiles).

When adding date fields, the values appear to be written in the table correctly, but when I view them in any ArcGIS application, the dates appear wrong.  Using this simple code, I am adding a new date:

import shapefile
from datetime import datetime

test = r'C:\TEMP\Date_test3.shp'

w = shapefile.Writer(1)
w.point(-93.1, 44.1)
w.field('Date', 'D')

# todays date, but appears in table as 12/8/2014....Weird?
today = datetime(2015, 8, 7) #hard coded so the example is always the same
w.records = [[today]]
w.save(test)

When I view it in ArcGIS, it looks wrong:

I have also tried to input this as a string with no luck.  However, the value that is stored is correct.  When I read the shapefile:

# however, when I read it, it is indeed the correct value in the database
r = shapefile.Reader(test)

print r.records()[0][0]
>>>
2015-08-07 00:00:00
>>>

Is there a different way I should be passing in dates for the shapefile module?  Is this a bug specific to ArcGIS, or is something funky happening with the way shapefile is encoding the data.  I also opened up the .dbf in Excel, and it appears correct there too (I suppose this might indicate a bug with ArcGIS).  Does anyone know what may be going on here?

I am using ArcGIS 10.3.


texts: ArcMap 10 Layout View: search for elements and delete

texts:
I've to regenerate a single layout with data from each point feature. So, I wrote a VB.NET routine to clean the layout, searching for text element, selecting it and deleting it.
Well, the routine works just for some element and not for others.... Why?

Private Sub CleanLayout()

    Dim graphC As IGraphicsContainer = mxDocument.PageLayout
    Dim graphCSel As IGraphicsContainerSelect = graphC
    graphCSel.UnselectAllElements()
    graphC.Reset()
    Dim elem As IElement = graphC.Next
    While elem IsNot Nothing
        If TypeOf elem Is ESRI.ArcGIS.Carto.ITextElement Then
            Dim elemProps As IElementProperties = DirectCast(elem, IElementProperties)
            If String.Compare(elemProps.Name, "ELEM_VAR", True) = 0 Then
                graphCSel = graphC
                graphCSel.SelectElement(elem)
                graphC.DeleteElement(elem)
            End If
        End If
        elem = graphC.Next
    End While

    mxDocument.ActiveView.Refresh()
    graphC = Nothing
    graphCSel = Nothing

End Sub

The result is that there is still some text element named "ELEM_VAR" on the layout....

Thanks in advance for any help.
Software: ArcGIS 10 SP1 + VS2010


texts: What is the advantage to using a representation vs a layer file?

texts:
I understand that the representation stores the symbology inside of the geodatabase.  It creates it's own field for a RuleID.  I made a layer file that had 'unique values and many fields' and chose two fields illustrated in my screenshot.

This makes the analyst pick two fields in order to be attributed correctly.  When I make representation based off of this layer this is what appears in the Layer Properties.

I get what is going on between them.  With a representation it moves the symbology into a new field (rule ID) that is attributed when you create a new feature.  The problem I have is I want the original fields that made up the RuleID attributed.  The picture below shows the RuleID field based on what I created.  It's based off the Type of Facility and Status (not pictured).

Is there a way to attribute the original fields, but still have the symbology built in the GDB?  Am I better off using layer files and resourcing to the current GDB for every client? I'm using ArcGIS 10.1 and about to upgrade to 10.2.2 in a few weeks.


texts: Using UniqueValueRenderer on Point Feature Layer of ArcGIS API for JavaScript

texts:
I am currently working on adding layer legend to Map  But I am not able to execute it completely.  I have 2 feature Layers one of which is a point feature layer. And on the point feature layer I need to use unique value renderer but got no success .
My Code is
                var geoRouteFeatures1 = {
                "layerDefinition": null,
                "featureSet": {
                    "features": [],
                    "geometryType": "esriGeometryPoint"
                }
            };

            geoRouteFeatures1.layerDefinition = {
                "geometryType": "esriGeometryPoint",
                "objectIdField": "ObjectID",
                "fields": [{
                    "name": "ObjectID",
                    "alias": "ObjectID",
                    "type": "esriFieldTypeOID"
                }, {
                    "name": "IsDeviation",
                    "alias": "IsDeviation",
                    "type": "esriFieldTypeString"
                }]
            };

            var TransporterRoute = new FeatureLayer(geoRouteFeatures1, {
                id: 'TransporterRoute',
                mode: FeatureLayer.MODE_SNAPSHOT,
                outFields: ["*"]
            });

            TransporterRoute.hide();

            var renderer = new UniqueValueRenderer(null, "IsDeviation");

            //This function will be used to create symbols for each unique value
            function createSymbol(color) {
                var symbol = new SimpleMarkerSymbol();
                symbol.setOutline(null);
                symbol.setSize("4");
                symbol.setColor(color);
                return symbol;
            }

            renderer.addValue({
                value: "1",
                symbol: createSymbol("#57A509"),
                label: "Deviated Route",
                description: ""
            });
            renderer.addValue({
                value: "0",
                symbol: createSymbol("#F51610"),
                label: "Approved Route",
                description: ""
            });
            TransporterRoute.setRenderer(renderer);

            map.addLayers([tiledMapServiceLayer, ApprovedRoute, TransporterRoute]);

            dialog = new TooltipDialog({
                style: "position: absolute; width: 250px; font: normal normal normal 10pt Helvetica;z-index:100; transition: transform 2s;"
            });
            dialog.startup();

            CartographicLine = new Polyline(new SpatialReference({ wkid: 4326 }));
            CartographicLine.addPath(0);
            //TransporterRoute = new GraphicsLayer();
            //map.addLayer(TransporterRoute);
            var legendDijit = null;
            var layerInfo = [];
            map.on("layers-add-result", function (evt) {
                var layerInfo = [];
                arrayUtils.forEach(evt.layers, function (layer, index) {
                    if (layer.layer.id != "BaseMap") {
                        layerInfo.push({ layer: layer.layer, title: layer.layer.id });
                    }
                });
                if (layerInfo.length > 0 && legendDijit == null) {
                    legendDijit = new Legend({
                        map: map,

                        layer: TransporterRoute,
                        layerInfos: layerInfo
                    }, "legendDiv");
                    legendDijit.startup();
                }
            });

Is there anything I am doing wrong, or can't we apply a unique value renderer on a point feature layer?


texts: Displaying 1000 hiking trails with GeoServer

texts:
I am writing a web application to visualize a database of ~1000 hiking trails. All trails should be displayed simultaneously. Each trail should be individually clickable to view hiking information. I am considering GeoServer as a platform.

How should I structure the trail data if I decide to go with GeoServer? Should I merge all trails into a single layer, or have each trail in a separate layer? Would there be performance problems with the latter approach?


texts: If I have two coordinate points of (lat, lon), how would I calculate the distance between the two?


texts:
I am having a ton of trouble styling my pbf tile service rendered from pg_tileserv in a leaflet map.
here is my code
L.vectorGrid.protobuf(http://localhost:7800/data_oh.parcel/{z}/{x}/{y}.pbf, {
        interactive: true,
        rendererFactory: L.svg.tile,
          vectorTileLayerStyles: {
            parcel: {
            fillColor: "yellow",
            fill: true,
            color: "red"
                }
          }
    }).addTo(map);

it comes up standard blue.
now if I take the suggestions of Styling GeoServer pbf vector tiles in Leaflet
and run
    var vectorTileOptions = {
        interactive: true,
        // pane: "OverlayPane",
        vectorTileLayerStyles: {
          parcel: {
            fillColor: "yellow",
            fill: true,
            color: "red"
         }
        }
      };

L.vectorGrid.protobuf("http://localhost:7800/data_oh.parcel/{z}/{x}/{y}.pbf",vectorTileOptions).on('click',function(e) {
    console.log(e.layer);
    L.DomEvent.stop(e);
}).addTo(map);

it doesnt correctly change the color and in those directions I don't see anything that could help me change this

the actual datalayername is data_oh.parcel but I cannot write it like that in the vector grid function because it will give me an error with the .
not sure what to do here, ive found other examples which have not helped me
Styling polygons in a map tile PBF file in Leaflet
https://eox.at/2020/01/vector-tiles-with-dynamically-updated-style-in-leaflet-lpvis/


texts: OpenStreetView or points from CSV but not both showing?

texts:
I'm using QGIS on Mac (most recent version) and am trying to map coordinates from a csv file. When I import the file normally without having any base map, the coordinates how up distributed like I want. When I put a base map like Google Street View and then add the coordinates, the coordinates don't show up anywhere. Instead, I get a dot in the middle of the map (off the coast of Africa). What's the reason for this? I was told to use Pseudo Mercator EPSG:3857 WGS 84. I've tried using different projections as well.

I am using longitude/latitude coordinates. For either OpenStreetView or Google Street View, the same issue is happening.


texts: Highlighting selected feature in OpenLayers with additional graphic or reticule

texts:
I am trying to create an OpenLayers map in which I can highlight a selected point feature by putting another graphic around it, such as this red box:

What I have done so far is to add a vector layer with a single point feature, and a styleMap that displays the reticule as its externalGraphic. I then move the feature and display it when I want to highlight something, or hide the feature when I don't. This works reasonably well, but I currently have to choose between one of two options, but each has a disadvantage I want to avoid.

Option 1: Correct display, incorrect interaction.

The display is as above, exactly as I want it, but features "covered" by the transparent reticule can no longer be clicked. I achieve this by adding the reticule layer to the SelectFeature control and using setLayerIndex to move it the top. This means that hovering over or clicking on any other features within the red square has no effect.

Option 2: Incorrect display, correct interaction.

If instead I don't add the reticule layer to the SelectFeature control, I can successfully click on any of the selectable features to move the reticule to them. However no matter what I set the z-index of the reticule layer or its feature to, all of the features added to the SelectFeature obscure it, as in this image:

So my question is, how can I achieve the combined effect? I want the highlighting reticule above all features, but to have no interaction with the mouse events. Is there a better way than defining this separate layer for the highlight image? If this is the best way to go, can I pass any click or hover events through the reticule layer to the feature layers below it?


texts:
I have a shapefile that contains building footprints with multiple addresses with different functions (with each an usable area).
I would like to calculate the sum of the usable area, per building id, per same function, as such:

id
function
area

1
wo
10

1
wi
2

2
wo
50

1
wo
10

↓ calculate sum (area) when same id and same function

id
function
area

1
wo
20

1
wi
2

2
wo
50

I tried to use the following expression:
sum(expression[,group_by][,filter])

But the group_by is only possible once (for instance to group the id).
How can we calculate the sum of the two features only when these have the same id and same function?


texts: SpatiaLite: dumpkml with name and description

texts:
How does one get the optional arguments in .dumpkml working? According to the .help .dumpkml should work like this:

  .dumpkml table_name geom_column kml_path [precision] [name_column] [desc_column]

I can get it working with

  .dumpkml table geom table.kml

But every point is just called 'name' and when I try:

  .dumpkml table geom table.kml name_column=column

All I do is lose the geometry (x,y=0,0) and everything still gets called 'name' rather than the value within the specified column.

Any assistance appreciated,
Phil.


texts: Select polygons containing particular attributes from points layer

texts: I have thousands of polygons (buffers) in a single layer and I have a points layer containing tree species. The tree species points shapefile has an attribute called Tree_Type. I need to select only the polygons that contain/intersect three particular species (as shown below). I've already tried multiple intersects to no avail.


texts: How can I overwrite ol.interaction.DoubleClickZoom in Openlayers 3?

texts:
I want to overwrite this interaction because on my tablet when I dbl click while map is moving (using this example http://openlayers.org/en/v3.2.1/examples/geolocation-orientation.html) what happens is that map zoom and jump to marker , but I noticed if I use view.setResolution(newResolution); then it zooms nicely without any "jumps".

so I want to overwrite the interaction to run the code above.


texts: leaflet - The marker and center map are not in the right place

texts:
I'm starting use the Leaflet.
I put a marker to test but neither the marker nor the center are in the right local I set.
example: I put the marker inside a stadium and it appear outside stadium.

There are something I can do to correct this?

var mapquestUrl = 'this is not a link', mapquestAttribution = "Data CC-By-SA by http://openstreetmap.org/' target='_blank'>OpenStreetMap, Tiles Courtesy of http://open.mapquest.com' target='_blank'>MapQuest", mapquest = new L.TileLayer(mapquestUrl, {maxZoom: 18, attribution: mapquestAttribution, subdomains: ['1','2','3','4']});

map = new L.Map('map', { center: new L.LatLng(-8.842, 13.269), zoom: 15, layers: [nexrad], zoomControl: true });

L.marker([-8.815, 13.227], {icon: greenIcon}).addTo(map) .bindPopup('ooooo') .openPopup();


texts: How to Publish a “Raster catalog”, and is an image Server extension will be required in this case?

texts:
I have a Raster catalog that contains a number of images, and I want to publish it using ArcGIS server 10.3.1, when I right click on the Raster catalog I cannot find Share as image service! In the mosaic dataset when I click on the dataset I can see publish as Image service. So the question is How can I published a Raster catalog dataset if it’s possible, and do I need to have an image server extension to publish it?!
 I cannot find any documentation about the topic.


texts: Coordinate system of a raster file to be introduced for transformation

texts:
I am working on raster data using GDAL. When I extract coordinate system information of the files I got this:
PROJCS["Geostationary_Satellite",
    GEOGCS["GCS_Unknown datum based upon the custom ellipsoid",
        DATUM["D_Not specified (based on custom ellipsoid)",
            SPHEROID["Custom_ellipsoid",6378140,298.252981]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Geostationary_Satellite"],
    PARAMETER["central_meridian",0],
    PARAMETER["satellite_height",35785831],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]

I have to transform the coordinate system of my other files into this coordinate system. But the problem is that I don't know how to introduce this coordinate system to my program. I can't find EPSG or Proj4 for it. Any solution or alternative?


texts: I want to change my date (string) to a date format %Y-%m-%d for the time manager. I already try with the Field Calculator. But it is not working. What should i write in the expression. And should I create a new field?


texts: In FME Desktop, I have a custom coordinate system, I was confused how to translate it for MyCoordSysDefs.fme

texts:
I have a custom coordinate system that I was confused how to translate it to the MyCoordSysDefs.fme for use in Safe Desktop. Here's how it is represented in the prj file.

PROJCS["Lumos_Projection_Foot",
GEOGCS["GCS_North_American_1983",
DATUM["D_North_American_1983",
SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221008916]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",-80],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",4921259.843],
PARAMETER["false_northing",0],
UNIT["Foot_US",0.30480060960121924]]

I read over the help for FME DEsktop, but the I did not know how to translate it because it had two units and so many Parameters.
I appricate any help. Thanks


texts: QGIS Projective Transformation Algorithm

texts:
I would need to know something more about the algorithm that Qgis (Georeferencer Plugin) uses to georeference with  projective algorithm.

I have tried to reproduce your results using other software and I do not succeed.

I like results but I need to know the parameters that are calculated for use in a subsequent process to superimpose information from various sources.


texts: Labels for Very Small Features Not Displaying

texts:
I'm labeling features in a map book (MapLogic) in ArcMap using Maplex labeling. I have the "Never Remove..." box checked within Maplex for the layers, however, some of my features that have a very small area (e.g. 0.005 sqft) are missing labels - they're just not placing. All labels are dynamic.

When I try to create annotations for those layers (tried selecting just the features whose labels weren't placing, and all the features within the map), no annotations were created for those unplaced labels (even when I selected 'create annotation for unplaced..')

Is this a bug that others have experienced, or is there some tweek within Maplex settings that I need to do?

Here're a few screenshots of one of the layer's Maplex label settings that won't place - the feature's area is <0.005 sqft.

EDIT: This is in ArcGIS 10.1


texts:
Is there a method to join points together to create a polygon in OpenLayers or other WebGIS platforms?

I have been searching for some while and I have found that dropzone.js can allow me to upload data to my SQL table as points which can be displayed but I cannot find anything that carries out a similar method like QGIS or ArcGIS "Points to Polygon".


texts: PGROuting 2 : Getting nearest node to a given point (with lat - long given)

texts:
I have a point whose latitude and longitude (only) are known, and a table of nodes with their geom. I want to find the closest node in the table to the given point.

I think I can achieve this with pgr_findNearestNodeDwithin function, but i cannot find the exact syntax of the function and the parameters it takes.

Any pointers in this direction will be appreciated.


texts: Aligning Town/Range with section lines using ArcGIS Desktop?

texts:
Is there a tool in ArcGIS Desktop that will allow me to snap or align a township/range layer to the section layer?

The layers that I have don't quite line up.


texts: Can't use my SimpleSVG Plugin in QGIS (error: initGui() method, 'QPYNullVariant')

texts:
I'm looking for a good workflow from QGIS into a vector graphics program, and since the built-in SVG export in QGIS doesn't work really well, I thought I'd use the SimpleSVG plugin.

For some reason, I keep getting this error message when I open QGIS or try using the plugin:

Couldn't load plugin simplesvg due to an error when calling its initGui() method
TypeError: QLineEdit.setText(QString): argument 1 has unexpected type 'QPyNullVariant'

Here's a screenshot of the error:

I've tried uninstalling the plugin and reinstalling it, and I also tried uninstalling and reinstalling QGIS (12.2.1-Lyon), the GDAL, numPY, and matPlotLib packages but...to no avail!


texts: Using Custom Source for QGIS OpenLayers Plugin

texts:
I'm using a Custom Map Source for MOBAC that is based on a beanshell script (see below) which renders perfectly in MOBAC. Now, I'd be keen to do the same in QGIS and wonder if it is possible to implement the same source in the OpenLayers Plugin? Admittedly I'm completely new to OpenLayers so please excuse me if this approach turns out to be foolish. Or maybe there is an alternative to use this map source as base map in QGIS?

/**
beanshell code to use the online maps from bergfex

put it into your "mapsources"-directory...

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>

**/

static import java.lang.Math.*;

name = "Bergfex";

tileType = "png";

tileSize = 256; // optional
minZoom = 8;   // optional
maxZoom = 15;   // optional

/**
This method is called for each tile:
input parameters for this script: "zoom", "x" and "y"
**/

random = new Random( System.currentTimeMillis() );

String getTileUrl( int zoom, int x, int y ) {
    // String baseurl = "http://s2.bergfex.at/images/amap/";
    String baseurl = "http://s" + random.nextInt(10) + ".bergfex.at/images/amap/";
    String xBase = "";
    if (zoom > 13)
        xBase = Integer.toString(x).substring(0, zoom - 12) + "/";
    return baseurl + zoom + "/" + xBase + zoom + "_" + x + "_" + y + ".png";
}


texts: Fixing time error when exporting data from ArcGIS Online?

texts: I frequently have to export data from a layer in ArcGIS online (that is created from Arc Collector offsite) to excel via CSV format. One of the fields is the CreationDate field that is automatically created when a layer is used. Every time I download the layer and export to excel, the time is always incorrect: seven hours are added to each correct time. For example, a time in excel reads 21:30 when it should read 14:30. The time zone and format for all equipment used is the same, so I am not sure what is happening when the data is exported.


texts: Issue utilizing Keys:Values from Dict with da.UpdateCursor

texts:
I have a field that holds a variety of strings. These strings were field names and corresponding values that were concatenated into a single field per feature. Using .split/indexing I was able to create a dictionary where values correspond to field names and values correspond to attributes.

attributes in field=   '"xyz"="abc","ghi"="lmno"'

dict= {'xyz':'abc','ghi':'lmno'}

I am now at the point where I'm trying to feed the keys:values into a da.UpdateCursor where the key is the field and row= value. Block below is the last part of the script I'm struggling with. I keep getting an error: sequence size must match size of row.

i= 0
z= 0
n= 0

while i <= getCount:
    kI= dic.keys()[z]
    kiS= str(kI)
    vI= dic.values()[n]

    with arcpy.da.UpdateCursor(item,kiS)as cursor:
        for row in cursor:
            row= vI
            cursor.updateRow(row)
            i+= 1
            z+= 1
            n+= 1


texts: How can I find route between two points over pgrouting?

texts:
I have imported osm file to postgresql with this table schema(under question). I used osm2pgrouting tool to create this. How can I find route between two points (for example between NY and Detroid). I need result like this:53.038683 5.671214,53.038580 5.671132,53.038585 5.671056,53.038573 5.670949,... array of coordinates. Any ideas pls? As GIS I'm using geoserver.

Table schema:

osm_node:
   -node_id
   -osm_id
   -lon
   -lat
   -numofuse
   -the_geom

osm_relations:
   -relation_id
   -type_id
   -class_id
   -name

osm_way_classes
   -class_id
   -type_id
   -name
   -priority
   -default_max_speed

osm_way_tags
   -class_id
   -way_id

osm_way_types
   -type_id
   -name

pointcloud_formats
   -pcid
   -srid
   -schema

relation_ways
   -relation_id
   -way_id
   -type

spatial_ref_sys
   -srid
   -auth_name
   -auth_srid
   -srtext
   -proj4text

ways
   -gid
   -class_id
   -length
   -length_m
   -name
   -source
   -target
   -x1
   -y1
   -x2
   -y2
   -cost
   -reverse_cost
   -cost_s
   -reverse_cost_s
   -rule
   -one_way
   -maxspeed_foward
   -maxspeed_backward
   -osm_id
   -source_osm
   -target_osm
   -priority
   -the_geom

ways_vertices_pgr
   -id
   -osm_id
   -cnt
   -cnt
   -chk
   -ein
   -eout
   -lon
   -lat
   -the_geom


texts: Clearing in_memory workspace within ModelBuilder?

texts:
I have been using in_memory workspace within ArcGIS 10.1 ModelBuilder as part of a workflow to mosaic and clip raster datasets to study area bounds (Figure 1).  The model runs fine the first round but crashes the program on the second or third run.  I suspect two issues may be occuring: 1) Memory limitation are being exceeded or 2) There is conflict when trying to overwrite temp files in_memory.

Is there a way to clear in_memory workspace from within ModelBuilder?

Figure 1.

Edit:

The final model that is now stable


texts: How to extract points from a Digital Elevation Model in ArcGIS 10.1?

texts:
More specifically my question would be if there is a way to create a grid over the digital elevation model in GIS and extract points, or elevational data, from the intersecting points of the grid?

I know the spatial analysis tool allows you to extract elevation data from points in a shapefile. This helps though I am not looking for the elevation of certain locations.

I am trying to create a gridded elevation surface in another program, AutoCad Civil 3D. I can do this if I have the list of coordinate and elevation points in a shapefile to export and manipulate.

Any information on this would help. I keep running into a wall with this task and I'm not experienced in GIS so I'm learning as I go.


texts: GPS capable rangefinders or cameras that can capture lat / long data from a distance?

texts:
Anyone have experience using this technology?
i.e. field verifications of structures where you need to capture the lat / long of a house that is 1000 feet from the road with limited access.


texts:
I have a process with an address list as an input table. The row iterator should  iterate through entries of the address name column and then I use the output values for some other stuff.

It works for unique values (addresses). But when there are some doubled values in my input list, it just ignores those rows. I also need those similar addresses in my output.


texts: How to query the data using SQL in the infowindow of CartoDB

texts:
I want to use a SQL join to merge data from 2 tables and display it in the info-window. When I give my query

  Select table_2.hos_name,table_2.revenue from table_1,table_2 where table_1.area_name = table_2.area_name

in the info-window editor, the Query itself is displayed instead in the info-window instead of the values. When I googled I found this link https://groups.google.com/forum/#!msg/cartodb/W5HHQx1jjMA/qBo56lghRGcJ
but I couldn't relate it. Could some one point me to some relevant documentation? Should I include the query as JavaScript?


texts: How to use attribute table field name as the Output filename expression in Print composer?

texts:
I have several features I want exported as individual images. I am using Print composer and the export process was successful, but the output shows generic filenames like output_1.png:

It obviously came from the default value of 'output_'||@atlas_featurenumber under Atlas generation > Output filenames expression:

I am not familiar with what expression to use. How can I make each feature's name column (from the layer's attribute table) as the filename of its exported image?


texts: references for the colloquial naming of spatial data resolution

texts: In our era of data deluge, many folks, including myself, quest for ill-defined "high-resolution" datasets. I suspect that colloquial description of spatial resolution as "high" or "low" is and will continue to be a set of terms relative to the what was available in the recent past. However, I'm wondering: are there peer-reviewed conventions for subjective description of spatial resolution? Perhaps some sort of Beaufort scale for spatial resolution?


texts: How could a GeoJSON look that OGR recognizes more than one layer?

texts:
I load a GeoJSON with OGR and apply the method GetLayerCount().
How must the GeoJSON look like that GetLayerCount() > 1?

driver = ogr.GetDriverByName("GeoJSON")
dataset = driver.Open(my.geojson, 0)
# should be 2 or higher
number_of_layers = dataset.GetLayerCount()

Unfortunately a FeatureCollection with Features of different Geometry Types does not lead to the desired result.


texts: I'm currently trying to export a PDF from an image service that we have hosted.  The imagery looks great within Arcmap, but the exported imagery looks really rough (coarsened).  Does anyone know what items I might start modifying within the image service to fix this?


texts: Shapefile and CSV coordinates don't match

texts:
I'm new to QGIS and still trying to get to grips with some basic aspects. I'm trying to create a map by combining a shapefile outlining London boroughs, and a CSV file with a series of records including Latitude and Longitude references, all of which are in the London region. The problem I'm experiencing is that the shapefile and the points from the data are appearing in totally different places in the resulting map.

I assume the issue is something to do with CRS settings, but I could really use some guidance on what I need to do to match these two layers correctly. I've set the CRS on both layers to EPSG:3857, using Set Layer CRS, but they still don't overlap.

The shapefile came from here:
http://data.london.gov.uk/dataset/statistical-gis-boundary-files-london

Below is a screenshot of some of the data from the CSV:

What do I need to do beyond setting the CRS to the same value for both layers?


texts:
I've got various vector layers on a OL map.
On one layer I have a few draw controls. If I draw a polygon I can select it (the whole pop-up thing works). This also works for all the other features.
Then I use the modify control to reshape the polygon. When I complete this action (with a clickout) I catch the afterfeaturemodified event and disable the modify control, re enable the selectcontrol for the map.

Now the problem occurs. The clickHandler of the selectControl cannot get the modified feature from the event. I used drawlayer.layer.getfeaturefromevent(event). The weird thing is, this does work for all the other features that er still on the map.
Doing things like:

drawlayer.layer.refresh();
or
drawlayer.layer.redraw();

doesn't help.
I use the infoWindow for a form that actually saves the modified feature, so I need this to work. Also, I can't use the modify control more then once on the same feature. Which is also very annoying from a usuability point of view.
If I look at the DOM, the drawLayer still has just one feature.

I've got no idea how to solve this. Any help would be nice.


texts: Can I add roles to roles in ArcGIS Server 10.3.1 user concept?

texts:
Within ArcGis Server 10.3.1 with LDAP Security, I have an existing role containing users, which I would now like to add to another role. For Example I have "Edit_Role_01" and  "Edit_role_02". I now want to add these 2 roles to a role called "Editors".

I can´t seem to see how I could add a role to a role. Is this not possible?


texts: Geoserver, PostGIS and KML: Creating clickable nodes from OSM data

texts:
I have a PostGIS database that has OSM data imported into it using osm2pgsql and I'm using GeoServer to plot the points into a networked KML file for Google Earth.

What I'd like to do is make the nodes that Geoserver pulls from PostGIS interactive.  I'd like to be able to search for an element and have Google Earth query the PostGIS db for results.

I'd also like the ability to click on a POI and have it pop up a dialog with all the attributes from PostGIS.

So far I have a bunch of red points in Google Earth that the KML file added but they are not interactive.

Any suggestions?


texts: How can change management be used for GIS operations?

texts:
I'm working in a moderate big organization where GIS is just on part of the IT-platform. The rest of the organization are working with "Change Management" and now they want us GIS-engineers to be better with Change requests and so on.

The problem is, as a GIS Administrator, we do a lot of changes all the time. Start, restart mapservices, create new services, move data, update services and data.

My question is if anyone else have experience with Change Management and GIS in their daily work and how that worked out for you :)

Looking forward to a interesting discussion.

This is a link that explains Change Management concept.


texts: How to save an image stretch/enhancement in ENVI?

texts:
I am using ENVI 5.3.1 and viewing a georeferenced satellite image with a linear 1% histogram stretch applied to the entire image. When exporting the image with the current histogram stretch using File->Export View To->Image File, the image enhancements do not remain.

I have also tried File->Save As->Save As... (ENVI,NITF,TIFF,DTED). Is there a way to retain (and export) the image as stretched in the viewer into a separate TIFF file?


texts:
I've installed GDAL2.3dev on my mac using Homebrew, expecting it to support GeoPDFs already. But when I run gdalinfo on a pdf file from USGS, I still get this error:

ERROR 4: `WA_Sunrise_244132_1971_24000_geo.pdf' not recognized as a supported file format.

What do I need to do add PDF support to GDAL?


texts: Import point cloud into PostgreSQL/ pdal pipeline fails

texts:
I have a point cloud dataset that I would like to upload to my postgres/postgis database.

I followed this tutorial and I could install everything without problems (on ubuntu 14.04. On ubuntu 12.04 it did not work link), but I have issues to upload the point cloud into my database.

In the tutorial there are some commands to check the lidar metadata. This one is not working in my case:  pdal info --input merged.laz --metadata --xml

it says:

  Usage error: option '--xml' did not split correctly. Is it in the form
  --readers.las.option=foo?

pdal generate error when I try to upload the lidar data to the database: pdal pipeline --input laz2pg.xml

  PDAL: Couldn't create reader stage of type 'drivers.las.reader'.

The content of my pipeline xml file is the following:

<?xml version="1.0" encoding="utf-8"?>
<Pipeline version="1.0">
  <Writer type="drivers.pgpointcloud.writer">
    <Option name="connection">dbname='lidar' user='postgres' host='localhost' port='5432' password='Alibaba22'</Option>
    <Option name="table">test</Option>
    <Option name="srid">27000</Option>
    <Filter type="filters.chipper">
      <Option name="capacity">400</Option>
      <Filter type="filters.cache">
        <Reader type="drivers.las.reader">
          <Option name="filename">merged.laz</Option>
          <Option name="spatialreference">EPSG:27000</Option>
        </Reader>
      </Filter>
    </Filter>
  </Writer>
</Pipeline>

I went trough on this tutorial two times a couple of months ago and it worked, but I have no clue what is wrong now.


texts: ArcGIS Online - Related table not displaying at all in popup

texts:
I created a file gdb and imported both the table and shapefile.
Added them to the ArcMap table of contents and created a relate.
Published as a service & ensured all was correct in the dialog box.
I've added the layer to a basemap in ArcGIS Online.

Both the feature layer & related table show up in the contents however as shown in the picture below the option to "show related tables" is not available which is what I need.


texts:
I am a PhD student. For my project, I need to extract percentage of land use types at state level from national level land use raster dataset. I have tried the following steps but could not succeed. Can anyone please suggest me how can I get this information.

1)      Theses are the Raster data sets – for whole Australia

2)   try properties – Symbology- get unique values

3) Somehow I clip it with the QLD shapefile. Now it look like this with attribute table.

At this stage I do not know how to get percentage of each land use types.

Can anyone please explain me how I can solve this problem?


texts: Create a new polygon layer containing the extent of a layer

texts:
I am trying to create a difference layer from an overlay layer and a base layer. The base layer (colored orange in the image below) has a larger extent than the overlay layer (light brown) when zoomed out, but I want it to have the same extent with the overlay layer:

I could manually create a new base layer by drawing a rectangle or square over the overlay layer, but I prefer the exact extent of the overlay layer.

How can I create a new layer containing a polygon that shows the extent of the overlay layer?


texts: QGIS Modeler algorithm does not accept input variable

texts:
I am trying to make a QGIS model which includes an "Extract by Attribute" algorithm. One of the inputs for this function is the liminar value, simply called "Value". For some reason though, it is only possible to explicitly state that value, and not use a number variable that was inserted into the model.

Is this behaviour as expected or a bug? Is there a work around?


texts: In QGIS, layers properties dialog box is active but not visible. How do I get it back?

texts: When I right click on a layer, then click on 'Properties'  I would expect the Properties dialog box to appear so I can change the style, add labels etc.  For some reason the box doesn't show.    It seems like the box is active but not visible - I say this because I can't click on anything else within QGIS until I press escape.  Many thanks for the help.


texts:
According to this post in 2008 and others (older), there is no KML way to leverage the "labels to path" algorithms that Google Earth / Maps uses to put road names on the roads themselves.

Is this still the case? If so, are there other KML methods of labeling polylines or polygons that do not involve labeling a point within the line/gon... rather a general label for the entity itself?


texts: Converting LiDAR data (.laz) to DSM in .asc format

texts:
I'm looking to convert a LIDAR scan in .laz format into a DSM in ASCII Grid format, in order to calculate RF propagation in an urban environment from a given transmission location (bonus: converting the georeferencing from NAD83 to WGS84).

My source data is a set of scans from NOAA, and I'm working to ingest them into another application which wants it in .asc format, like so:

ncols        2454
nrows        1467
xllcorner    -1.475333294357
yllcorner    53.378635095801
cellsize     0.000006170864
NODATA_value      0
0 0 0 0 0 0 0 0 0 0 0 0 0 ...

Being able to batch-process the data would definitely desirable.


texts: Adding WMS legend to see or remove layers in relation to the layer control?

texts:
This is the code, the problem is that always print the same png legend even if you select another layer.

function addLeyenda(layer){
        if( layer instanceof L.TileLayer.WMS ){
                var container = document.getElementById("control-leyenda");
                var divleyenda = L.DomUtil.create('div','div-image-leyenda', container);
                divleyenda.id = '_leaflet_id_'+ paradas_bus;
                var imgleyenda = L.DomUtil.create('img','image-leyenda', divleyenda);
                imgleyenda.src = 'http://localhost:8080/geoserver/tfm/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=tfm:paradas_bus';
        }
        }
        function removeLeyenda(layer){
                var divleyenda = L.DomUtil.get('_leaflet_id_'+paradas_bus)
                document.getElementById("control-leyenda").removeChild(divleyenda);
        }

    //Incorporación de los GeoJSON tranvía y aparcabicis en formato JS a las capas de supersposición (Overlay)
      var controlCapas = L.control.groupedLayers(baseLayers, groupedOverlays).addTo(map);
      document.getElementById("control-capas").appendChild(controlCapas.getContainer()
    );


texts:
I'm working on a wall map that needs to include labels for EVERY street and address range. I recognize that I will have to do a lot of editing to make it work, but I can't even get QGIS to put the labels on so I can edit them.

As you can see in the screen shot, I've chosen to show all layers, but the segments in blue, for example, aren't labelled even though they are separate lines with valid labels.

The other issue is that, of course, the map window and composer window are never quite the same.

I'm using the latest download (2.14.3).


texts:
I am having difficulty adding a .gpkg raster store to geoserver with the GeoPackage community plugin installed.
I can successfully accomplish .gpkg in and out with EPSG:4326.

Using EPSG:3857 I can only output .gpkg from GeoServer.

Steps to reproduce are simple:

add a properly 3857 georeferenced geotiff image as a independent store and layer.
export the layer as GeoPackage using the GeoServer web UI. This will generate a valid  3857 gpkg.
attempt to add this new GeoServer/GeoPackage generated gpkg as a new store.
This fails with same error as : Is there a way to check and repair a GeoPackage GPkg file?
and
https://osgeo-org.atlassian.net/browse/GEOS-7166

I can extract the tiled images into a zoom/column/row.jpg pyramid but I have no idea how to import such a pyramid into GeoServer.
Is there a simple raster store plugin to grab 3857 tiles from the filesystem?


texts: ArcGIS 10 arcpy to add a WMS Service to MXD

texts:
I want to batch insert WMS layer to my arcmap MXD project with python/arcpy script.

Some issues has been unanserwed, here my "state of art":

ESRI IDEAS
ESRI GeoNet community #1
ESRI GeoNet community #2

All of these solution propose to use

ArcMap to Add WMS layer manually
do "Save as Layer File"
reuse the .lyr to add to a new TOC by arcpy with this code

mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
imagery_lyr = arcpy.mapping.Layer(r"path\to\.lyr")
arcpy.mapping.AddLayer(df, imagery_lyr)

The lastest idea work properly with "static" WMS services.
When you have a "dynamic" changing WMS services, you need to maintain manually all the pre-generated lyr.

Does somebody know how to load WMS layer into ArcMap MXD with arcpy?

Does somebody know how to create .lyr file from WMS  with arcpy?


texts: PostGIS point st_within() polygon = false

texts:
so geoserver shows me a red dot within a blue polygon, i thought postgis can tell me that fact by query. i tried the following statements without success, can anyone tell me what i did wrong?

select

    -- within on geometry with srid
    ST_Within(
        st_geometryfromtext('point(9.05 52.25)', 4326)
        ,
        st_geometryfromtext('POLYGON((9 52,9.2 52,9.1 52.1066357,9 52))', 4326)
    ),

    -- within on geometry with srid, swap arguments
    ST_Within(
        st_geometryfromtext('POLYGON((9 52,9.2 52,9.1 52.1066357,9 52))', 4326)
        ,
        st_geometryfromtext('point(9.05 52.25)', 4326)
    ),

    -- within on geometry without srid
    ST_Within(
        st_geometryfromtext('point(9.05 52.25)')
        ,
        st_geometryfromtext('POLYGON((9 52,9.2 52,9.1 52.1066357,9 52))')
    ),

    -- within on geometry without srid, swap arguments
    ST_Within(
        st_geometryfromtext('POLYGON((9 52,9.2 52,9.1 52.1066357,9 52))')
        ,
        st_geometryfromtext('point(9.05 52.25)')
    ),

    -- contains on geometry with srid
    ST_Contains(
        st_geometryfromtext('point(9.05 52.25)', 4326)
        ,
        st_geometryfromtext('POLYGON((9 52,9.2 52,9.1 52.1066357,9 52))', 4326)
    ),

    -- contains on geometry with srid, swap arguments
    ST_Contains(
        st_geometryfromtext('POLYGON((9 52,9.2 52,9.1 52.1066357,9 52))', 4326)
        ,
        st_geometryfromtext('point(9.05 52.25)', 4326)
    ),

    -- intersects on geography
    ST_Intersects(
        st_geographyfromtext('point(9.05 52.25)')
        ,
        st_geographyfromtext('POLYGON((9 52,9.2 52,9.1 52.1066357,9 52))')
    ),

    -- intersects on geography, swap arguments
    ST_Intersects(
        st_geographyfromtext('POLYGON((9 52,9.2 52,9.1 52.1066357,9 52))')
        ,
        st_geographyfromtext('point(9.05 52.25)')
    )


texts:
I need to sum several rasters (.tiff) with different extent but the same resolution in R.

How can I do it?


texts: "SSL Errors Occurred Accessing URL" after upgrade to Lyon

texts:
I just upgraded to QGIS Lyon in Ubuntu 14.04 using either ubuntugis or the debian repo. When opening QGIS I get the following error screen:

When I click on "Connection Certificates", the following window appears:


texts: Is it necessary to index features when loading WFS layer in ArcMap?

texts:
There is ~85k features in a WFS layer coming from the LAN server with a 1 gb ethernet link. However, I have to wait a very uncomfortable amount of time for the layer to be indexed when I load it.

Since I don't really have to bother with the transfer speed, can it truly run live?

In ArcMap, I have set the cache expiry to 0 (Data Interoperability).

The data is stored in PostgreSQL/PostGIS and is served by MapServer 7.0.4 (server is running Windows Server 2012).

While indexing, I can see that MapServer takes 2-3% of the processor, and uses disk at less than 1 MB/s (server-side)

Client-side, 25-30% CPU (~90% max. frequency), 6-8 MB/s

Data is transfered over the network at ~ 40 mbit/s (on a gigabit link)

So it seems that the bottleneck is on the client side.


texts: Saving python script as a tool in arcGIS

texts:
I am trying to use the script from Randomly subsetting X% of selected points using ArcPy? to randomly select and export points in ArcGIS.

Specifically, I am using this:

def SelectRandomByCount (layer, count):
     import random
     layerCount = int (arcpy.GetCount_management (layer).getOutput (0))
     if layerCount < count:
         print "input count is greater than layer count"
         return
     oids = [oid for oid, in arcpy.da.SearchCursor (layer, "OID@")]
     oidFldName = arcpy.Describe (layer).OIDFieldName
     delimOidFld = arcpy.AddFieldDelimiters (layer, oidFldName)
     randOids = random.sample (oids, count)
     oidsStr = ", ".join (map (str, randOids))
     sql = "{0} IN ({1})".format (delimOidFld, oidsStr)
     arcpy.SelectLayerByAttribute_management (layer, "", sql)
     arcpy.CopyFeatures_management(layer, "random_start_20pop")
     arcpy.SelectLayerByAttribute_management(layer, "SWITCH_SELECTION")
     arcpy.CopyFeatures_management(layer, "endings_for_20pop")

What should I do to create Python tool in ArcToolbox instead of pasting it to the Python window? I've tried already to save it in toolbox as a script but I assume that I did it wrong. I tried to proceed as it is shown here Adding a script tool


texts: Automatically exchange QGIS layer datasources during project opening?

texts:
Do you know of any existing QGIS plugin that automatically exchanges layer datasources during opening of a Project?

I would like to transparently switch our users from "PostGIS A" server to "PostGIS B" using a predefined datasource mapping.

We are on QGIS 2.18 for Windows

Using a script is not an option for us. I like more the idea of hooking into the project open event/signal and change the datasource there.


texts: Using LOWER() in arcpy select by attribute

texts:
I just want to include lower() in my query to make it irrespective of case.

When I use this I get an error:

arcpy.SelectLayerByAttribute_management("BurrRidgeTreeInventoryMaster""NEW_SELECTION",' lower("species") like 'maple%'')

And when I use this I get everything selected, not just trees that contain 'maple%'

arcpy.SelectLayerByAttribute_management("BurrRidgeTreeInventoryMaster","NEW_SELECTION"," lower('species') like 'maple%'")

What do I have wrong?


texts: SOL help in QGIS: rule based styling to show timestamp increase via gradient

texts:
I have some polygon data from a tractor that shows it's route among other things. It has a timestamp column which I'd like to use to show the route in which the tractor drove through the field via a color ramp (other suggestions?).

I'm a novice at best with SQL and I don't know how to code it. I have about 41,000 datapoints in the table, which turns out to be around 12 hours.

How do I code for a color ramp that increases as the values in the timestamp column increase.


texts:
I'm new with GWC and I'm trying to cache this WMS server 1. I can see layer list from this server on "A list of all the layers and automatic demos" but when I select one PNG from any layer I only see blank tiles.

What I'm doing wrong?


texts: Saving tiled + scaled rasters from WCS? is it possible?

texts:
Qgis + grass does a good job at acquiring the layer and displaying the image, In my case a 20m DTM.

I'm wondering if there is a way to automatically export all the tiles in a 1:1 scale off the original WCS that is being used to rasterize the view layer.

I don't mind scripting my own thing.
The end goal is to extract tiles of a predetermined amount of pixels in a 1:1 geographical scale (so *20 the maximum res of my DTM).

Any pointers or ideas on where to start with the python scripting on this would be most welcome, if a preexisting solution is not already available.


texts: Enterprise geodatabase on PostgreSQL backup and restore

texts:
windows 7, PostgreSQL 9.4/ArcSDE/PostGIS backend database that I  am transferring to another computer.

My backup command is as follows. host 5433

pg_dumpall -h localhost -p 5433 -U postgres -c -f "file.backup"

backups up all nice and everything.

when I go to restore it on windows 10, PostgreSQL 9.4, port 5433 I run

psql -h localhost -p 5433 -U postgres -f file.backup

so everything restores okay. All tables, schemas, logins are good. I can connect with QGIS and everything works fine.

Problem

When I go to add an ArcGIS database connection I get this error

UPDATE

I uninstalled postgres on the new computer reinstalled 9.5,
ran  psql -h localhost -p 5432 -U postgres -f file.backup on port 5432 and in the CMD I found 1 error it should while it is running the restore

psql:R:/Data/LUCZ_2017/blah.backup:12531010: ERROR:  relation "gdb_items" does not exist

whats going on here!

Based on Evan Carroll's suggestion I ran

C:\Program Files\PostgreSQL\9.5\bin>psql \duS+
Password:
psql: FATAL:  password authentication failed for user "rizagha"

the CMD wouldn't let me enter my password, I pressed enter and received the above error


texts: Resample raster layer to non-uniform raster

texts:
I have checked so many websites already, but I can't find an answer to my problem! I'm using ArcMap and I have a raster layer in 20x20m resolution containing discrete land use data (values from 1 to 23). Another raster layer in 20x20m resolution contains the data of the terrain height in a continuous format. Now I want to resample my raster to a non-uniform (non-equidistant) grid, so that I get a continuous increase and decrease of my grid cells from the corner to the middle of my raster layer. This could look as followed:
grid length in x-direction: 10x200, 2x175, 2x150, 2x100, 2x50, 200x20, 2x50, 2x100, 2x150 2x175, 10x200
grid length in y-direction: 10x200, 2x175, 2x150, 2x100, 2x50, 200x20, 2x50, 2x100, 2x150 2x175, 10x200
I need both of my raster layers in the same format. I already know the resampling tool, but this only works for uniform (equidistant) grid sizes.
Is there a solution to solve this problem?