texts: ArcSDE In a version geodatabase, snap tool does not work on a database feature class

texts:
I am setting up a series of tasks for technicians to complete. To finish the map template they will be working from, I must snap leak points to gas mains using the snap tool. However, after running the snap tool for 2 hours and getting a successful completion, the points are not snapped.

I have tested this using a copy of the leak points feature class without an ArcSDE version and the snap was successful.

Why won't the snap tool work on the ArcSDE version of the leak point feature class? This is being attempted from a in-map selection subset of the leak point file. Please note that the feature classes in this ArcSDE cannot be changed unless the version is changed.

To illustrate this problem, red dots below represent a successful snap run when performed as part of a model, green dots represent running the snap from ArcSDE from the stand alone snap tool. As you can see, the points did not snap.


texts: Hyperlink two documents in ArcMap using VBscript when one might be "null"

texts:
I am an Ecologist that frequently dips into GIS work but I know next to nothing about script. I copied a script I found on this site and it ALMOST works for my application. I am hopeful its a quick/simple fix.

Here is what I'm trying to do:

I have 2 different document fields I am trying to hyperlink. The first one is named "FILE_NAME" and the second is "Survey_Doc". Sometimes both docs are present, but sometimes only one document is present (therefore, one field may be "null"). The code I found and adjusted for my use works flawlessly in opening both documents as long as both are present or if only the "FILE_NAME" doc is present. However, if "FILE_NAME" is "Null" but there is a "SurveyDoc", the hyperlink tool will not show a link is available to open in ArcMap Data View.So, I'm trying to figure out how to get it to open the "SurveyDoc" even when the "FILE_NAME" is blank/null.

Here is my script:

Function OpenLink ( [FILE_NAME] , [SurveyDoc]  )
  Dim path, path2
  Dim objShell
  path ="..\PDF\" +  [FILE_NAME]
  path2 = "..\PDF\" + [SurveyDoc]
  Set objShell = CreateObject("Shell.Application")
  objShell.ShellExecute path, "", "", "open", 1
  objShell.ShellExecute path2, "", "", "open", 1
End Function


texts: How to find the correct CRS of the country Georgia

texts:
How do I go about finding the correct projected co-ordinate system for an area of the planet I've never worked in before?
Is there a website or any such material anyone knows of that they could point me in the direction of?
The area in question is the Gardabani Municipality in the country of Georgia.
If possible I would like to get a CRS code for this which I can add to QGIS.


texts:
Can someone please walk me through installing qgis on Ubuntu 13.04. I keep getting 1.7 no matter what I do and I would like 1.8 if possible. I am a new Linux user.

This was addressed in a previous post but it still did not fix my problem. I was still getting the same errors even when I followed this post:
Cannot fix QGIS after upgrade to Ubuntu 13.04 Raring

I was finally able to figure it out:

On the QGIS website I installed this http://hub.qgis.org/projects/quantum-gis/wiki/Download#262-With-updated-dependencies section 2.6.2

I actually had to download these packages from the site:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update sudo apt-get install qgis


texts: Moving manually multiple labels of one field

texts:
I have multiple labels of one field which in some scenarios I'd like to move manually to avoid overlapping etc.

But the problem is if I have multiple labels and choose Data defined placement in labels options (x,y coordinates) and move my label it's merged to one label instead of displaying multiple.

I know it's related to coordinates, I can choose only 1 field for Coordinate X and 1 field for Coordinate Y...

Do you know how to be able to move multiple labels of one field?


texts: PyQGIS couldn't import processing with standalone script

texts:
I have read post on that problem (How can I access `processing` with Python?). The problem is even with a sys.path.append it couldn't import processing. It's very frustrated. Here the code I used:

#!/usr/bin/python

def main():
    layer = QgsVectorLayer('/path/to/file.shp', "BAT","ogr")
    QgsMapLayerRegistry.instance().addMapLayers([layer])

    # Testing processing
    try :
        Processing.runalg("qgis:creategrid")
    except:
        print "Processing module has not been loaded"

    #Check the QgsMapLayerRegistry for the layers
    print QgsMapLayerRegistry.instance().mapLayers()
    # Check if they are valid
    print layer.isValid()

if __name__=="__main__":
    import sys
    from PyQt4.QtGui import *
    from qgis.core import *
    app = QApplication([])
    QgsApplication.setPrefixPath("/usr", True)
    QgsApplication.initQgis()

    sys.path.append('home/qsuser/.qgis2/python/plugins')

    # try to load processing
    try:
        from processing.core.Processing import Processing
        Processing.initialize()

    except:
        print "unable to load processing"

    main()

    QgsApplication.exitQgis()

I could load QGIS and layer is valid that's ok, but processing resist to me. I am on Ubuntu 14.04
I use Pycharm to do it.
I tried on terminal with the python console, it raised this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 572, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/qsuser/.qgis2/python/plugins/processing/__init__.py", line 28, in <module>
    from processing.tools.dataobjects import *
  File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 572, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/qsuser/.qgis2/python/plugins/processing/tools/dataobjects.py", line 35, in <module>
    from processing.core.ProcessingConfig import ProcessingConfig
  File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 572, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/qsuser/.qgis2/python/plugins/processing/core/ProcessingConfig.py", line 30, in <module>
    from PyQt4.QtCore import QPyNullVariant, QCoreApplication, QSettings
ImportError: cannot import name QPyNullVariant

I don't know what I am missing.

Settings :

Qgis 2.12.1-Lyon
Ubuntu 14.04 Trusty
IDE : Pycharm 5 community
Processing : 2.12.2

-- Edit --
And with the changes suggest by mathias kuhn

#!/usr/bin/python

def main():
    layer = QgsVectorLayer('/path/to/file.shp', "BAT","ogr")
    QgsMapLayerRegistry.instance().addMapLayers([layer])

    # Testing processing
    try :
        Processing.runalg("qgis:creategrid")
    except:
        print "Processing module has not been loaded"

    #Check the QgsMapLayerRegistry for the layers
    print QgsMapLayerRegistry.instance().mapLayers()
    # Check if they are valid
    print layer.isValid()

if __name__=="__main__":
    import sys
    from qgis.core import *
    from PyQt4.QtGui import *
    app = QApplication([])
    QgsApplication.setPrefixPath("/usr", True)
    QgsApplication.initQgis()

    sys.path.append('home/user/.qgis2/python/plugins')

    # try to load processing
    try:
        from processing.core.Processing import Processing
        Processing.initialize()

    except:
        print "unable to load processing"

    main()

    QgsApplication.exitQgis()


texts: Sentinel 3 Cloud Masking in Google Earth Engine

texts:
I am new to GEE and I wanted to use this as part of my research.
My first step was to mask the clouds off the images.

The code i created basically mask out pixels based on the Quality Flag Bit 27, which removes all pixels that are too bright. The problem I have is that it doesnt seemed to work on all images.

Is there a sure way to mask out clouds and cloud-shadows for sentinel 3?

This is the code that I used for the cloud masking:

    function checkBit(image, bit) {
      return image.bitwiseAnd(Math.pow(2, bit)).rightShift(bit);
         }
    function checkBitSentinel3(bit) {
      return function(image) {
        var q = image.select('quality_flags')
        var cloud= checkBit(q, bit).eq(0)

        return cloud
       }
    }
   var cloud = image.map(checkBitSentinel3(27)).max();
   var cloudmasked=image.mask(cloud);


texts: shp2pgsql available in postgis:13-3.1-alpine but no in postgis:13-3.1 docker image

texts:
From the postgis/postgis:13-3.1-alpine docker image I can push 3 shapefiles into my database using shp2pgsql in an init script.
But from the postgis/postgis:13-3.1 image I cannot:
(...)
db_1 | /docker-entrypoint-initdb.d/11_init.sh: 19: /docker-entrypoint-initdb.d/11_init.sh: shp2pgsql: not found
db_1 | /docker-entrypoint-initdb.d/11_init.sh: 20: /docker-entrypoint-initdb.d/11_init.sh: shp2pgsql: not found
db_1 | /docker-entrypoint-initdb.d/11_init.sh: 21: /docker-entrypoint-initdb.d/11_init.sh: shp2pgsql: not found

Both PostgreSQL and PostGIS version are however the same.
If it was designed for a specific purpose, why and which one?
Tip: to the present day (20210114), as an inelegant workaround is to install... the postgis apt package itself (yes, it sounds funky but it actually fixes the missing shp2pgsql binary)!


texts:
I am trying to field calculate a double field (PID) to a new string field (PIN). Using:

qry = '"139-{}".format(!PID!)'
arcpy.CalculateField_management(out, "PIN", qry, "PYTHON")

Given a PID = 260360160 The output generated in string PIN field is:

PIN = 139-260360160.0

How can I get rid of the .0? I assume this is carry over from the original field being a double.

I am running ArcGIS 10.2 and Python 2.7.3


texts:
I have installed Mapcache 1.6 and Mapserver 7.0.6. I created configuration file (You can see below this text) and I generated tiles throught mapcache_seed. I have tiles in folder but I have problem with it. If I send first request to Mapcache with generated dataset(which was generated by mapcache_seed) Mapcache again execute Mapserver and I feel big delay. It look like regeneration of tiles. If I send same request the second time, I work ok a Mapcache don’t execute Mapserver and I get tiles very fast.

What am I doing wrong ?

Configuration file, which I use it:

<cache name="disk" type="disk" >

    <base>/opt/data/share/maps/mapcache/</base>

    <symlink_blank/>

</cache>

<source name="zdroj" type="wms">

    <getmap>

        <params>

         <MAP>/opt/data/share/maps/mapserver/main.map</MAP>

          <FORMAT>image/png</FORMAT>

            <transparent>true</transparent>

            <layers>all</layers>

       </params>

    </getmap>

    <http>

        <url>http://172.17.0.1:8085/mapserver?</url>

    </http>

</source>

<format name="PNG_BEST" type ="PNG">

    <transparent>true</transparent>

</format>

<format name="jpeg_nastaveni" type ="JPEG">

    <quality>95</quality>

    <photometric>RGB</photometric>

</format>

<tileset name="mirror">

    <source>zdroj</source>

    <cache >disk</cache>

    <grid>gridRP</grid>

    <format>PNG_BEST</format>

    <metatile>5 5</metatile>

    <metabuffer>10</metabuffer>

</tileset>

<grid name="gridRP">

    <extent>-20037508.3427892480 -20037508.3427892480 20037508.3427892480 20037508.3427892480</extent>

    <srs>EPSG:3857</srs>

    <units>m</units>

    <size>256 256</size>

    <resolutions>156412 78206 39103 19551 9776 4888 2444 1222 610.984 305.492 152.746 76.373 38.187 19.093 9.547 4.773 2.387 1.193 0.596 0.298</resolutions>

</grid>

<service type="wms" enabled="true">

    <full_wms>error</full_wms>

    <format allow_client_override="true">PNG_BEST</format>

</service>

<service type="wmts" enabled="true"/>

<service type="tms" enabled="true"/>

<service type="kml" enabled="true"/>

<service type="gmaps" enabled="true"/>

<service type="ve" enabled="true"/>

<errors>report</errors>

<lock_dir>/tmp</lock_dir>


texts: Matching Project CRS to Layer CRS in QGIS

texts: I'm working with QGIS (2.18.13) and I have a vector layer made up of many polygons (CRS: WGS84/29N) but need to change project CRS to match this in order to extract correct area data. Project CRS = WGS 84/Pseudo Mercator EPSG:3857. The base map I am using is Bing Maps Aerial (accessed through Open Layers plugin). How do I do this without distorting the polygons and keeping them in place on the map?


texts: Creating regularly spaced, defined # of points within polygon in QGIS

texts:
I used the research tool "Regular Points" to produce a certain number of points within a polygon, but it forms a rectangular grid of points rather than only within the shape of the polygon. Since I need a certain number of points within the polygon, is there any way to do so without trial and error?

E.g. right now only 8 of the 25 points I want are within the polygon, but I want 25 points, so I could increase to 50 points and see how many then appear within the polygon


texts:
Based on this tutorial, I can easily find out a tile for a point.

Is there an algorithm to find all tiles that are covered by a rectangle or lineString or by any other feature?


texts: How to open a Higher Level Landsat image with ENVI 5.2?

texts: A mistake every time I try to open the .MTL archive. The error that appears says "File does not appear to be a valid TIFF file". The archive's size it's smaller than it should be. Is there's any plugin to open correctly the images?


texts: Subsetting a x,y,z into a text file from a large xyz text file

texts:
I have a large txt file with x,y,z format. The file size is almost 8 GB. So I don’t want to process in ArcMAP. What I wanted to do is, I have a end coordinates for polygon shapefile and i have converted that nodes into x min, ymin, x max, y max and I wanted to Clip all the points within that polygon and save a clipped version into a txt file. My point is how I am going to clip a txt file with a bounding polygon?

Can you provide any Python, R and GDAl/ogr2ogr code?


texts: Cluster geometries that touch each other

texts:
I'm trying to cluster the geometries in a sf object that touch each other. For the moment I'm using the same approach that it's explained in the answer here, but the problem is that the same idea doesn't work if I consider a bigger number of geometries because the touching matrix becomes too memory-heavy and I'm not using its sparse properties.

A small and (I hope) reproducible example

# packages
library(sf)
#> Linking to GEOS 3.6.1, GDAL 2.2.3, PROJ 4.9.3
library(osmdata)
#> Data (c) OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright

# download data
milan_primary_highways <- opq("Milan, Italy") %>%
  add_osm_feature(key = "highway", value = "primary") %>%
  osmdata_sf() %>%
  trim_osmdata(bb_poly = getbb("Milan, Italy", format_out = "polygon")[[1]]) %>%
  magrittr::use_series(osm_lines)

# Determine the non-sparse matrix of  touching geometries
touching_matrix <- st_touches(milan_primary_highways, sparse = FALSE)
#> although coordinates are longitude/latitude, st_touches assumes that they are planar

# Cluster the geometries
hc <- hclust(as.dist(!touching_matrix), method="single")

# Cut the dendrogram
groups <- cutree(hc, h=0.5)

# Results
table(groups)
#> groups
#>    1    2    3    4    5    6    7    8    9   10   11   12
#> 1444   21   18    8    4    5    8    2    3    5    2    2
plot(st_geometry(milan_primary_highways), col = groups)

Is there an alternative approach that takes advantage of the sparse property of the touching matrix (that I cannot use because as.dist just accepts a numeric matrix). Do you want me to provide an example when this approach does not work? The error is simply "R cannot allocate a vector of size n GB" when I use the function hclust(as.dist(x)).

I don't know if it's important but I tried to explain the reason why I need this clustering here


texts: How to split string, removing digits keeping letters/words

texts:
How to split string (the last digits) in QGIS?

new street 25 = new street

old street 2 = old street

lower 26A = lower

lower new street 125 = lower new street

Jozefs and Elisabeths new gardens 147A = Jozefs and Elisabeths new gardens


texts: Reprojecting Nat Earth Raster to Wagner VII

texts:
While trying to reproject a raster file from Natural Earth (HYP_HR_SR_OB_DR) to a Wagner VII projection, QGIS 3.12 just throws an error. Other projections work out fine, mostly.
This is the GDAL call
gdalwarp -t_srs ESRI:54076 -r near -te -22077666.393789396 -9040858.441675251 18287107.47227834 10317214.927558815 -of GTiff
    "C:/HYP_HR_SR_OB_DR.tif" C:/981cf88244ae43529643eef67d033744/OUTPUT.tif

Produces this error
ERROR 1: Too many points (10201 out of 10201) failed to transform, unable to compute output bounds.

Dataset is accessible here, comes as +proj=longlat +datum=WGS84 +no_defs :
https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/raster/HYP_HR_SR_OB_DR.zip
Also tried to do the same in R using the raster package, but there the result is just an empty raster.
projectRaster(HYP_HR_SR_OB_DR,crs = "+proj=wag7 +lon_0=0 +datum=WGS84 +units=m +no_defs",over = TRUE)

Am I missing something?


texts:
I have processed a LiDAR data and produced LAS files for an area that was flown by my team. We have processed some areas and the outputs were pretty good. I observed that we are now getting erratic and wavy pattern when the LAS is produced.

There was no error observed while processing the SBET used to create the LAS files or flight operator issues.


texts:
I'm using GRASS but, in case, I'm also familiar with R and QGIS.

I'm trying to convert a vector area map into a raster one. My problem is that the resolution of the raster is too low (and I can't change it for other reasons) so many areas disappear.

I need each raster cell covered by the vector to be converted and to associate to the cell the coverage (i.e. if the 20% of the cell is covered by the vector map its value will be 20).


texts: Import error for qgis.core when running OSGeo4w shell script

texts:
I've been trying, along with this post, to run a script in OSGeo4w Shell, outside of QGIS. But I get the following error:

  ImportError: No module named qgis.core

I have also read the following posts and tried to import various modules but to no avail:

How to run sextante algorithms outside of QGIS python console?
How to run a simple python script for QGIS from outside (e.g. Sublime Text)?
Writing standalone Python scripts using PyQGIS?

Here is a simple script which creates a grid and clips a polygon shapefile onto it.

Note: This script has been tested and works successfully when running in QGIS.

##Test=name

import os
import glob
import sys

sys.path.append("C:\Program Files\QGIS Brighton\lib;%OSGEO4W_ROOT:\=/%/apps/qgis;%OSGEO4W_ROOT%\apps\qgis\bin;%OSGEO4W_ROOT%\apps\grass\grass-6.4.3\lib;%PATH%")

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

QgsApplication.setPrefixPath("C:\Program Files\QGIS Brighton\apps\qgis", True)
QgsApplication.initQgis()

from os.path import expanduser
home = expanduser("~")

#   Folder path of the Results for shapefiles
path_dir = home + "\Desktop\Test\\"
path_res = path_dir + "Results\\"

def run():
#   Set directory, search for all polygon .shp files and run the Create Grid and Clip algorithms then output results into Results folder
    os.chdir(path_dir + "Shapefiles\\")
    for fname in glob.glob("*.shp"):
            outputs_1=processing.runalg("qgis:creategrid", 1000, 1000, 24108, 18351.157175, 258293.802316, 665638.226408, 1, 'EPSG:7405',  None)
            outputs_2=processing.runalg("qgis:clip", outputs_1['SAVENAME'], fname, path_res  + "/"+ fname)
run()

QgsApplication.exitQgis()
#   Remove the above line when running in QGIS

Following the answer and the script posted by @gcarrillo, I can finally import the qgis.core. modules successfully. The script provided by @gcarrillo runs but I receive a Traceback error:

Traceback (most recent call last):
  File "Test.py", line 55, in <module>
    run()
  File "Test.py", line 53, in run
    algClip.processAlgorithm(progress)
  File "C:\Users\username\.qgis2\python\plugins\processing\algs\qgis\ftools\Clip.py", line 59, in processAlgorithm
    layerA.pendingFields(),
AttributeError: 'NoneType' object has no attribute 'pendingFields'


texts: How to use rotated text labels in GeoServer based on attribute value?

texts:
I have several text layers in GeoServer, which are now shown as point layers with tiny graphic size and with labels (As mentioned in my previous question). All thses labels are, as expected, drawn horizontal. But I want them to be drawn at an angle, available in corresponding database table.
I can not use simple rotation property, since it rotates all the labels at a specific angle.
How can I accomplish this?


texts: Creating Irregular ellipses using SQL Spatial 2012 Geometry

texts:
I have stumbled across a problem in SQL Server 2012 - whereby I need to create different shape ellipses from the following data points:

centre_x | centre_y | max_x | max_y | min_x | min_y

I have tried the create curvepolygon approach but this doesn't work too well, especially if one side of the ellipse is different to the rest, it just seems to create two circles and merges them.

Does anyone have an idea how I can tackle this approach? This is for a project where tree caponies need to be displayed, where the respective shape can be different for each feature.

If there is a way whereby I normal ellipses can be made, this may suffice.


texts: Why won't my jpg/png fit to display for georeferencing?

texts:
I have a jpg of a scanned map. I can add it to arcmap, and view it fine until I try to assign spatial coordinates. When I use the georeferencing toolbar to "fit to display" to begin the process, the image does not appear to fit to display, and on top of that is no longer visible. If I hit 'zoom to layer' I'm brought to the display screen I selected, so it's like the image is there it just isn't visible. This was a pretty big, detailed provincial map but I didn't think that would matter.

The jpg. what created from a large map I scanned into 12 pieces. I sewed the pieces together into 1 jpg for georeferencing in ArcGIS. I wonder if that's a factor. Jpg is 28 MB. I've georeferenced 377 MB just fine in the past.

I also tried converting to png. Same thing. The image won't load for georeferencing. Any ideas how to fix? Everything is fine until I touch "fit to display"


texts: I have a multipolygon layer, in which some geometries are circles, drawn in an unknown GIS. How can I select only those features which are circular? A quick manual check confirms that circular features do not all have the same number of points/vertices.


texts: QGIS does not open (installation problem?)

texts:
I downloaded QGIS 1.8.0 (Windows) and installed the software. Installation was completed succesfully. However, I cannot open the software. When I start the QGIS, I receive an error message "qgis.exe has stopped working".

Tim


texts: How can you auto-populate field using spatial location of another feature and its attributes?

texts:
I want to auto-populate a field based on the spatial location of another feature's attribute.

Add a point on top of a building.
The point automatically adds the name of the building.

This seems like a standard work flow.

Does anyone know how to do this?
Is it an event trigger?

The goal is to assist field workers using what seems like simple GIS logic.


texts: Tippecanoe Vector Tiles overzooming not working

texts:
I have created Vector tiles with Tippecanoe in mbtiles format. I am using tileserver-gl for serving the Vector tiles. Firstly I am creating 20 mbtiles separately as different layers needed different Tippecanoe options. After that I join tiles with tile-join feature. In tilestats of mbtiles json file I am getting  different minzoom and maxzoom for each layer. The problem is the layer became invisible after the maxzoom level, the overzooming is not working though I have assign minzoom and maxzoom in style json file. It's working if I create vectortiles with a single script by providing multiple json layer as the zoom is the same for each layers. But few of my layers need much precision level data so that I have to create maxzoom z15 for each layer. As a result mbtiles becoming too high in size and taking a lot of time to create vector tiles.

Moreover when creating vector tiles with multiple json a lot of data lost in zoom scale 10-11. Again point layers also behaving weirdly. Such as, a single point feature is showing 5-6 times (See the attached image below).

What will be the best options for creating vector tiles with tippecanoe. Am I in the right track for establishing a self-hosted vector tiles server with Tippecanoe and Tileserver-GL?


texts:
In order to plot azimuth values for example, does anyone know any good circular color map?
By good I mean, visually suited for human color perception.
I didn't find any suited color ramp preset in QGIS.
So I build one, like the following, by taking profit that HSV values are given as angular degrees:

But I wonder if there is some existing known color ramps for this particular purpose.

Useful link on how to set up a personalized color ramp in QGIS:
Color Ramp in QGIS

Other useful links on perceptual colormaps:

https://bids.github.io/colormap/
https://www.youtube.com/watch?v=xAoljeRJ3lU (amazing video)
https://matplotlib.org/cmocean/
https://matplotlib.org/3.1.0/tutorials/colors/colormaps.html (nice refs at the bottom)
https://colorcet.com/download/index.html (thanks @obrl_soil hereafter)
#no more jet colormap!


texts:
I have recently purchased a Trimble GeoXH (used) and have done a few surveys. I have done differential correction in Trimble Pathfinder Office and all points seem fine.

When exporting to shape and other formats, all points is warped or compressed in Y-axis (and maybe X as well). Could this be a projection problem? Other solutions? I need to use the data in Qgis or similar.


texts: how print very high resolution image (deleting white background) in QGIS

texts:
I would like to print something like this .TIFF image :

but I need to do it with a high resolution,so I have been told to use QGIS and especially the print composer to create an object that can be set with a certain resolution starting from 300dpi to be printed.

My problem is that when I load my tiff as a raster,first I see this image in QGIS like that :

and that could seems ok, but the in the print composer the added object is my image with the whole white background :

and that background is also included in the object when I try so save it as an image with a specific resolution.
So how can I put away this white background immediately in QGIS ,without bringing it also in the print composer?
please help me!!


texts: How to move an Oracle spatial table to another db?

texts:
I have uploaded a polyline data (50 million rows) to oracle spatial 10g as sdo_geometry through arccatalog and arcsde in my TEST database.

Now, I need to move this table to QA database, this table is not having any relationships with other table.

It took nearly 1 day to upload the data to TEST through arcsde. I want to do it using Oracle tools, which is the best method to copy/move this huge data with all informations like index, metadata etc.,
thanks, vadivelan. P


texts: Repairing gaps in polyline to polygonize

texts: I have a large, complex coastal outline (polyline) that I am trying to polygonize. It won't work so I suspect there is a gap somewhere or some other error. Any ideas on a workflow to repair the outline and polygonize it without trawling the polyline section by section looking for gaps? It is over 100 MB so most processes are slow.


texts:
I am new to spatial analysis! I need to plot some data from FAO's world soil map found here. The description of the data suggests it should have multiple attributes (e.g. elevation, slope etc). When I download the raster, however, it doesn't have any attributes.

What am I doing wrong?

x<-raster("hwsd.bil")
ratify(x)

> ratify(x)
class      : RasterLayer
dimensions : 21600, 43200, 933120000  (nrow, ncol, ncell)
resolution : 0.008333333, 0.008333333  (x, y)
extent     : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
crs        : NA
source     : C:/Users/jam/Desktop/graph/hwsd.bil
names      : hwsd
values     : 0, 32049  (min, max)
attributes :
        ID
 from: 0
 to : 32050


texts: Find vertices of LineStrings within Polygon - Shapely

texts:
I would like to use Shapely to find the vertices that are located within the boundaries of a Shapely Polygon. So far, I could only manage to get it running by converting the LineString and the Polygon to a GeoPandas DataFrame and use the Geopandas within(...) function. Ideally, the function that I am looking for would return a list of Shapely Points that were either kept or are the ones that were within the Polygon.
Here a little code example of what I have done so far:
fault_ls and interface_ls are Shapely Linestrings.
# Creating a buffer around the fault trace
fault_polygon = fault_ls.buffer(radius)

# Creating GeoDataFrame from Polygon
fault_polygon_gdf = gpd.GeoDataFrame({'geometry': [fault_polygon]}, crs=crs)

# Create lists with X and Y coordinates from LineString
x = [i[0] for i in interface_ls.coords]
y = [i[1] for i in interface_ls.coords]

# Creating GeoDataFrame from LineString
interface_ls_gdf = gpd.GeoDataFrame(geometry=gpd.points_from_xy(x, y, crs=crs))

vertices_in = interface_ls_gdf[interface_ls_gdf.within(fault_polygon_gdf.loc[0, 'geometry'])]

vertices_out = interface_ls_gdf[~interface_ls_gdf.within(fault_polygon_gdf.loc[0, 'geometry'])]

vertices_in are the vertices within the buffer, vertices_out the ones outside that I want to keep.


texts: How to copy the geometry WKT from a temporary scratch layer in QGIS?

texts:
It seems in the 2.14.2 version of QGIS the ability to copy the WKT from the geometry of a temporary scratch layer has been removed.

Previously you could create, for example, a new polygon feature in a temporary scratch layer and use the identify tool to reveal the attributes of the temporary feature. From there, you could right-click the feature and 'copy' the feature attributes, which contained the WKT of the geometry of the feature.

Now the identify window and the attribute table are both blank where they used to show the attributes of the feature.

That was super handy for spatial queries using ad-hoc geometries...

Any thoughts?


texts: Overpass: find highways that go below a bridge

texts:
I am looking for a overpass turbo query to find 4-lane highways that go below a bridge, similar to

Here is what I have so far

[bbox:{{bbox}}];
way[lanes=4][highway=motorway]->.major;
way[bridge=yes]->.minor;
node(w.major)(w.minor);
out;

But it seems to find only highways sections where the highway itself is temporarily a bridge.
How to fix the query?


texts: How to either cache or serve locally tm2 vector tiles downloaded from mapbox studio

texts:
I'm trying to locally host / serve / cache a set of tiles for a very small geographic area in a mapbox js application I'm building. I've been searching for a way to do this, but most of the info I've come across seems to center around mbtiles - which it doesn't seem that mapbox studio gives you the ability to export any more. The only option I'm aware of is to download a package in the form of "tm2z".

How would I host this package locally?
Or how would I export an mbtiles package?

I've seen this thread:
Using Mapbox Studio (aka Tilemill 2) to create a self-hosted map

which was somewhat helpful in understanding the process, but I'm still lost as to how to get a data source one of these servers would understand.

I also found this:

http://www.azavea.com/blogs/labs/2015/05/converting-mapbox-studio-vector-tiles-to-rasters/

but it only covers tm2 files. I've found zero information about handling the tm2z format.


texts: Using lidR to count number of pulse returns at different intervals?

texts:
I am trying to get the number of pulse at different height interval.

I have used the lidR package to do this before with the code below but it seems that recent update in the package breaks my code. My main error is that when I run the function I get an error that says the ScanAngle and PulseID no longer exist. Any help on which function I should use now?

The following code used to work:

# the number of points is computed.
grid_metrics3d(lidar1, length(Z),res = 0.5)

# Cloud of points is voxelized with a 1-meter resolution and in each voxel
# the mean scan angle of points is computed.
grid_metrics3d(lidar1, mean(Angle),res = 0.5)

# Define your own metric function
myMetrics = function(i, ScanAngleRank, PointSourceID)
{
  ret = list(
   npulse  = length(unique(PointSourceID)),
   angle   = mean(ScanAngleRank),
   imean   = mean(i))

   return(ret)
}

voxels1 = grid_metrics3d(lidar1, myMetrics(Intensity, ScanAngle, PointID ),res = 0.5)
plot(voxels1)


texts: Polygons and colors do not appear in qgis2web export

texts:
I have been trying to export a map from QGIS using the qgis2web plugin. But my polygons and classification colors are not displayed in the exported HTML file, I only can see the Google Street Map layer.
My map has a layer for Google Street Map and another with polygons from a shapefile, colored based on one of the columns from a CSV file.
Here's the map:

When I try to export the map (I tried OpenLayers and Leaflet), the preview is what I expect:

but the final HTML file only displays the Google Street Map layer. Not the polygons/colors.

Any thoughts on why is that happening?
EDIT:
Included the 'appearance tab'


texts: CREATE TABLE AS with geometry in SpatiaLite

texts:
I would like to create a new SpatiaLite table based on a command.
For example, I would like to transform a table to a different coordinate system:
SELECT Transform(Geometry, 3068) FROM points_berlin;

To create a new table I would do this in PostGIS:
CREATE TABLE points_berlin_3068 AS
SELECT Transform(Geometry, 3068) FROM points_berlin;

Although this creates the table and the table has as many rows as the input table it is not a spatial table. How do I get the geometry to show up in the new table?


texts: How to save output in different file after clip

texts:
I am new to GIS.

I have several rasters in one file location

I am using clip tool to loop over several rasters in arcgis. When I start I am choosing workspace, which is the folder where my input files are. However after clip I want to save output into different file. I could not figure it out how to do.

Can you please show me?

Here is my code.

# Import arcpy module
import arcpy
from arcpy import env
from arcpy.sa import *

# Setting working directory
arcpy.env.workspace = r"D:\Research\arcgis"

# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")

# Local variables:
Tr_pro = "D:\\Tr2009\\admin\\Trpro.shp"
Tr_lyr = "D:\\Tr2009\\admin\\Trlayer"
Tr_dist = "D:\\Tr2009\\admin\\Trdist.shp"

arcpy.MakeFeatureLayer_management(Tr_dist, Tr_lyr)

arcpy.SelectLayerByAttribute_management(Tr_lyr, "NEW_SELECTION", "\"Name\" = 'Adi'")

rasterList = arcpy.ListRasters("F*")
for raster in rasterList:
    arcpy.Clip_management(raster, "25.665181 35.812875 44.826408 42.104629", "M"+str(raster[1:]), Tr_lyr, "255", "ClippingGeometry", "NO_MAINTAIN_EXTENT")

If i use this code, it saves all output into the workspace that I defined in the beginning. However I want to save it to another location such as "D:\Tr2009\admin\output


texts: OpenLayers.DOTS_PER_INCH (DPI) can be set to a value the developer chooses. Its default is 72 (from what I have researched) my question is, is there a maximum DPI that OpenLayers can be set to?


texts:
I'm using node.js to connect to a PostGIS database to check if an input feature significantly intersects with an existing feature.

The error seems to be with the nested SELECT statement - can anyone correct this for me?

I've checked that the randomnum and drawingGeo variables are valid inputs (examples below). the_geom is also definitely the geometry column.

  drawingGeo =
  {"type":"Polygon","coordinates":[[[-337154.39223673707,6715717.913400569],[-337111.09782618494,6715721.794968411],[-337102.4389440745,6715706.865861325],[-337135.2829796658,6715702.088547057],[-337154.39223673707,6715717.913400569]]]}
  randomnum = 11702

var drawquery = client.query('SELECT gid from buildings
    where(st_area(st_intersection(ST_GeomFromGeoJSON("'+drawingGeo+'"),ST_GeomFromGeoJSON(
        SELECT ST_AsGeoJSON(the_geom) from buildings where gid = '+randomnum+'))))/
            st_area(ST_GeomFromGeoJSON("'+drawingGeo+'")) > .8');

EDIT: Error given in node:

events.js:72
        throw er; // Unhandled 'error' event
          ^
error: syntax error at or near "type"

Error when I copy the query into PgAdmin:

ERROR:  syntax error at or near "SELECT"
LINE 2: ...141033,6706842.085406107]]]}'),ST_GeomFromGeoJSON(SELECT ST_...
                                                         ^

********** Error **********

ERROR: syntax error at or near "SELECT"
SQL state: 42601
Character: 335


texts: Adding ArcGIS Server services or ArcSDE datasets to Tilemill?

texts:
Our web design department wants to use mapbox/tilemill to create webmaps for our public websites, but all our data is made available through ArcGIS-server or ArcSDE. Is there some way to use these directly in tilemill, maybe through OGR, or serverside script thats converts ArcGIS-services into geojson?
I would prefer not set up a parallel storage in shapefile if I don't have to.

Extra caveat: our designers are hardcore Mac-users.


texts:
I am trying to write a string that will call for a error log.  Here is the error I am getting:

Python Exception <IOError>: [Errno 22] invalid mode ('r') or filename: 'C:<backslash>Users<backslash>Kyle<backslash>Documents<backslash>FRONTIER<backslash>Project1_varasett2frogs<solidus>V2Frogs_detaillog_20151110_142249916000.txt'

The FMEMacro DETAIL LOG is what is set to that filename.  I am not the greatest at python and having issues trying to figure out where i went wrong.

Programs I am using are FME and ArcMap 10.3

Here is the entire script:

import fme
import sys
import fmeobjects
import datetime
import time

# Template Function interface:
def processFeature(feature):

    endstamp = datetime.datetime.now()
    endstamp = endstamp.strftime("%Y-%m-%d  %H:%M:%S.%f")
    dataset_list = feature.getAttribute('DATABASE_NAME').split(',')
    dataset_list = list(set(dataset_list))
    dataset_list.sort()
    dataset_list = ', '.join(dataset_list)

    # Read detail log and extract summary data
    with open(FME_MacroValues['DETAIL_LOG'], "r") as ins:
        delete_count = 0
        insert_count = 0
        update_count = 0
        redundant_count = 0
        error_count = 0
        action_list = []
        merged_list = []
        for line in ins:
            line_array = line.split(' :: ')
            line_action = line_array[3].replace('\n','')
            action_list.append(line_action)
            if line_action.upper() == 'delete':
                delete_count += 1
            elif line_action.upper() == 'insert':
                insert_count += 1
            elif line_action.upper() == 'update':
                update_count += 1
            elif line_action.upper() == 'redundant':
                redundant_count += 1
            elif line_action.upper() == 'error':
                error_count += 1

    # Create email body/summary (including location of detail log)
    email_body = "THIS IS A MOCK RUN - NO WRITERS HAVE BEEN ENABLED \n"
    email_body += "Start:\t" + FME_MacroValues['Time'] + "\n"
    email_body += "Finish:\t" + endstamp + "\n \n"
    email_body += "Inserted:\t" + str(insert_count) + "\n"
    email_body += "Updated:\t" + str(update_count) + "\n"
    email_body += "Deleted:\t" + str(delete_count) + "\n"
    email_body += "Redundant:\t" + str(redundant_count) + "\n"
    email_body += "Errors:\t\t" + str(error_count) + "\n \n"
    # Send email w/ detail log as attachment
    # Output attributes for debugging
    feature.setAttribute('body',email_body)


texts: GDAL (or other open-source) equivalent of Arc's Point To Raster Tool

texts:
I'm trying to convert a python script that relies on arcpy into one that only relies on open source modules, but I'm having some trouble. The bulk of my processing lies in one Arc tool "Point to Raster." The goal is to take a csv file with lat/long coords and turn it into a raster, where each cell value is the number of points contained within that cell. When I'm able to use arcpy, the workflow looks like this:

Make XY event layer from csv of points -->
Use Event layer as input in Point To Raster tool, with cell assignment = COUNT, specifying spatial extent and cellsize -->
Mask out NoData values -->
Write output to .tif

This works fine, and gives me my desired result, but now I need to write the same script without arcpy. I've found gdal tools that work for everything except the main process: Point to Raster. Do you know of any gdal utility (or reluctantly, some other open source tool) that could do what Arc's Point to Raster tool is doing? The 2 gdal tools that look like they could possibly accomplish this are:

gdal_grid (http://www.gdal.org/gdal_grid.html)
-This tool isn't meant to do exactly what I want it to do, although it does take a set of points (could be a shapefile, or a csv written as a VRT**) and turn it into a raster grid. I can specify the extent of the gridd along with its resolution, which is important. There is also an option to set grid cell values based on data metrics, with 'count' being one of them. However, under the count metric it states "A number of data points found in grid node search ellipse." What does 'grid node search ellipse' mean? Can I not assign values based on a number of data points found in each grid cell'? Is there a difference?
gdal_rasterize (http://www.gdal.org/gdal_rasterize.html)
-This one looks a little less promising, or maybe that's just because I don't entirely understand it. In summary, the tool "burns vector geometries (points, lines and polygons) into the raster band(s) of a raster image," which sounds like what I need, although there is no keyword to specify point count as the value to be burned, so I don't know.

A few more things:

**I was going to test using gdal_grid, but can't find anywhere how to convert a CSV to a VRT in python. I know it's possible by hand, every tutorial/help page I can find says something like: "Say you have a CSV with lat/long, you can write a VRT file for that CSV" then jumps right into "Here's what the VRT file looks like for the CSV." But HOW do I write this VRT file, in python? Several pages say to download an FW toolkit (or something) to create the CSV, but I need to do this within python as I'm automating the process for hundreds of CSVs. I tried ogr2ogr but got the error: "VRT driver does not support data source creation," so I'm at a loss. I could convert the csv to shapefile or some other OGR-recognized format, but the VRT is appealing because the shapefile/whatever that would be created would be very, very large and probably take a while to create. Which leads me to...
Each csv has an obsenely large amount of points: ~78 million. So python/numpy won't even read them without crashing. Additionally, the resulting raster will be global with fine resolution (1km), so a hack that manipulates the coordinates or loops through the points/cells is out of the question.

I'm not sure if I should put my CSV to VRT question in a separate thread, so my apologies if this is too much for one question.

Thoughts/suggestions?


texts: I have multiple line layers that represent bus routes and many of the routes overlap (i.e. near terminals, transfer locations, etc.)  Is there a function in Qgis which will display both features next/parallel to each other?  In the example link, the Red and Purple lines are two separate routes, they both utilize the same roads.  The purple line overlaps the red line and the red line is not visible.  I appreciate any feedback, even with the bad news that it is not possible.


texts: Write array to CSV inside arc script tool (works in pycharm, doesn't work in arc)

texts:
I have an arcpy script in which I am writing an array to a CSV (for later use in the script to make a routeing layer).

I've tried a couple iterations, and all work like a charm in PyCharm (can't pass up a pun, no matter how weak). But when I convert to script tool and run in the catalog in ArcMap 10.6, it doesn't write the CSV. (Other numpy operations work fine.) In my multiple scripting attempts, the CSV file is opened and headers are written fine; it poops out on writing the array.

When I check x.shape in PyCharm, it shows the right dimensions (91L, 4L)
When I check x.shape in Arc python shell, it shows the wrong dimensions [0, 4]

I don't understand why ArcGIS sees the array as empty.

nom_rup = arcpy.GetParameterAsText(0)
route_offset_km = arcpy.GetParameterAsText(1)
route_ptsSpacing_km = arcpy.GetParameterAsText(2)
eqk_name = arcpy.GetParameterAsText(3)
target_epsg = arcpy.GetParameterAsText(4)
outpath = arcpy.GetParameterAsText(5)

# in arc script tool, fields defined as follows:
# nom_rup > shapefile [note not needed for this self-contained snippet; so can browse to any SHP]
# route_offset_km > double, I entered 5
# route_ptsSpacing_km > double, I entered 1
# eqk_name > string [note not needed for this self-contained snippet; so can enter abc123]
# target_epsg > double [note not needed for this self-contained snippet; so can enter 12345]
# outpath > folder, I browsed to my output folder

rup_len_km = 89.932 # this is calculated elsewhere in the script, so I define it here in this self-contained snippet

start = 0
import numpy
stop1 = (numpy.ceil(rup_len_km) + 1) * 1000
step = route_ptsSpacing_km * 1000

start = float(start)
stop1 = float(stop1)
step = float(step)

# Execute
descritizings = numpy.arange(start, stop1, step)

# Clean up
del start, stop1, step

off1 = numpy.full((len(descritizings)), route_offset_km * 1000)
off2 = numpy.full((len(descritizings)), route_offset_km * -1000)
rt = numpy.ones((len(descritizings)))

route_table = numpy.array([descritizings, off1, rt, off2])
route_table = route_table.transpose()

outFile = outpath + '\\' + '_RouteTable.csv'
numpy.savetxt(outFile, route_table, fmt = '%d', delimiter = ',', header = "LOCATION, OFFSET1, ROUTE, OFFSET2", comments = '')

if I use

off1 = numpy.ones((len(descritizings))) * route_offset_km * 1000
off2 = numpy.ones((len(descritizings))) * route_offset_km * -1000

instead, as suggested in a comment below, here's the error I get (note line 170 is from the longer script but corresponds to the line that begins with "off1..."


texts: Qgis Python Plugin leaves orphaned variables in RAM, even after plugin reload

texts:
My python plugin for QGIS 2.18 opens files with millions of features.
To convert them in Qgis readable format, I run through several external python libs, one of them is a R-Tree tool, consuming 10G of RAM. Then I create a memory layer and add a million points or triangles. All intermediate steps and their variables are useless now and can be deleted. So far so good.

But if I remove the layer (or all layers completely) the RAM is still full, even after deactivating / reloading the plugin! Even after using "del(biggest_RAM_eating_variables)" or gc.collect().

RAM is only freed after stopping QGIS itself. The problem doesn't occur with the reader outside of QGIS.

Any ideas how to cleanup the RAM during QGIS runtime?
Or any ideas what might be the real problem?
Or how to run the plugin in an external, killable thread?


texts: Populating field with max M value of feature using Python in ArcGIS Field Calculator?

texts:
I need to calculate the max M value for a line feature using Python in ArcGIS 10 Field Calculator but I cannot figure it out.  In 9.3 I used the follow VBA expression…

**Pre-Logic VBA Script Code:**
dim m as imcollection
set m = [shape]
dim d as double
d = m.mmax

**EndStation =:**
d


texts: Using two fields to control display format on map in QGIS

texts:
I have a point shapefile with several numeric fields, among them FuelFlow and Slope. I have successfully applied colour to the various points according to the value of the FuelFlow field. Now I would like to control some other attribute of the map symbols (shape? size?) according to the value in the Slope field. Something like slope between 0 and 10 gets one display style, 10-20 gets a second style, 20-30 etc.
I get the sense that this is possible in QGIS (using v 2.2.0 - Windows) according to some of the tools in the Style dialog, but I don't know where to start.
Can someone point me in the right direction?
I believe I saw one online posting about using a CASE statement in the style definition, but now 1) I can't find it in the UI and 2) I don't know how to construct the CASE statement.


texts: Converting UK OS NGR coordinates to lat/long using ogr2ogr?

texts:
How do I convert UK OS NGR coordinates to lat/long using ogr2ogr?

I've read through the ogr2ogr page, but I can't see anything obvious on how to do it

I've used the FME trial and it was as simple as setting the target to WSG84

I've read Convert UK OS grid coordinates to decimal degree WGS84? but this uses a 3rd party tool, NGConv.exe


texts:
How can I add custom data to OpenStreetMap data?

We have some internal data sets, some in MapInfo format, some just Excel spreadsheets with post codes.

What we'd like to do is overlap our data on top of the OpenStreetMap data in a public facing web application, preferably from the raw data on our internal servers, but we could do a nightly build of a data layer for loading onto a hosting web site/server


texts:
I'm new to tessellation within ArcMap however I need it to produce a grid for millions of data points within a shapefile I have.

My logical flow is to generate a tessellation grid, spatially join one-to-many for my points and generate a count field. IF that count field is less than or equal to 50, I'd like to keep that hexbin. HOWEVER, if the count field is GREATER than 50, I'd like to rerun the tessellation grid and repeat until there are 50 points within a single bin.

In this case 50 is an arbitrary number we've just came up with, if it will be easier to have 100 points per bin that's OK too.

We are working with a global dataset however so there's 1 million + points for the individual countries and unfortunately we've been tasked to NOT BREAK UP the points by country.

I've attached my model thus far but I have a feeling this may be simpler to do in python. ModelBuilder is our first choice however due to the level of comprehension the folks this targets.


texts: given linestrings and multiline string defined in postgis how do I identify the coordinates of a point so many meters along a line

texts: I am using Postgis.  I have a linestring defined in postgis.  Using Postgis calls how would I go about identifying the coordinates of a point 100 meters along a line string.


texts: arcpy RasterToNumPyArray causes shift in location of values

texts:
I am converting a couple rasters to arrays, then performing calculations on them. First step- polygon to raster. This creates a 1/0 mask that I can multiply the larger raster by. After noticing my final outputs were a little off, I output the intermediate steps to see what was going on.

# Set environmental variables for output
lossm = r'C:\data'
arcpy.env.overwriteOutput = True
arcpy.env.outputCoordinateSystem = lossm
arcpy.env.cellSize = lossm
arcpy.env.snapRaster = lossm
cell_size = 0.00025

# convert polygon to raster- the mask
arcpy.PolygonToRaster_conversion(polygon,"ISO",country_boundary_tiff)
#get number of rows and columns of aoi
arcpy.GetRasterProperties_management(country_boundary_tiff,"COLUMNCOUNT")

numRowResult = arcpy.GetRasterProperties_management(country_boundary_tiff,"ROWCOUNT")
numCol = int(numColResult.getOutput(0))
numRow = int(numRowResult.getOutput(0))

# Create raster object from file
boundary_obj = arcpy.Raster(country_boundary_tiff)

# get the xy coords of lowerleft corner of boundary object
desc = arcpy.Describe(boundary_obj)
gmb_mx = desc.extent.XMin
gmb_my = desc.extent.YMin

# convert boundary object to array
boundary_array = arcpy.RasterToNumPyArray(boundary_obj,arcpy.Point(gmb_mx,gmb_my),numCol,numRow,cell_size)

# conver array back to tif
outputraster = arcpy.NumPyArrayToRaster (boundary_array ,arcpy.Point(gmb_mx,gmb_my),0.00025)

outputraster.save(r'C:\Users\' + '\\' + country+ '_boundary2.tif')

At this point the file has gone from polygon -> raster -> numpyarray -> raster, and in the process has moved up 1 pixel. I did another test where I added another iteration of raster -> array, and it moved the output raster even further up.

The cell size, numrows, numcol, and extent are identical for these 2 files pictured (green= raster in the right place, orange= raster shifted). So fixing the x/y parameters when running rastertoarray won't change anything. It is the location of the cells being coded to 1 that is changing. The mask (value 1) is shifting around within the extent of the entire raster.

Can someone help by telling me how to keep the raster from shifting?


texts: How to show draw effects in legend in QGIS

texts:
I have edited the features on my map using the draw effects tool (colourize, glow etc). However, in Print Composer, the legend shows these feature symbols in their original form. How can I get them to match my edited symbols?

I am using QGIS 2.14.


texts: Geoserver parameterized SQL View layer vs. SQL View layer with WMS time dimension. Any differences in speed?

texts:
I have two PostGIS tables, cities (city_code and geometry column) and precip (city_code, date, precip). The precip table can have more than one entry for each city since I have a precipitarion time series in it.
In order to display municipal precipitation using GeoServer, I though of 2 alternatives:

Use a parameterized SQL View layer, joining the two tables and setting date as a parameter for the precip data. Something like:

SELECT a.geocodigo, data_ini, chuva, wkb_geometry
FROM lm_municipio_a AS a
JOIN dado_semana_munic AS b
ON a.geocodigo = b.geocodigo
WHERE data_ini = '%my_date%'

Create a SQL View layer that has all the dates, precip and geometries and use WMS Time Dimension to filter the date. The SQL View would be something like

SELECT a.geocodigo as geocodigo, data_ini, chuva, wkb_geometry
FROM dado_semana_munic AS a
LEFT JOIN lm_municipio_a AS b
ON a.geocodigo = b.geocodigo

Right now we are using the second option (SQL View + WMS Time dimension) and Leaflet TimeDimension plugin in order to create some animated precip maps. But I wondered if using a parameterized SQL View layer would be better. I ask this because in the first option, the SQLView is a smaller table with nrows = the number of municipalities. The second option has a larger table, with nrows = the number of observations (I have 20 years of weekly data).


texts:
I am trying to derive Land Surface Temperature(LST) from Sentinel 3 SLSTR dataset. The given literature talks about split-window and dual angle algorithms - Link

Ts = Ti + c1(Ti- Tj) + c2 (Ti- Tj)2 + c0 + (c3 + c4W)(1 - εn)+(c5 + c6W)Δε

T = at-sensor brightness temperature at bands “i” and “j”
W = total atmospheric water vapor
ε = mean emissivity
Δε = emissivity difference at the two bands
c0-c6 = Derived from statistical simulation

Emissivity calculation can be done as mentioned in the paper itself. However, I am not sure how to go about c0-c6 for split window. They might have carried out some statistical regression on ground/airborne datasets.

Is it possible to simulate MODIS LST and TIR Bands/any other satellite dataset (with dual angle algorithm) and then calculate the coefficients? I may also have access to weather station data for my region.


texts: Point an existing QGIS installation at a different gdal framework

texts:
I have QGIS installed on a mac via the official qgis.org binary installer. I'm running QGIS 3.10 and it shows that it's compiled against GDAL 2.4.1.
When I look at the GDAL Frameworks installed on my machine, the 'Current' symlink is pointed at:
/Library/Frameworks/GDAL.framework/Versions/2.4

This makes sense. When the qgis binary is installed does it compile against whatever this 'Current' link is set to, or does the QGIS binary itself have gdal 2.4.1 embedded within it?
I want to run qgis 3.10 against GDAL 3.1, which I installed successfully via the kyngchaos .dmg. My 'Current' symlink is now pointed at GDAL 3.1 and 'gdalinfo --version' run from the command line reports version 3.1.2. When I start qgis, it is still running gdal 2.4.1
What do I need to do to get QGIS to use the gdal 3.1 framework?
If I re-install the QGIS 3.10 binary, will it compile against gdal 3.1?
Is there another way to point my existing QGIS 3.10 installation at this 3.1 framework?


texts:
Can I change the shape of the shield on a point symbol from square to circle as shown in the image?

Alternatively, can I import symbols (specifically in a vector format) from Corel Draw?

It can't be in an image format.

The export to EMF from Corel solution is fantastic, but I can't change colours once used as a symbol in ArcMap (See image below).

@JR - I don't have that font option.

How can I add it?


texts:
I  want to  use Taverna to call an OGC WFS, and the file returned from WFS is GML, but what I want is SVG, so I have to convert GML to SVG by using Taverna. The Method I used ExecuteProcess_gml2svg, comes from a WSDL.

The process and the GML datasource is as shown:

The problem is when I use the datasource url in the picture (that is the 'random_points' gml datasource is http://rsg.pml.ac.uk/wps/testdata/random_points.gml), it works well, but when I download the datasource, and use Appache server in my pc to publish the same GML datasource (the url is like http://chenhongyan.com/random_points.gml), the process does not work, and the errors are:

Processor 'ExecuteProcess_gml2svg_2' - Port 'ProcessOutputs':
An error occurred invoking the WSDL service
<ows:Exception xmlns:ows="http://www.opengis.net/ows/1.1"
 xmlns:wps="http://www.opengis.net/wps/1.0.0"
 xmlns:xlink="http://www.w3.org/1999/xlink"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 exceptionCode="NoApplicableCode" locator="None">
 <ows:ExceptionText>
 object of type 'exceptions.IOError' has no len()
 </ows:ExceptionText>

and I just don't know what can I do to solve it.Can you help me?


texts: Finding shapefiles of all major cities in world (National and state capitals) at sub-district level?

texts: One option is GADM. Having explored this data, while it satifies my need for some cities, its hard to find this data at such a granular level (lower than district level) for most of the cities.


texts: Use a polygon for a reverse cookie cutter

texts:
Is there a way using c# or arcpy to use a polygon to cut a
hole in a database through lines, points, and polygons, like a reverse cookie cutter?
This is without having to import and export the whole database. Just cut the hole in place in the database.


texts: Mapquest returning 2 records, one of them is bogus. What can I do?

texts:
I am searching for Easton, PA using the api. The URL sent to mapquest looks like this:

http://www.mapquestapi.com/geocoding/v1/address?key=your_key_here&location=Easton,PA&outFormat=xml&maxresults=1

the results are these (even though I have maxresults=1)

<lat>40.689353</lat> <lng>-75.216698</lng>

and

<lat>41.127201</lat> <lng>-79.5411</lng>

I cannot find an Easton in Clarion County. Any idea why is it working like this and how can I avoid these types of cases?


texts:
I need to do some analysis on UK postcodes that move location and by how much. As such I need previous versions of OS Codepoint files. I only need 1 file per year, ideally going back 5 years.

Anyone out there know where I can get my hands on this data? Ordnance Survey only appear to keep the latest update on their site.

I only have the the last two updates so am lacking the last 4 yrs.


texts: After joining data from csv file to shapefile, why are all values zero in categorized renderer?

texts: I have joined data from a csv file to my shapefile. The attribute table shows a successful join. I have converted the variable of interest to INTEGER. But when I go through Style to categorize the variable, all I get is zero. Help please!


texts: how to open second window in my plugin for QGIS?

texts:
I create a Mainwindow for my plugin, but if I want to open a second window from this Mainwindow, with click on push button. How can I do?
I tried the following function in my Main Class:

    dialog = QDialog()
    dialog.ui = Ui_SecondWindow()
    dialog.ui.setupUi(dialog)
    dialog.exec_()

But does not work.
I use QGIS 2.4 and PyQt 4.


texts: Adding kernel density output to map with ArcPy

texts:
I am trying to emulate the behavior of the Kernel Density tool from the ArcMap 10 GUI in a script; in other words, I want to calculate the density of a dataset, and add the visual result to a map. If possible, I'd also like to be able to adjust the color and transparency of the kernel density layer, as one can in the layer properties dialog in the GUI.

I know one can run the kernel density tool in a script, but I am not sure how to add the output to the map like the GUI does. Is it possible to do this in ArcPy?


texts:
Looking for a way to crowd-source polygon creation on Google Maps (in a wiki environment) that doesn't involved ESRI's expensive server software.

Requirements:

a bunch of different wiki pages can be updated with a map showing a single polygon.
all the polygons over the entire site are combined into one master map
preferably everything in KML so Fusion Tables can be involved for styling, but not necessary

Any ideas?


texts: How to convert projected coordinates to geographic coordinates without ArcGIS?

texts: I'm trying to convert a series of points from Easting Northing to LatLong, I have this working perfectly in Arc but ideally I would like the algorithm to do it through our own system. It is a huge amount of points so standard conversion websites aresn't much good to me.


texts: I found this photo on google map satellite mode looks like sank ship


texts: How to use intersection in spatial guery in postgresql?

texts:
I want to get id, time and point_metric columns from intersection between two geometry(geom_lines and gem_houses). I wrote following sql code, however it fore an error (argument of WHERE must be type boolean, not type geometry). I searched and knew I must use "ST_Intersection" instead of "ST_Intersects" operator. But, "ST_Intersects" only get boolean whilst I need geometry, so I have to use "ST_Intersection", I think. Dose anybody have an idea?

SELECT id, time, ST_AsText(geom_houses) FROM my_table
where ST_Intersection(geom_lines , geom_houses);


texts: Qgis making a backgound map for topolines on Garmin

texts:
I am a new user of QGIS, I would like to make a background map with Topolines in gmap or img format.

So I started off with Opendem shape files. I have successfully combined the tiles I want into one shapefile. I would like to use them as a background to view behind an OpenStreetMap map, on a Garmin Etrex 20.

Now I just do not know where to go from here.

Do these files need to be converted into raster files or what would be next?

Can someone point me to a good tutorial?


texts: Setting up PyCharm CE 4 to work with PyQGIS library in Mac OS

texts: I am trying to set up pycharm to work with pyQgis library but with not success till now. I am using PyCharm CE v4 and QGIS version 2.8 I have tried to  implemnte the instructions of several posts like http://osgeo-org.1560.x6.nabble.com/PyQGIS-API-code-completion-not-working-in-PyCharm-td5082591.html , or this http://inasafe.org/en/developer-docs/platform_osx.html#pycharm-setup but I did not get any positive result. Any clue about the solution?


texts: Online Map - Vector files postcode lookups - self serve, Mapbox or Gmaps?

texts:
I've been reading around how to serve vector tiles to an online map and I have a few questions about which tools and services are best to use together for an application that has c.1.5 million map views a month.

We receive mapinfo files which are converted to geoJSON via OGR2OGR.  These are then converted to vector tiles using tippecanoe.  We have the option to serve these files via a self hosted node.js tile server.

I'm interested in using Leaflet for the web interface to the map and using OpenStreetMap vector tiles as the base map.  I understand that I can download and serve these myself but I think the preference would be to call them from OSM.

I love the stuff that Mapbox have been doing but in reality I'm not sure that I need Mapbox studio and we are able to serve the vectors ourselves.  What we do need however is a postcode lookup service and hopefully an address autocomplete service.  I am aware that Google and Mapinfo both offer these services (so long as I use their maps) but the cost is high for the number of monthly map views I require.  I know that Mapbox offers a load of other services for the price, but as I see it it is only access to the APIs that I need (if I serve my own vectors).

Are there alternative services I can use for postcode lookup / address autocomplete other than Google / Mapbox?


texts:
I am not sure what to call my problem. From this image, I have a set of classified polygons (colored). I would like a way to classify the white polygons in the image.

I don’t have any attributes to base the classification on other than proximity to a classified polygon.  I have tried a naïve approach by using the near tool in Arc. This works fine enough but it becomes sensitive to outliers.  For example, a set of unclassified polygons may be surrounded by polygons of category  "A" but if there is a single “island” polygon of category "B" nearby, they’ll be classified the same as the island polygon.

I am looking for a way to rank the likelihood that an unclassified polygon belongs to a particular category based on proximity to arbitrary k-polygons. For example, if there is a polygon of category "B" immediately adjacent to an unclassified polygon but the next five closest polygons are of category "A", I'd like the system to rank the unclassified polygon as category "A".

I am wondering if there’s anything in R that would solve my problem. Really, any off the shelf method would work (python, qgis, postgis, arc).


texts: Is there a way in ArcMap Legend Properties to make the legend above look like the picture below?


texts:
1) Whether I run a processing algorithm or just try to export to another CRS the layer is being output as a different CRS, eg. EPSG:102003 returns USER:100026. EPSG:102005 returns USER:100030

It is creating problems with the processing modeler and it's annoying to have to check every layer to see if the CRS has been maintained or changed.

the next issues are probably related to the first

2) Layers with the same CRS do not line up.

3) 102005 is projected sideways

All my data is in North America. I updated from 3.2 because of a bug in the raster calculator that caused it to fail in the processing modeler.  I didn't have any CRS issues in 3.2.


texts: I am looking for a Python implementation of offline reverse geocoding with current data.  I can't seem to find anything with data that has been updated recently. I tried reverse_geocode, but the accuracy is far from acceptable and I won't be able to use an API...


texts:
I made form in qt designer for QGIS. But there are a lot of fields in It and It can't placed in screen. I want to add scroll area in my qt designer form but It doesn't work as scroll doesn't appear.
Maybe I do something wrong?


texts: Creating correlation chart in Google Earth Engine?

texts:
I want to create a correlation chart between LST and NDBI for an area in Google Earth Engine (GEE). I have already created separate charts for both of these and now I need to know the correlation coefficient between the two.

Link to my Code: https://code.earthengine.google.com/f645e5e58586b9cef5da15bacf65e25c

I used the following piece of code to create the correlation chart, but there's an error popping up which says, "Error generating chart: Array: Parameter 'values' is required."

var yvalues = ee.Array(LST_ym.get('LST_Day_1km'));
var xvalues = ee.Array(NDBI_collection.get('B5'));
var chart = ui.Chart.array.values(yvalues, 0, xvalues)
.setSeriesNames(['LST_ym', 'NDBI_collection'])
.setOptions({
  title: 'LST vs NDBI',
  hAxis: {'title': 'LST_ym'},
  vAxis: {'title': 'NDBI'},
  pointSize: 3,
});

print(chart);


texts: QGIS (2.14 and olders). Problems with OGC SLD Text Labels Support

texts:
Could you tell me if QGIS 2.14 (and older versions) support SLD labels correctly?

I had some problems trying to incorporate some SLD files that labels specific objects in a layers.

This is my SLD code:

<Rule>
<Name>Index Topographic Countour</Name>
<ogc:Filter>
   <ogc:PropertyIsEqualTo>
       <ogc:PropertyName>id</ogc:PropertyName>
        <ogc:Literal>60101</ogc:Literal>
   </ogc:PropertyIsEqualTo>
</ogc:Filter>
<LineSymbolizer>
   <Stroke>
       <CssParameter name="stroke">#926239</CssParameter>
       <CssParameter name="stroke-width">.3</CssParameter>
       <CssParameter name="stroke-linecap">round</CssParameter>
   </Stroke>
       <TextSymbolizer>
         <Label>
           <ogc:PropertyName>elevation</ogc:PropertyName>
         </Label>
         <LabelPlacement>
           <LinePlacement />
         </LabelPlacement>
         <Fill>
           <CssParameter name="fill">#926239</CssParameter>
         </Fill>
         <Font>
           <CssParameter name="font-family">Arial</CssParameter>
           <CssParameter name="font-size">10</CssParameter>
           <CssParameter name="font-style">normal</CssParameter>
           <CssParameter name="font-weight">bold</CssParameter>
         </Font>

       </TextSymbolizer>

</LineSymbolizer>
</Rule>

Note: I am selecting a line object using the item "id" with value 60101 and I labeled it with the item "elevation". That means in a topographic countour layer I only want to label "Index Topographic Countours" and not others. And nothing will happen with QGIS.

I also I haven't found any way to label only one specific object in  layer using common QGIS tools.


texts: Generating a GDAL script through the QGIS Georeferencer

texts:
For several months, I have been georeferencing files manually using the Georeferencer plugin within QGIS.  I am now attempting to automate this process using GDAL.  The Georeferencer provides a "Generate GDAL script" option, which creates the following commands:

gdal_translate -of GTiff -gcp 774.73 -338 -88.52 34.37 -gcp 1012.17 -215.136 -81.22 27.48 -gcp 972.709 -486.055 -77.76 36.67 asciiMAE20121001.asc testoutput1
gdalwarp -r near -order 1 -co COMPRESS=NONE testoutput1 testoutput2

When I run this script, however, the georeferenced raster is placed about 40 degrees further west than where it should be, and 7 degrees further south.  Manually using the Georeferencer plugin continues to georeference the raster correctly.  I think the problem is with the gdalwarp, because the raster is just shifted too far from where it should be. The placement of the values within it appears to be correct, so it looks like the gdal_translate worked correctly.

Does anyone know why the GDAL script produced by the Georeferencer would produce a raster displaced from the raster produced manually by the plugin?


texts: How to insert data into postgis database table?

texts:
I am a newbie in spatial database, so I am having lots of issues even in small tasks and now I am having some issue with inserting data to the table. I have followed the postgis documentation but however, I'm getting some error while inserting data to the table.
In the code below, I am trying to insert an array of co-ordinates which are in long/lat format by converting them into points and adding to the table.

INSERT INTO route(ID, ROUTE_NAME, geom)
VALUES (1, 'route 1', ST_GeomFromText('LINESTRING(ST_MakePoint(27.69858, 85.28154), ST_MakePoint(27.69804, 85.28155), ST_MakePoint(27.69337, 85.28174), ST_MakePoint(27.69356, 85.28275), ST_MakePoint(27.69378, 85.28370), ST_MakePoint(27.69409, 85.28449))',900913));

Table create structure:
CREATE TABLE ROUTE( ID int4, ROUTE_NAME varchar(25), geom geometry(LINESTRING,900913) );

But, I am getting "LINESTRING(ST" <-- parse error at position 13 within geometry error.


texts: Changing "Number Format" to "Numeric" in ArcGIS Pro?

texts:
I'm having some trouble creating a dot density map. When I use the dot density symbology, all the fields don't show up to choose from. I think this is because some of my fields don't have a number format.

How do I change "Number Format" to "Numeric" in my attribute table? The field that I'm trying to edit currently has the object type: "text" even though the content of the field is all numbers and under "number format" it is blank.


texts: Error in MultipleRingBuffer_analysis in python

texts:
I'm trying to use Value table in python to do a multiple ring buffer in ArcGIS 10.1 and I'm getting the following error:
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000735: Distances: Value is required
Failed to execute (MultipleRingBuffer).

Here's the code:

arcpy.env.workspace = Path
vTab = arcpy.ValueTable()
vTab.setRow = (0, "2")
vTab.setRow = (1, "10")
vTab.setRow = (2, "50")
inFeature = 'Test.shp'
outFeaute = 'Test_Output.shp'
dist = vTab
bufferUnit = "meters"
arcpy.MultipleRingBuffer_analysis(inFeature, outFeaute, dist, bufferUnit, '','ALL')


texts: How to slice all elements in a list to a certain length

texts:
Assuming I have a list with multiple strings in there.

x = ["red", "green", "black", "orange", "purple"]

I want to slice every element in the list to a certain length, eg. 4 characters. Then the list should look like this:

x = ["red", "gree", "blac", "oran", "purp"]

I tried it with x[0:4], but doing so only sliced the list to 4 elements like

x = ["red", "gree", "blac", "oran"]

How can I do this?


texts: Displaying extruded polygon outlines in ArcScene?

texts:
I am having a similar problem to Displaying ArcScene polygon extrusion edges?

When I extrude polygons in ArcScene 10.2.1, the polygons rise to the specified height, but the outlines of each feature are not displayed (Mapping Problem- top image).  In particular, I'd like to see the outlines for each country, regardless of their extrusion height.

I've tried the suggestions listed in the aforementioned post, but do not get the desired effect.  I even tried the user's solution to use the Feature to 3D by Attribute tool on the polygon layer. I then added that output layer to Arcscene without any extrusion, symbolized with no fill and a black outline, but again fail (Mapping Problem- bottom image).

I'm very new to ArcScene (but well-versed in ArcMap).


texts: Creating network dataset for train lines with points representing train stations in ArcGIS Network Analyst?

texts:
Using ArcGIS Desktop 10.2, I would like to build a network dataset that that includes a line shapefile representing train lines and a point shapefile indicating train stations along those lines. When I right-click on the Personal Geodatabase I'm working in, and select "Create a Network Dataset," the only shapefiles that show up to be selected for inclusion in the Network Dataset are the line shapefiles within the Personal Geodatabse, but not the point shapefile I would like to use for train stations in the dataset.  Here are some screenshots:

Is it possible to include points within a Network Dataset like this?

I thought I was able to do so before, but for some reason I seem unable to include the train stations along with the train lines.


texts: How to automate joining SQL Server non-spatial database tables to ArcGIS shapefile

texts:
I have dozens of SQL Server non-spatial database tables. These are common tables, the column types are: nvarchar, int and float.

I try to use Arcpy to automate joining these database tables to shapefiles. The tables have to be registered in ArcGIS first.
The ArcMap I use is 10.3.1. Unfortunately, ArcMap 10.3 doesn't support "sdetable -o register -t" anymore? I tried a while and couldn't make it work.

So, are there other options to automate joining the tables?


texts: Identifying a cluster of polygons based on attributes

texts:
I'm trying to identify a cluster of contiguous parcels that, when combined, add up to at least a given size and, when combined, have an assessed property value less than a given $ amount. I have a parcel shapefile with size and value attributes.

Is there a tool that can accomplish this?


texts: What Type of GIS Powers Automobile Navigation Systems

texts:
My sister-in-law was inquiring about where she can buy updated DVD's to load into her car's system.  Obviously I know the dealer/OEM would love to rip her off for such data, and I knew of no alternatives off the top of my head. Being a GIS professional, the wheels started turning...

Does anyone know anything about:
a) the GIS software that is powering automobile navigation systems.  Are there any published specs, or are they completely proprietary implementations?

b) what is the format of the street/network datasets? I dont have such a fancy contraption in my vehicle, so I can't investigate for myself.

Not sure if the specific make/model makes any difference here, but I am specifically asking about a 2009 Toyota Venza.


texts: How to turn off a layer's labels programmatically in QGIS 3?

texts:
I'm trying to turn off QGIS3 (3.2) labels via pyqgis per How to turn on/off all labels of all layers in QGIS . I adapted the code in QGIS 2 answers linked above, as follows:

#...
def toggleAllLabels(self):
    for layer in QgsProject.instance().mapLayers().values():
        if self.toggleLabelsAction.isChecked() == True:
            layer.setCustomProperty("labeling/enabled", True)
        else:
            layer.setCustomProperty("labeling/enabled", False)
        layer.triggerRepaint()

But this doesn't work to turn off the labels. The layers refreshes, but the labels remain.

Is layer.setCustomProperty("labeling/enabled", False) still the right way to turn off layer labels in QGIS 3? (Or, what's the current way?)


texts: GMT instead GTiff while merging rasters: error message

texts:
My question is linked to that post (Saving an output file during merging on QGIS) as I have exactly the same issue but as the guy couldn't provide screenshots and the post is unachieved, I ask again the question:

I'm using QGIS 2.18, I try to merge two rasters (geotiff files) raster> miscellaneous >merge, while trying to merge I have an error message

Methodolgy:
I uncheck the choose input directory instead of files.
I select my two input files ( raster so ".tiff" files ) I define my output files ( .tiff as well ) Like showed in the video https://www.youtube.com/watch?v=OJEW7kckIeg&feature=youtu.be (and the screenshot showed in the other post) but after that, in 'the summary box', the code is in "GMT" instead of "GTiff" like show in the video https://www.youtube.com/watch?v=OJEW7kckIeg&feature=youtu.be (1 min30)

Picture  from the video (1 min30)

What I have

And the Error message when I click on "OK"

Even if I manually change the "GMT" to "GTiff" with the pen, it automatically comes back to the "GMT"

Could someone help me?


texts:
The expression FieldData1 <= GETDATE () AND FieldData2 >= GETDATE () works well, but if FieldData1 = FieldData2 does not work.
ArcGIS 10.3.1 Desktop and SQL Server 2008.
Any suggestions?


texts:
When i run this code (in arcView 10.3) in order to check the data frame extent, i received "NaN NaN" result with the exact data frame. I don't understand why python print this out?
I checked in http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/dataframe-class.htm but didn't find any answer.

import arcpy

mxd = arcpy.mapping.MapDocument(r"D:\desktop\Project\project.mxd")
df = arcpy.mapping.ListDataFrames(mxd,'*')[0]
print df.name
print df.extent
mxd.save()
del mxd

The result is:

>>>
Layers
126169.249888028 611217.599085453 149776.35592577 627939.29919552 NaN NaN NaN NaN
>>>


texts: Dissolve shapefile and summarize text fields

texts:
I have a polygon shapefile that I would like to dissolve on a field called FID_merged (see below). For each dissolved polygon I would like to summarize a list of the countries.

I am using ArcGIS 10.3 and see that the only option for text-field statistics are first and last. How could dissolve on FID_merged and still maintain a list of all the countries for that FID_merged?

I am open to other non-esri solutions.


texts: Imported perimeter values changing in HEC-RAS during further addition of data

texts:
I'm new to HEC-RAS and am encountering a very odd problem. I am using the RAS Mapper and import a terrain and then a perimeter feature. I then calculate the grid and save the geometry. Then, I open the geometric editor and add a boundary condition, save that, and then add unsteady flow data and save that too. Once I am done with this I try to run the model however I get an error: "Property table generation parameter: 'Face Conveyance Tolerance Ratio' is less than 0.0001'". When I go back to the RAS Mapper and open the attribute table of my perimeter, suddenly all the values have been changed to 0, even though they were larger than 0 before.
Why might these values be changing and how can I avoid this?
I figured out what was wrong. I had to change my computer's regional settings and put '.' as the decimal separator. Hope this may help somebody else out!


texts: Update Grid cell value with Point attribute

texts:
I have a 4km gridded dataset with each grid cell value as a measurement of precipitation.  I would like to update it with a point shapefile of more precise precipitation values.

Aside from converting the grid to shape and then spatially joining the data (i am looking at doing this for 7 months/year X 30 years), is there a way in ArcMap (View) or QGIS to directly update the grid cell values with the point values (where the points fall within the grid cell locations)?


texts: Convert point file to polyline but not joining every set of points in ArcGIS10

texts:
I have a dataset that looks like :

   OBJECTID   Shape   KP     DESCRIPTION  EASTING  NORTHING
      1       Point   0.04    Span;Start   525112.2 6728715.4
      2       Point   0.0506  Span;End     525122.2 6728716.5
      3       Point   0.0667  Span;Start   525138.6 6728718.7
      4       Point   0.0506  Span;End     525142.7 6728719.2

Projection is UTM30-ED50 and there are 1462 points in the file.

What I want to do is join each pair of points between the Start and End span, then leave a gap between the End and the next Start point.

I have run Point to Line, easy, but this joins every point. Is there a way of specifying only the pairs of points I want to join? Or dissolving the parts of the line I don't want to keep after I have used, say, XTools, to split the line by points?

Dumb question, I realise, but I just can't work this out!


texts: Can a GE user download search results in KML?

texts: I want to find all the grocery stores in a city on Google Earth and then download the search results as a single KML/KMZ point file. If it is possible, HOWTO isn't obvious. Other options?


texts: Is installing Web Adaptor mandatory/important with ArcGIS for Server?

texts:
If I am using ArcGIS for Server for my web application is it mandatory or important to install the ArcGIS Web Adaptor?

I am facing a proxy page configuration issue.


texts: Syntax for if clause with an inline variable in modelbuilder

texts:
In the "Calculate Value" tool I am trying to slice the inline variable (%Name%) with another variable (A) that will be a result of the length of the %Name% variable.  For example if
%Name% = 11 then I would like A = 8, else I would like A = 9.

"%Name%"[:A]

What should be the syntax of the expression and the code block?


texts: Get geometry type from Feature Collection for every row

texts:
I want to get geometry type for every row (like point, linestring, polygon etc.) from GeoJSON data.

This is my code for reading data.

import argparse
import geopandas as gpd
import os
import sys
import shapely

data = gpd.read_file('data.geojson')
for index, row in data.iterrows():
    print('Data: ', row['geometry'])

I have tried these solutions. But con not works.
Get a Shapefile Geometry Type

Do you have any idea?

This is my 'data.geojson' file.

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [102.0, 0.5]
      },
      "properties": {
        "prop0": "value0"
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]
        ]
      },
      "properties": {
        "prop0": "value0",
        "prop1": 0.0
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],
            [100.0, 1.0], [100.0, 0.0]
          ]
        ]
      },
      "properties": {
        "prop0": "value0",
        "prop1": { "this": "that" }
      }
    }
  ]
}


texts:
I'm new to the pgRouting engine.

Is it possible to input my own data and get it restricted when I want to find the shortest path between points A and B?

For example I want to height and weight attributes for trucks routing to be restricted.

And how do I call it in code?

This is just a simple example which I have found in tutorial

CREATE OR REPLACE FUNCTION shortest_path
(sql text,
source_id integer,
target_id integer,
directed boolean,
has_reverse_cost boolean)
RETURNS SETOF path_result

Should I add it like this?

...maxweight double,
maxheight double...


texts: Georeferencing Old Mining Maps (Floetzkarte des Oberschlesische) in QGIS?

texts:
I am trying to georeference some old mining maps (Floetzkarte des Oberschlesische) in QGIS 2.9. I have already tried to do that by marking known points on present satelite photos, but the results were poor. Then I used some other old, but already georeferenced maps (Messtischblatt) and marked triangulation points present on both maps. Georeference based on these points was quite good, but unfortunately I noticed that not all Messtischblatt contain traingulation points at all, so this method doesn't work for all maps.

The maps use some strange coordinate systems, totally incomprehensible for me. The reference point (null point) which is located at sheet no. 3 (TPL at the picture), seems to be located at (491138, 282639) EPSG:2180, (18.8752414523, 50.4108051983) WGS84.

Each Floatzkarte's sheet contains coordinates in meters relative to this null point. The coordinates are in corners of the maps as well as on its borders.

Could you provide me with some information about the CRS used on these  maps and/or instruction on how to prepare proper proj4 parameters for it, so that I could use that in georeferencing process?


texts:
Keeping the field style unchanged when converting a point layer generated from CSV file to shapefile
I am trying to export (convert) selected points to a shapefile with the point as geometry type. The source point layer is generated from a tab-delimited text file with x, y, and z as points’ coordinates and elevation.

Apparently, everything goes fine, but what is bothering me is that for the z field, some values have the same number of digits after decimal as these were in the source file while some have 15 digits after the decimal. The value is the same for those points for which I checked but this behavior is strange.  I think it should similarly treat the whole field column. If it adds the number of leading zeros for one row, it should do it for all; the mixed behavior shows that something unintended may also be happening that might also affect the results and will go without notice. I am not sure if my approach here is right or wrong.

There are some minor changes in x and y coordinates as well, but this happened for all rows.
Any suggestion about how to avoid this behavior is very much appreciated. Thank you.

The CRS for the project, source file, and exported file is the same.

I am using QGIS 3.12 on Windows 10 64 bit, with the following dependencies.


texts: SMILE classifiers/regressors in Earth Engine

texts:
I am working on a project intended for publication that leans heavily on Earth Engine for much of the workflow: assembling, compositing, and mosaicking lots of images from multiple data sources, stacking these together into a multiband raster that can then be fed to a ML algorithm. I have been frustrated by the performance and limited documentation of EE's in-house classifiers and regressors in the past (especially their old version of Random Forest), and so my workflow up to now has consisted of exporting data prepared in EE for final analysis in Python using sklearn. It works, but it is cumbersome and it adds a lengthy extra step of getting the data out of Earth Engine before the already lengthy step of running a classifier can even get started.
To my delight, Earth Engine recently replaced their old implementations of common machine learning classifiers and regressors with new versions based on SMILE (website, github). Having looked through the SMILE documentation I am impressed, and I've tinkered with the tools in EE and they give the results I expect, and fast. However, there is obviously (and unavoidably) some code sitting between the native SMILE algorithms and their implementation in EE's code editor--arguments are slightly different, the classifiers are called using ee.Classifier, etc.
My question is this: Does anybody know if these algorithms are truly just SMILE wearing Earth Engine clothing to fit in, or has EE altered them in some more fundamental way? In other words, are these "SMILE classifiers" or are they "classifiers based on/adapted from SMILE"?
I want to believe that the replacement of the old classifiers with SMILE will allow me to just do the whole analysis in EE because it would make my life much easier. But I want even more to be confident that the tools I'm using work exactly how I think they work.


texts: Provincial Base Mapping Data Sources in Canada

texts:
I'm very familiar with the Ontario Base Mapping Data, and am looking for similar data for other Canadian Provinces. Perhaps we can start a list of resources here? I'm looking for something at a larger scale than the standard NTS data.

Ontario Base Mapping - 1:10,000/1:20,000 (depending on latitude) - available from Land Information Ontario (via an Unrestricted Use Licence) or from GeographyNetwork.ca


texts: Converting individual line segments into line using PostGIS?

texts:
I have groups of individual linestrings segments with spatially coincident start & end points. I want to convert them into individual linestrings as seen in the picture:

This seems like it should be very easy but I cannot figure out how to do it. ST_Union is just returning all features in the entire set, i.e. every single feature from both groups in the picture becoming a single multilinestring.

I don't have a common identifier field for the groups of linestrings, the only thing that indicates that they belong together is the fact that they touch each other at their endpoints.

Am I missing something obvious here?


texts: Use Python in Field Calculator to increment up value

texts:
Please see screenshot for field calculator Python logic.  I have no idea what I'm doing that's any different from this GISSE answer.

The error I receive is ERROR 000989: Python Syntax Error (invalid syntax line 3).  What am I missing?


texts: Making many offset lines that are always a set distance from the previous

texts:
I've discovered the Offset lines tool in Vector Geometry, which allows you to make a parallel line next to the input at a specified offset distance. What I would like to do is specify how many subsequent offset lines I want. As of now, you can only create one offset for each feature in the input layer.
I understand you could probably loop this, but is there a more efficient way of doing this? An alternate function? I included an image to illustrate what I'd like to do.


texts: How can I clear a vector layer before drawstart in openlayers 3?

texts:
I have a vector layer in OL3 which I want to auto clear when drawing a Point feature (which means there is always max 1 feature in the layer).

Problem is that when I listen to drawstart (ol.interaction.draw) or to featureadd (ol.layer.vector) they are fired after feature is added and thus I can't clear the layer without them be deleted.

how can I workaround this ?

* Edit *
I've noticed the drawstart event work when the draw type isn't Point , but I want to add points and thus my problem.


texts: Selecting Feature in more layers and highlighting them using PyQGIS?

texts:
I'm developing my plugin and I want after selected some feature highlight them on mapCanvas.
My code is below but it does not work correctly, I don't get an error but I cannot view the highlighted features:
ZoomTo recall addHighlight method that highlight feature selected.
Feature Extent use getFeatures for take feature and append (layer,feature) on self.feature[].

The code is:

def featureExtent(self, key, element_type,x,y, highlight=False):
        r = QgsRectangle()
        r.setMinimal()
        #d = self.searchRadiusMU(self.canvas)
        #p = QgsPoint(float(x),float(y))

        f = QgsFeature()
        for l in self.plugin.elementLayers(element_type):
            f2=l.getFeatures(QgsFeatureRequest().setFilterExpression(u"ELECTRICAL_LINE_ID={}".format(key)))# tutte le linee che hanno quell attributo = alle line selezionate
            idIdx = l.fieldNameIndex(u"ELECTRICAL_LINE_ID")
            if(idIdx>-1):
              while f2.nextFeature(f):
                #attrs = f.attributes()
                #id=attrs[idIdx]
                #if(id==key):
                  if highlight:
                     self.features.append([l, f])
                  fe = f.geometry().boundingBox()
                  r.combineExtentWith(fe)
                  #break

        return r

def addHighlight(self, l, f):
    s = QSettings()
    #logMessage("CURRENT COLOR {}".format(self.currentColor))
    if(self.currentColor is None):
        c = QColor(s.value("/Map/highlight/color", QGis.DEFAULT_HIGHLIGHT_COLOR.name()))
    else:
        c = self.currentColor
    h = QgsHighlight(self.iface.mapCanvas(), f.geometry(), l)
    h.setWidth(8)
    h.setColor(c)
    c.setAlpha(int(s.value("/Map/highlight/colorAlpha", QGis.DEFAULT_HIGHLIGHT_COLOR.alpha())))
    h.setFillColor(c)
    #ADD FOR TEST
    h.setBuffer(float(s.value("/Map/highlight/buffer", QGis.DEFAULT_HIGHLIGHT_BUFFER_MM)))
    h.setMinWidth(float(s.value("/Map/highlight/minWidth", QGis.DEFAULT_HIGHLIGHT_MIN_WIDTH_MM)))
    #
    h.show()

    return h

  def zoomTo(self, r):
    if r.isNull():
        return

    r.scale(1.1)

    c = self.iface.mapCanvas()
    if c.hasCrsTransformEnabled():
        t = QgsCoordinateTransform(QgsCoordinateReferenceSystem(GEOSRID, QgsCoordinateReferenceSystem.PostgisCrsId), c.mapSettings().destinationCrs())
        r = t.transform(r)

    self.iface.mapCanvas().setExtent(r)

     for f in self.features:
        self.highlights.append(self.addHighlight(f[0], f[1]))
        #logMessage("FEATURES: {}".format(repr(self.features)))
        #f[0].setSelectedFeatures(f[1].id())
    self.features = []

    self.iface.mapCanvas().refresh()