texts: Finding all roads entering or leaving a jurisdiction

texts:
I'm trying to find all the roads that leave a province. After messing around with a few different options I decided to try and do this with the Overpass API for OpenStreetMap. I found this question and answer that seemed reasonable for accomplishing this and that lead me to implementing this:
[bbox:{{bbox}}];
way[highway~"^(motorway|trunk|primary|secondary|tertiary|unclassified|residential|living_street|service|(motorway|trunk|primary|secondary)_link)$"]->.road;
way[admin_level="4"]->.border;
way(around.road:0)->.aroundroad;
node(w.border)(w.aroundroad);
out;

This works reasonable well, but I'm having an issue where I get intersections that are as a result of a road not crossing the border, simply meeting it. For example, the lower intersection in this image:

I've flailed around trying to figure out how to filter these out but I'm fairly new to GIS in general and OpenStreetMap specifically. Is there a way to deal with this? or should I attempt an entirely different solution?


texts: Mapping Tobler's hiking function with additional impediments using ArcGIS Desktop

texts:
Is there a way I can use Path Distance in ArcMap to calculate Tobler's Hiking Function with a DEM but also with additional time costs from non-slope impediments?
For example, part of the landscape I am modeling has surfaces that will slow a person down two-fold.
Is there a way I can integrate those areas into the path distance tool (or even another cost distance model that can account for slope direction just as path distance can)?


texts: QGIS - Import transposed points coordinates/nodes as polygons

texts:
I'm attempting to streamline the process of importing polygons (19 in this case) from a website into QGIS. I extracted the JSON using chrome's dev tools and converted it into CSV spreadsheet here. The screenshot below taken from the csv file is structured in such a way that each feature is contained to a single row. Nodes are listed in columns with eastings followed by northings. Critically, there is an ordering to the nodes as indicated by the column headers. Eastings and northings are denoted with a 0 and 1 at the end respectively. The centre number increments up by one with each pair of eastings/northings.

Is there a way to input the data into QGIS with python that will plot each node in the correct order and then use points to path followed with lines to polygons?
The end result should look like the screenshot taken from the website below.


texts: "Shapes are outside bounds of raster" with valid data in rasterio

texts:
I have been stuck for quite a while on a issue with rasterio. I am attempting to read a netcdf file and mask it with a shapefile. My issue is that it runs and always returns the error:

 /usr/local/lib/python3.6/site-packages/rasterio/mask.py:88:
 UserWarning: shapes are outside bounds of raster. Are they in
 different coordinate reference systems?
 warnings.warn('shapes are outside bounds of raster. '

This happens with shape files which are verified to be within the netcdf file. I am assuming there is a small bug in my code but am not sure what could be causing this to happen. Below is the code which is running.

 import os
 import logging
 import sys
 import math
 import json

 from netCDF4 import Dataset
 import numpy as np
 import rasterio
 from rasterio.mask import mask as rio_mask
 from rasterio.mask import raster_geometry_mask as rio_getmask
 from shapely.wkt import loads, dumps
 from shapely.affinity import translate
 from shapely.geometry import mapping, shape
 import shapefile

 def polygon_to_mask(nc, fname, poly, variable):
     """Generates a numpy mask from a polygon"""
     nclons = nc.variables['lon'][:]
     if np.any(nclons > 180):
         poly = translate(poly, xoff=180)

     dst_name = 'NETCDF:"{}":{}'.format(fname, variable)
     with rasterio.open(dst_name, 'r', driver='NetCDF') as raster:
         if raster.transform == rasterio.Affine.identity():
             raise Exception("Unable to determine projection parameters for GDAL "
                         "dataset {}".format(dst_name))
         mask, out_transform, window = rio_getmask(raster, [mapping(poly)], all_touched=True)
     return mask, out_transform, window

 def generatePolygon(reader):
     fields = reader.fields[1:]
     field_names = [field[0] for field in fields]
     buffer = []
     for sr in reader.shapeRecords():
         record = sr.record
         record = [r.decode('utf-8', 'ignore') if isinstance(r, bytes)
                   else r for r in record]
         atr = dict(zip(field_names, record))
         geom = sr.shape.__geo_interface__
         buffer.append(dict(type="Feature", geometry=geom, properties=atr))

     return shape(buffer[0]['geometry'])

 def polygon_to_masked_array(nc, fname, poly, variable):
     """Applies a polygon mask to a variable read from a netCDF file,
     in addition to any masks specified in the file itself (_FillValue)
     Returns a numpy masked array with every time slice masked"""

     mask, out_transform, window  = polygon_to_mask(nc, fname, poly, variable)

     dst_name = 'NETCDF:"{}":{}'.format(fname, variable)
     with rasterio.open(dst_name, 'r', driver='NetCDF') as raster:
         height, width = mask.shape
         out_shape = (raster.count, height, width)

         array = raster.read(window=window, out_shape=out_shape, masked=True)
         array.mask = array.mask | mask

     var = nc.variables[variable]
     scale_factor = getattr(var, 'scale_factor', 1.0)
     add_offset = getattr(var, 'add_offset', 0.0)

     return array * scale_factor + add_offset

 def main():
     reader = shapefile.Reader(os.environ.get('shape'))
     polygon = generatePolygon(reader)
     fname = os.environ.get('file')
     variable = os.environ.get('variable')
     nc = Dataset(fname)
     test = polygon_to_masked_array(nc, fname, polygon, variable)
     print(test)

 main()


texts: Consuming ArcGIS Server map service (MapServer) from ArcGIS Pro

texts:
I have a map service at https://geoportal.esdm.go.id/monaresia/rest/services/4.GEOLOGI/Kebencanaan_Geologi/MapServer/ (I know the framework is disabled, but we can see the layers using https://geoportal.esdm.go.id/monaresia/rest/services/4.GEOLOGI/Kebencanaan_Geologi/MapServer?f=pjson).
When I add it to QGIS (Layer -> Add Layer -> Add ArcGIS Map Server Layer) it displayed perfectly (although I had to ignore some security certification) I have no problem. However, when I used ArcGIS Pro to add the same server (Insert -> Connections -> add WMS layer), it prompted for authentication.
I don't understand how the same map server is able to be displayed by QGIS without authentication but require authentication if I use ArcGIS Pro.
How do I add the map service to ArcGIS Pro without authentication?


texts: Unknown Spatial Reference after Georeferencing in ArcMap

texts:
I am trying to georeference an image base on another *.tif, after rectifying i still have my Image as unknown spatial reference.

Does somebody know how I can fix it?


texts: Getting log message from QGIS processing framework?

texts:
I run Python processing algorithms externally, and I want to get the log output I see when I run it from the QGIS 3 GUI at the log tab as shown in the screenshot:

I want to get the full grey log output when Result is returned only.

How do I do that?

An example follows:

import os
import sys
import gdal
gdal.UseExceptions()  # Allow GDAL to throw Python Exceptions

from qgis.core import (
    QgsApplication,
    QgsProcessingFeedback,
    QgsMessageLog)

from qgis.analysis import QgsNativeAlgorithms

QgsApplication.setPrefixPath(os.path.join("C:", os.sep, "OSGeo4W64", "apps", "qgis"), True)
qgs = QgsApplication([], False)
qgs.initQgis()

sys.path.append(os.path.join("C:", os.sep, "OSGeo4W64", "apps", "qgis", "python", "plugins"))
import processing
from processing.core.Processing import Processing

Processing.initialize()
QgsApplication.processingRegistry().addProvider(QgsNativeAlgorithms())

def pca(input_raster_list):

    params = {
                'input': input_raster_list,
                'rescale': [0,0],
                'percent': 99,
                '-n': True,
                '-f': False,
                'output': 'C:\\Users\\...',
                'GRASS_REGION_PARAMETER': None,
                'GRASS_REGION_CELLSIZE_PARAMETER': 0
                }
    feedback = QgsProcessingFeedback()
    res = processing.run("grass7:i.pca", params, feedback=feedback)
    print(res)

    return


texts: Removing self-intersection from invalid polygon using shapely?


texts: Vector rendering issue using Mapbox-gl & GeoServer vector tiles (pbf)

texts:
I am rendering a vector line in the browser using mapbox-gl. The layer is being served using GeoServer as a pbf vector tile.

The rendering issue is happening at most zoom levels and it is happening on the tile borders (when I load a raster layer, the tiles 'seams' are at the exact same spot as the vector rendering issue (image below)).

The Mapbox-gl source definition:

  var vectorLayerSource = GEOSERVERURL +
    '/geoserver/gwc/service/tms/1.0.0/' +
    myLayerName +
    '@EPSG%3A900913' +
    '@pbf/{z}/{x}/{y}.pbf;

  // Vector source
  map.addSource('projectVectorSource', {
    'type': 'vector',
    'scheme': 'tms',
    'tiles': [vectorLayerSource]
  });

When I render the exact same layer in Mapbox-gl as a geoJSON the issues does not exist.


texts: Shapely python spatial join - point with line

texts:
I have two datasets, one with address points (lat,long) coordinates. And another one with line string geometry (each linestring represents a road). I am trying to find the road name for each address point. I'm trying to do spatial join or find the road line with shortest distance to the address point using shapely line.distance(point). How can I achieve this in python? One thing I can think of is to find the distance between the address point and every line in road dataset. And get the one with minimal distance. Is there an alternate approach to this?

Both the dataset has lat long points in wgs84 projection system.

Line coordinate example :

LINESTRING (168.0473, -44.40220, 168.0485, -44.40117, 168.0486, -44.40085, 168.0487, -44.40067)

Point coordinate example:

(168.04665153,-44.3990252)


texts: Pretty table python module with variable number of rows

texts:
Is there a way to produce a table in a txt file using pretty table python module, using an i variable for the row count for the case I do not know the number of rows from the begining?
For example I have the following table:

mytable = prettytable.PrettyTable()
mytable.add_column("Column1", [my_list_a[0], my_list_a[1], my_list_a[2]])
mytable.add_column("Column2", [my_list_b[0], my_list_b[1], my_list_b[2]])
mystringmytable = mytable.get_string
f.write(mystringmytable )

But let' s say that I do not know from the begining the length of my lists, my_list_a & my_list_b.
So, how could I modify the code concerning the above case?
I am using python 2.7 for qgis2.10 plugin development


texts: How can we retrieve the values of the intervals in the legend in R

texts:
I have an elevation model plotted in R
Code:

library(raster)
data(volcano)
r <- raster(volcano)
plot(r, col = topo.colors(20))

Plot:

how can we retrieve the values of the intervals in the legend, that is, in the example-->100,120,140,160,180


texts: Updating point shapefile attributes from polygon shapefile using QGIS?

texts:
I have two shapefiles: one point and one polygon.
The point shapefile have five attributes that describe the points.
The polygon shapefile have one attribute: name of the polygon.

I am a beginner to QGIS.  I know how to bring both shapefiles up on the screen.
Here's where I need help.
I need to add a column in the point shapefile, and update the records of the name of the polygon that particular point happens to reside in.  This way, I can detach the point shapefile and send it somewhere else without giving up the polygon shapefile.

If this can be done, then how?


texts:
In the US, the FCC (Federal Communications Commission) publishes transmitter data about TV and Radio stations, including information about their respective service area boundaries.  Using the published data you can derive station details and coverage area maps, like what is linked here and here.

Does anyone know of similar publicly available data for AM & FM radio stations in the UK?  Ultimately I would really like to find or generate coverage area maps that I can put into my own application.


texts: Create feature class with desired fields using ArcPy?

texts:
When you create a feature class through ArcCatalog you get a handy menu that lets you assign fields.

I'm wondering if there isn't an arcpy equivalent. There's no arguments for it in the Create Feature Class tool.

I thought maybe a field info object would do it, placed in the template variable, but this failed. I then realized that field info fields don't indicate field type or most any other field properties, so this should not have been a surprise.

>>> fi = arcpy.FieldInfo ()
>>> fi.addField ("TestField", "TestField", "VISIBLE", "NONE")
>>> arcpy.CreateFeatureclass_management (outLoc, outName, "POLYGON", fi)
Runtime error
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\management.py", line 1806, in CreateFeatureclass
    raise e
RuntimeError: Object: Error in executing tool
>>>

Currently I add each field one at a time after creating the feature class, but I'm thinking adding the fields at the time of feature class creation would be more efficient.


texts:
Is it possible to access to the range labels set within Layer Properties > Symbology tab? (see image)

I have numerous layers with different class ranges and would like to export range values as plain text to use elsewhere, rather than ctrl-c ctrl-v for each class in each layer.

UPDATE

Following the pointer from @Vince I've tried the following ArcPy script built through advice at http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-mapping/labelclass-class.htm

import arcpy

mxd = arcpy.mapping.MapDocument(r"path\to\my_mxd.mxd")

for lyr in arcpy.mapping.ListLayers(mxd):
    if lyr.supports("LABELCLASSES"):
        for lblClass in lyr.labelClasses:
            print "Layer name: " + lyr.name
            print "    Expression:  " + lblClass.expression

del mxd

But lblClass.expression doesn't access the labels needed. Is there another property I can access? Can't see a suitable one in ArcPy classes LabelClass or Layer.


texts: Openlayers renderer in IE8 - Labels not visible

texts:
I copied the source code of http://openlayers.org/dev/examples/vector-features-with-text.html. This url works just fine in IE8.

I put the html page as it is in the webfolder in our network. I opened this page from the  local site But what found was labels were not visible in IE but in chrome they seemed just fine.

What should I do to make it work in IE also? WHat is preventing the labels to render in IE but the same code works from the public site above. Ifyou right click and see the code you can see the code as follows:

 renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;

        var vectorLayer = new OpenLayers.Layer.Vector("Simple Geometry", {
            styleMap: new OpenLayers.StyleMap({'default':{
                strokeColor: "#00FF00",
                strokeOpacity: 1,
                strokeWidth: 3,
                fillColor: "#FF5500",
                fillOpacity: 0.5,
                pointRadius: 6,
                pointerEvents: "visiblePainted",
                // label with \n linebreaks
                label : "name: ${name}\n\nage: ${age}",

                fontColor: "${favColor}",
                fontSize: "12px",
                fontFamily: "Courier New, monospace",
                fontWeight: "bold",
                labelAlign: "${align}",
                labelXOffset: "${xOffset}",
                labelYOffset: "${yOffset}",
                labelOutlineColor: "white",
                labelOutlineWidth: 3
            }}),
            renderers: renderer
        });

Thanks

Vijay


texts: Making second parameter of model (ModelBuilder) to be optional?

texts:
I have built a model to create file structure for a feature class input, basically, it creates a database, then a dataset, selects by attribute, exports data, names feature class, puts it all in the same place with the same structure and naming convention, no matter the user or machine.

There will always be two inputs, the feature class being compared, and the feature class it's being compared to. This is the main branch. The two inputs have exports based upon a single attribute requirement, and two feature classes are exported and placed in one database.

Then, there may or may not be 2-5 other sources that also need to be compared.

The next part is already a separate branch in the model, connected only by the same folder for the next databases to be saved. I think I might need an if/else, that is, if: a user selects a feature class in the 3rd (and beyond) parameter box, then the separate branch(es) of the tool runs, else: they don't then only the main branch runs, and the tool completes without error and only a single database/feature class is created. Otherwise, the number of databases outputted will match the number of 'needs to be compared' feature class inputs.

But my Python skills are virtually non-existent, if that is the way I need to go.

Right now, the one needs to recycle the 'needs to be compared' feature class input then delete the resulting database to accommodate the extra lines in the tool interface. It works, and since stuff needs to happen now, no one is complaining. But this is not practical, obviously.

*Separate databases are required in a future step, so that cannot be changed.
*I'm trying to be vague on explaining only my process and outcome needs on purpose.
*I cannot post screen shots. This model is not my property.


texts:
I am new to PostGIS.
I'm making a spatial join, but it does not work.
From what I saw it is something of the geometry of polygons.
My polygons are saved with the "Geom" field like this (Geom geometry (Multipolygon) and I need to transform them to the format (Geom geometry (Multipolygon, 4326).
How can it be done?


texts:
I want to use Orfeo ToolBox in Python. By using the OSGeo4W package, I installed an otb-python and otb-bin. After installing them, I tried the coding as below:

>>> from sys import argv
>>> import otbApplication

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    import otbApplication
ImportError: No module named otbApplication

I wonder what I missed. My OS is the Windows 7 and Python version is 2.7.


texts: GDAL create mbtiles with differing image by zoom level

texts:
I want to build an mbtiles with different map detail at different zoom levels (e.g. contours at 1m at levels >16 and 5m <=16). I've exported raster images at the right resolution using QGIS and now want to combine them with GDAL.

gdal_translate -of mbtiles -co "TILE_FORMAT=PNG8" Level19.png basemap_hires.mbtiles
gdaladdo -r nearest basemap_hires.mbtiles 2 4
gdal_translate -of mbtiles -co "TILE_FORMAT=PNG8" Level16.png basemap_lores.mbtiles
gdaladdo -r nearest basemap_lores.mbtiles 2 4 8 16

generates levels 19->17 from the hi-res map and levels 16->12 from the lo-res map, in separate files. But I'd like to combine them into one file.

Any ideas? Of course, I could use just the Level19.png file and do 2 4 8 16 32 64 with gdaladdo, but then the level 16->12 tiles will have too much detail (and puny labels). In a way, this is a replacement for QTiles3 on the cheap, since it would generate the "right" map at all scale levels, but it's not robust for me in QGIS and I really only need 2 levels of detail.


texts: Replace google map MARKER with HTML element

texts:
I want to add a custom HTML element (that can become transparent dynamically) instead of a marker.

Basically my html object would be a cirle (or rounded pin) with a picture of users in the middle.

I have imagined different solutions:

place a label (containing HTML) covering the marker which visibility would be set to none
work with overlays
hard way: replace the marker with a PNG image that I should compose dynamically with some sort of library superimposing two images (one geometric and the other user picture).

Anyway I can't figure out what to do and how to do it.

Thanks,
Stefano


texts: How get the toolbar added with 'OnCustomizationEvent' from interface 'ICustomizationFilter'?

texts:
I'm implementing the interfaz ICustomizationFilter, and using the event 'OnCustomizationEvent' of this way:

public sealed partial class eManager : Extension, ICustomizationFilter
{
    public bool OnCustomizationEvent(esriCustomizationEvent custEventType, object comObject)
    {
        Debug.Write("------------> cust event type:" + custEventType);

        if (custEventType == esriCustomizationEvent.esriCEInvokeCommand)
        {
            if (comObject.ToString() != "Toolbar")
            {
                if (comObject as ICommandItem != null)
                {
                    ICommandItem loButton = (ICommandItem)comObject;
                    MessageBox.Show("button: " + loButton.Name);
                }
                else if (comObject as ICommandBar != null)
                {
                    ICommandBar loToolbar = (ICommandBar)comObject;
                    MessageBox.Show("bar: " + loToolbar.ToString());
                }
                else
                {
                    MessageBox.Show("Error casting comObject");
                    return true;
                }
            }
        }

        return false;
    }
}

I need get the id or name of toolbar added.
The event is firing, but I can't cast the comObject when it's a toolbar. It Only
cast when a button fires the event.

How can I get the toolbar's data when it fires the event?


texts: Is there an Internet resource for GPS timeline?

texts: I'm looking for a timeline of the evolution of GPS technology and accuracy for both civilian and military systems (since the advent of GPS).  Any info will help.


texts: Updating attribute values of points outside area using PostGIS

texts:
I have two datasets in PostGIS 1.5 (on Postgres 9.1) one of polygons and one of points.

I am hoping to create a SQL command that will select all of the points in a dataset that are not within of the polygon features and assign a value of -9999 to one of the columns. In this case the boundary is a continent so -9999 defines a feature off the mainland.

I have several hundred thousand features and have tried to achieve this more or less manually in QGIS.  However once the features are selected I cannot interact with QGIS without it crashing.

Having a couple of problems with performance that has this function taking 96+ hours and counting.  I tried stopping previously and set a LIMIT of 100 on the SELECT and it was still taking a few hours.

This is with the GiST and BTree indexing.

I tried running SELECT on point_id only without the UPDATE function and got similar results.

Previously in QGIS it was taking about 16 hours to select all points within the polygons.

Will look at some performance tuning and retry a bit later

I am 99% sure Index are on but there is always a little room for doubt =D

Result of the first query is

QUERY PLAN
Nested Loop Left Join (cost=0.00..12955070.02 rows=1 width =4)
    Join Filter _st_intersects(point_table.the_geom, polygon_table.the_geom)
    Filter: (polygon_table.polygon_id IS NULL)
    ->  Seq Scan on point_table (cost=0.00..209494.58 rows=1562658 width=104)
    ->  Index Scan using poly_table_geom_idx on polygon_table (cost=0.00..7.89  rows=1 width=22520)
        Index Cond: (point_table.the_geom && the_geom)
(6 Rows)

Result of second query is

sum
59257303
(1 row)

Result of comparing the two queries with LIMIT 1000 is that the first takes about 15 minutes and the second is still running after an hour.

I have split the features using ST_Dump and at present I am setting up the Indexing, Keys etc for that.

Have complete ST_Dump

Nested Loop cost increased to 13142577, Seq Scan stayed the same, Index Scan width increased to 1162940

Point layer contains 1728921 points


texts: How to combine multiple zipcode polygons into one polygon

texts:
In CartoDB, we have a table of chapters that make up a national organization.  Each chapter record has a polygon that defines the geographical area that the chapter covers.  The area a chapter covers is defined by zipcodes and which zipcodes are included in a chapter can change over time.  I understand that CartoDB has a table with polygon information for US zipcodes.  Given a zipcode to chapter table that I can produce, I'd like to create a fairly simple process to redefine the chapter polygons using the CartoDB zipcode/polygon table. I have the following specific questions.

What is the zip/polygon table name and how do I reference it in queries?
What's the best way to use my zip to chapter mapping table and the CartoDB zip/polygon table to create a single polygon for each chapter?


texts: MapServer square symbol composed of 4 internal squares

texts:
I need to create simple square symbol composed of 4 internal squares.

SYMBOL
    NAME 'SQUARE_TL'
    TYPE vector
    FILLED true
    POINTS
        0 0
        0 0.5
        0.5 0.5
        0.5 0
        0 0
    END
END

SYMBOL
    NAME 'SQUARE_BL'
    TYPE vector
    FILLED true
    POINTS
        0 0.5
        0 1
        0.5 1
        0.5 0.5
        0 0.5
    END
END

SYMBOL
    NAME 'SQUARE_BR'
    TYPE vector
    FILLED true
    POINTS
        0.5 0.5
        0.5 1
        1 1
        1 0.5
        0.5 0.5
    END
END

SYMBOL
    NAME 'SQUARE_TR'
    TYPE vector
    FILLED true
    POINTS
        0.5 0
        0.5 0.5
        1 0.5
        1 0
        0.5 0
     END
END

LAYER
    NAME "test1"
    TYPE POINT
    STATUS off
    CLASS
        NAME "test1"
        EXPRESSION ([test_value]>0)  # if > 0 shows 4 sections square
        STYLE
            SYMBOL "SQUARE_TL"
            COLOR 0 255 0
            SIZE 14
        END
        STYLE
            SYMBOL "SQUARE_BL"
            COLOR 255 0 0
            SIZE 14
        END
        STYLE
            SYMBOL "SQUARE_BR"
            COLOR 100 100 100
            SIZE 14
        END
        STYLE
            SYMBOL "SQUARE_TR"
            COLOR 0 0 255
            SIZE 14
        END
    END
    **
*

TopLeft (TL) is green

BottomLeft (BL) is red

BottomRight (BR) is grey

TopRight (TR) is blue

But when I implement a CLASS LAYER STYLE with all of them I get this strange shifted/wrong square:

If I implement only top-left and bottom-right

    CLASS
        NAME "test1"
        EXPRESSION ([test1]>0)  # if > 0 shows 4 sections square
        STYLE
            SYMBOL "SQUARE_TL"
            COLOR 0 255 0
            SIZE 14
        END
        STYLE
            SYMBOL "SQUARE_BR"
            COLOR 100 100 100
            SIZE 14
        END
    END

I get

Ideas?


texts: A security exception occurred while trying to connect to the REST end point, Silverlight

texts:
I am getting this error while creating a basic Silverlight Application. Below is the error message. I have placed the clientaccesspolicy.xml file in the folder C:\Inetpub\wwwroot. I am not sure if this file needs to be placed somewhere else.

I have also removed the Integrated Windows Authentication and it is set to Anonymous access. I am not sure what I am missing here.

~~~~~~~~~~~~~~~~~~~~
An unhandled exception (‘Unhandled Error in Silverlight Application Code: 4004 Category: managedRuntimeError Message: System.Security.SecurityException’ ). A security exception occurred while trying to connect to the REST end point

…
Make sure you have a cross domain policy.xml.

ClientAccessPolicy.xml:

<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
 <domain uri="*" />
 <domain uri="http://*" />
</allow-from>
<grant-to>
 <resource path="/" include-subpaths="true" />
</grant-to>
</policy>
</cross-domain-access>
</access-policy>


texts: Importing multiple shapefiles with tablespace and inheritance defined

texts:
In the UK we are very fortunate to have the Ordnance Survey who provide the whole of Britain in vector format. The data is provided as over 60 tiles, each of which contains something like 16 shapefiles for each feature type. Each shapefile is prefixed with the tile ID.

There are very good threads here already that deal with the general case for importing all this lovely data into Postgis. For example:

find . -name *.shp -exec ogr2ogr -f PostgreSQL PG:'dbname=my-gis-database
  active_schema=public host=localhost user=postgres password=my-password' '{}' -s_srs
  EPSG:27700 -a_srs EPSG:27700 -overwrite -skipfailures -progress \;

My question is this. Is it possible to import all of the data in one simple script like this so that:

Each tile inherits from a parent table e.g. HP_rivers INHERITS (rivers)
The tablespace is provided to ensure it all loads onto a disk big enough to take it all in one go rather than my small but speedy SSD

My goal is to have a single table structure which allows me to interrogate the whole of Britain or from a given tile, and to store the whole structure on a tablespace on slower but bigger disk.

Any ideas very gratefully received!


texts: PostGIS function ST_Union leaving extra lines and artifacts

texts:
I am trying to dissolve polygons based on a column type using PostGIS 10.4.  I am pre-compiling tables, so time requirements are not really an issue.  ST_Union does almost everything that I want straight out of the box.  However, the ST_Union is has left lots of artifact lines inside the polygon as seen in the pictures below.  Is anyone aware of a way to remove the lines inside the polygons?  I am not sure if there is a better way to make the union call or rather to clean the polygons up after the union.

INSERT into new_table (count_field, geom)
SELECT count_comp, ST_Union(geom) as geom
FROM old_table
GROUP BY count_field;


texts:
I am trying to load shapefile into mysql (MYISAM) using ogr2ogr and i get an error that says failed to fetch the requested layer. What could be wrong with my statement is it the issue with quotes or not quotes. using ogr2ogr to check the validity of the shapefile produces results. I am working in a windows environment.
  ogr2ogr --config SHAPE_ENCODING="UTF-8" -f "MySql" MySql:"database_name,
    host=127.0.0.1,user=myUser,password=myPass,port=3306"
-lco engine=MYISAM "C:\data\county.shp"
-nln county -nlt "Multilinestring" -s_srs EPSG:4326


texts: Why should we use a proxy script for Apache, Geoserver, OpenLayers2?

texts:
I can't understand why we use proxy (OpenLayers.ProxyHost) for WMS GetFeatureInfo request in OpenLayers. I am using OpenLayers 2.10, Apache-Tomcat-6.0.35 and GeoServer.

Why we use proxy?
How should use?

I am new to web development.


texts: Automatically open attribute table after ModelBuilder is complete?

texts:
I know there is a setting to add the finished product to the map after model builder is done.

Is there a setting to automatically open up the attribute table after as well?


texts: Hyperlinking to PostGIS Layers and Zip files with QGIS Actions

texts:
I previously asked a question about hyperlinking data in QGIS that gets loaded into QGIS (see post: Hyperlinking in QGIS - Add Data to current window).  A user provided me with the code, which works perfectly [Python qgis.utils.iface.addRasterLayer("C:\Users\Ryan Garnett\Dropbox\SpatialData\Imagery\Landsat\%Image")].

I am hoping to modify this code so that I can do two different actions:
1) Load data from a PostGIS Database
2) Have a zip file saved to a location on a local computer

I have data stored in a PostGIS database (ie: LUGDC as the Database, basedata as the Schema, bound_poly as the Table).  In some instances there may be points, lines and polygons for the regon, so I am thinking of an Action for each of the geometry types.

With regards to the zip files, I have the files in a shared location, but I would like to have it so the file is copied from that location to a specified location on a local machine through an action.

Any help would be appreciated.

Thanks...


texts: Select Features in qgis2web - openlayers

texts:
After using qgis2web to export a map, I am looking to modify the qgis2web.js file to have the possibility to select (highlight) features on click and keep them selected until I click somewhere else (example [here]) and to display the pop up info under the same circumstances. I am new to coding so any help is most welcomed.

    map.on('pointermove', function(evt) {
    onPointerMove(evt);
});
map.on('singleclick', function(evt) {
    onSingleClick(evt);
});

if I add if front of this

`map.on('click', function (evt) {
        var pixel = map.getEventPixel(evt.originalEvent);
        displayFeatureInfo(evt.pixel);

    })
map.on('pointermove', function(evt) {
    if (evt.dragging) {
      return;
    }

    var pixel = map.getEventPixel(evt.originalEvent);
    displayFeatureInfo(pixel);
  });`

It allows me to do that however the feature does not remain highlighted when dragging the map.


texts: Creating line profile graph in ArcGIS Desktop 10.6 with 3D Analyst for multiple line features

texts: I'm looking to create profile graphs for approximately 150 streams in a 3D feature class. I made a sample profile graph but I'm not sure how to automate the process to run through the remaining lines.


texts: Issues with defining projection to that of the current root file

texts:
I am creating a shp file with the extent of all the raster file in a set of directories and it works fine when all the rasters are in the same projection but not when they switch around.

So I want to first make sure the temp raster extent shape file has the same projection as the raster and then re-project it to overall projection I am using. These re-projected files are then merged to produce one file with all the extents and other info.

The issue is it does not seem to allow me to use the value

desc = arcpy.Describe(File)
spatial_reference = desc.spatialReference

in

arcpy.DefineProjection_management(ShapeFile, spatial_reference)

This gives the following error...

        Reading files from C:\arcgis\ArcTutor\Raster\Data\Amberg_tif 12
        Changing Directory to: C:\arcgis\ArcTutor\Raster\Data\Amberg_tif\12
        Processing 2 files in the directory. [u'090160.tif', u'090161.tif']
        Deutsches_Hauptdreiecksnetz_Transverse_Mercator
        090160.tif C:\arcgis\ArcTutor\Raster\Data\Amberg_tif\12
        Temp_Polygon_Extent_090160.shp Copied Defined Executing: Project
        C:\arcgis\ArcTutor\Raster\Data\Amberg_tif\12\Temp_Polygon_Extent_090160.shp
        C:\arcgis\ArcTutor\Raster\Data\Amberg_tif\12\prj_Temp_Polygon_Extent_090160.shp
        PROJCS['GDA_1994_MGA_Zone_55',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',147.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]
        #
        PROJCS['Deutsches_Hauptdreiecksnetz_Transverse_Mercator',GEOGCS['GCS_Deutsches_Hauptdreiecksnetz',DATUM['D_Deutsches_Hauptdreiecksnetz',SPHEROID['Bessel_1841',6377397.155,299.1528128]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['false_easting',4500000.0],PARAMETER['false_northing',0.0],PARAMETER['central_meridian',12.0],PARAMETER['scale_factor',1.0],PARAMETER['latitude_of_origin',0.0],UNIT['Meter',1.0]]
        Start Time: Thu Sep 08 13:28:15 2011 Failed to execute. Parameters are
        not valid. Undefined geographic transformation.

So my question is how do I get the script to automatically choose the transformation when the input spatial ref changes from file to file?

best,


texts: Removing inner borders from multipolygons in ArcGIS?

texts:
I have the following multipolygon, where each polygon is a different county:

What I'd like to do is get ONLY the outline of the whole polygon, so that when I give it an outline, it is just the outermost border. Unfortunately, removing the outline color is not an option, as I'd still like to have the outline of the whole polygon available. What I'd like would be something like this:

So, how do you remove those pesky inner lines?


texts: Using iterator on only parts of model in ArcMap ModelBuilder

texts:
I have created a model in ModelBuilder using ArcMap 10.7.1 which is using an iterator.

Is it possible to exclude parts of my model from being "iterated"?


texts: What is the index formula to calculate water stress index using multispectral sensor (Red, Blue, Green, Red edge, NIR)?

texts: I am having a multispectral sensor with Red band, Blue band, Green band, Red-edge band and Near-Infrared band. I need to find water stress using these bands, is it possible to find and if yes what will be index to calculate ? I am using UAV for this task.


texts: Geoprocessing/Clip fails in QGIS 2.18.3 for Ubuntu

texts:
I am trying to obtain a clipping of a contour map into a polygon by using the command

Vector-> Geoprocessing tools -> Clip

in QGIS 2.18.13 freshly installed on Ubuntu 14.04.
I run the command on a contour lines layer whose files are within a directory since it is a DXF file (to be imported to autocad) and a shapefile (a polygon basically)

But when I run the command I get the message:

  "NameError: global name 'features' is not defined"

Is this error due to some coding glitch in the new release? What is the global name Features referring to?


texts: How to create contiguous area cartograms in QGIS or R?

texts:
Here is what I want to achieve (on the right):

I am looking for a tool or a method to transform a shapefile (with QGIS or R) into this form. And please be aware: It's not just clipping a hexagonal grid or a grid of hexagons! Each hexagon should represent an equal number of a measure (e.g. each hexagon represents 5,000 trees).

Maybe you know about scapetoad! http://scapetoad.choros.ch/
So I basically want to produce a similar output to scapetoad - but with a more restricted grid(?).

edit: The mentioning of QGis and R is not a restriction - it's just where I was looking for a solution. Of course I am happy with any tool, method or advise!


texts: Consistent tab spacing in custom attribute table in QGIS Atlas

texts: I am trying to have consistent spacing between various columns using '\t' but it does not seem to work. I tried adding spaces manually but the output is not very pleasing as is evident from the image. Does anyone have any ideas as to how I can achieve my goal of aligning the text in different columns with their column headings.


texts: Which interpolation technique is suitable for a bathymetry of a small lake?

texts:
This is a lake of approximately 13 ha with 81 sampled depth points in about 10 transect lines:

Previously in ARCgis with a 50 ha lake and about a 100 depth sampling points, I got decent output with the TopotoRaster tool. However, no such exact equivalent seems to exist with QGIS or open source software.

In QGIS, I got the interpolated raster below, using the TIN method in the Raster Interpolation plugin. However, this seemed to be a lucky outcome, when I tried to repeat, I got different results (unsatisfactory) in spite of not really varying any parameter.

These are more urban (constructed) tanks than lakes, therefore, they are fairly regular in their bed profile, hence the low point sampling density. Some articles seemed to suggest Inverse Distance Weighting (IDW) as the most suitable technique, yet I seemed to get the worst results with that (possibly owing to low point density).

Are there any heuristics which can be employed here considering the size of the lake, its regular profile and the point sampling density to arrive at which interpolation method is apt? (between Kriging, IDW, Bilinear, Cubic convolution, TIN or spline)

Or is it always a bit of trial and error?


texts:
Is it OK to have private functions in a python toolbox?

I know it's possible because I tried. But I don't know if that's OK, I haven't seen anything in the Internet where someone from ESIR is using private functions.

Example:

class Toolbox():
 ....

class Tool():
 ....
  def ____clip_features____(self):
  # clip features

  def ____buffer_clipped_features____(self):
  # buffer

Basically I don't want to have all the code in Execute, I want to break it into functions.


texts:
I have  a lat-lon point, translated to a street name via nominatim, and I want to find the intersecting streets to retrieve the user something like this:

123rd St, between 456th Bv and 789th Rd

I need to know how to query that.

This is, because in my country (Argentina) OSM doesn't have street numbers when reverse geocoding with nominatim.


texts: Leaflet.markercluster Gives slow performance when zooming

texts:
I have used leaflet marker cluster to render the geojson.

I am rendering 1 million geojson data. This gives better performance when render the data, but when zooming the map, gives very slow performance.

How to avoid this issue?

I am using the events zoomstart and zoomend to show the spinner.

Even zoomstart starts only after 2 or 3 seconds.
This is starting after 6 or 8 seconds.

 map.on("zoomstart", function (e) {map.spin(true);});
 map.on("zoomend", function (e) { map.spin(false); });


texts: Proper workflow for LAS to DEM conversion

texts:
I regularly come across LiDAR (.LAS) files with elevation data. When I do, I always struggle to find a way of converting them to a DEM for hydrological analysis. I have developed several workflows, and even if they usually (but not always!) output what I need, they don't seem very optimized. Also, I would like to have one workflow that I can rely on, and not have to try three different every time.
These are my current workflows:
FME:
LAS reader --> PointCloudCombiner --> RasterDEMGenerator --> Geotiff writer. (reference time 5 min).
ArcMap:

LAS to multipoint --> Multipoint to Terrain --> Terrain to raster (10 min).
LAS to multipoint --> Create TIN (since Topo to raster can't read Point.Z values) --> TIN to raster (15 min).
Create new Mosaic dataset and add LAS as raster. Export to ESRI GRID.

LAStools:
LAStoTXT --> Make XY event layer --> To Shapefile --> Topo to raster (3-4 hrs)
I also know about the LAS dataset to raster and LAS dataset to TIN etc, but they usually won't recognize my LAS files. From what I understand #1 in Arcmap is the ESRI preferred method (?).
All I want is a hydrologically correct raster that I can use for further analysis. What would you use?
I have access to ArcGIS Standard 10.1 (soon 10.2), 3D analyst, Spatial analyst. Opensource solutions are welcome as well as scripting if necessary (Python).


texts: Geotools PointSymbolizer, moves symbol location

texts:
I'm trying to render a symbol on map. My symbol will display on map but in the wrong location. My symbol's centre is set to my location, but I want my symbol's bottom to be the point of my location. How is it possible? See image below to explain this:

There is the triangle symbol, but you can see that there is a point in the middle of symbol. This dot marks my exact location. I want the lower point of the triangle to be on that point.

Please help me achieve this in Geotools.


texts:
I'm wondering if anyone can help me. I added a CSV file on ArcGIS 10.2.1, I displayed the coordinates and everything worked fine. However, when I duplicated and edited the new CSV file to change the numbers in one column it's not working. Instead of my XY columns I keep getting the choice of lots of fields instead. Does anyone know how to fix this? It has been an intermittent problem through my project.

Thanks for your reply. I'm editing the file in Excel and saving as to create a new file. I then restart ArcMap and add the file but the same error happens. Any ideas? The original file still works as normal.

The names of the columns are ID, X, Y, OFFSETA, OFFSETB, RADIUS2. The headings don't change with the new files I create, just the figures in one of the columns.


texts: Both layers are in same CRS but in a different place

texts:
I'm facing a problem with QGIS and have no clue what I'm doing wrong here. I've tried everything I know of.

I have polygon layer in CRS 2180. I add another layer that should be overlapping perfectly - and it does.

When I simply drag the layer to QGIS it fits perfectly fine, but when I change that new layer CRS to 2180 (THE SAME CRS THAT IM WORKING WITH) it goes somewhere far far away. I don't get it. Both layers are in the same CRS and they don't fit but when they're in different CRS then they fit. What am I doing wrong here?

I need them to be in the same CRS because otherwise the clip function doesn't work and I want to clip these new layers to only fit my original layer.


texts: How to subscribe Web Map Service from GeoServer?

texts:
I have my shapefile inside GeoServer and I already published it as a layer.

I am able to preview the layer under GeoServer web interface.

Now, I want to subscribe / import/ retrieve the shapefile as image to my third party online map API. So that, the polygon can overlay on my third party map.

The online map API I am using now is a non-popular API and they do not provide any sample or source for subscribing / importing / retrieving WMS layer.

They just provide the following code to demonstrate the use of their map to import WMS layer:

Xmap.ImportWMSLayer('layer title',
    {
        url:'http://WMS',
        layers:'Layer_Name',
        version: '1.3.0', // WMS version
        crs:'EPSG:900913',
        srs:'EPSG:900913',
        format:'image/png' // format
    });

I tried to key in the respective parameters but it just does not seems to retrieve.

Hence, now I would like to diagnosis the problems

Problem 1: I set the WMS in GeoServer wrongly and hence can't retrieve the map

Problem 2: I set the WMS in GeoServer correctly but I key in the parameter name wrongly, and hence can't retrieve the map

So here is my question:

1) I am able to preview my layer in GeoServer web interface, does this mean, the layer is ready for retrieve to third party map API?

2) If answer for question (1) is a NO. Then how can I make sure my GeoServer is providing the map service for my layer?

EDIT: update based on the request of more info

Since the layer name in my GeoServer is korea, So I also key in 'korea' as my layer name in as the parameter name.

EDIT: Update the parameters information which I set

map.ImportWMSLayer('korea',
    {
        url:'http://localhost:8080/geoserver/web/',
        layers:'korea:korea',
        version: '1.3.0',
        crs:'EPSG:4326',
        srs:'EPSG:4326',
        format:'image/png'
    });

EDIT: I update the URL to http://localhost:8080/geoserver/korea/wms

EDIT Add the preview layer display screen in my GeoServer

Inspect Element in OpenLayers preview

<img id="OpenLayersDiv44" class="olTileImage" src="http://localhost:8080/geoserver/korea/wms?LAYERS=korea%3Akorea&amp;STYLES=&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;SRS=EPSG%3A4326&amp;BBOX=121.54456007603,28.652528651739,136.26831368157,39.637829193375&amp;WIDTH=512&amp;HEIGHT=382" style="width: 512px; height: 382px; position: relative;">


texts: MCC-LiDAR error: version minor out of range

texts:
I am trying to use MCC-LiDAR tool, but I can't get it to work.

Example, when I type:

C:\>mcc-lidar -s 1 -t 1 TMR_428_63.las output_filename.las

I get the following error message:

  Internal program error: version minor out of range

What am I doing wrong? The las file version I'm using is 1.4.


texts: GEE: Supervised Classification exceed memory

texts:
I am trying to do a supervised classification using Landsat images, DEM, Slopes, NDVI, etc. Is there any way to do not exceed memory limit?

https://code.earthengine.google.com/4e51f886186d8f373372a499026b2557


texts:
I am having trouble getting SNODAS data, downloaded from the ftp, to display properly in ArcGIS Pro.
I've tried following NSIDC instructions from How do I import SNODAS data into ArcGIS? to create a proper header file. After creating the header file, it can add that .dat file to the map, and in the Contents pane it looks like it's loaded correctly (displays a color ramp with appropriate values), but nothing actually shows up on the map.
Any suggestions?
EDIT: Ok I think I've found at least part of the problem
If I do a "zoom to layer" on the SNODAS data, it brings me to the rendered data. However, it appears as if something is wrong with how its being projected...
I'm new to ArcGIS so apologies if this doesn't make any sense. When I zoom to the SNODAS layer and move the mouse around, there is a little display at the bottom that shows the location of the mouse. The units are displayed as meters, but they should be degrees lat/lon. For example, if i move my mouse to the left-most extent of the raster, it tells me I am about 125 meters West, but it should be 125 degrees West, i.e. the western extent of the continental USA


texts:
I have high resolution UAV-Images (4x4cm) in RGB and would like to detect individual tree canopy's. I was using Object Based Image Segmentation (OBIS) from SAGA to classify the images by homogeneous spectral regions and got that result:

I humanly can interpret the segmentation and be able to see individual tree canopy's. But I need a computed solution to isolate the individual canopy's. Using OS-GIS tool's.


texts: QGIS WFS download data limit to window extend not functioning properly

texts:
The checkbox under WFS Server Connections setup that should control the amount of data that is going to be downloaded from WFS doesn't react as it should.

Each time I tried to visualize the data within the bounding box it firstly take to much time and secondly when I save it on my hard disk and open again I found many polygons that are outside my desired area. Plus in my bbox not all vectors are present.
I tried to control the WFS download via "Build query" using these expressions but not got what I wanted:

BBOX(STGeomFromText('POINT(1381933 4375059)', 3003), STGeomFromText('POINT(1381933 4375059)', 3003))
ST_SetSRID((ST_MakeBox2D(ST_Point(1381933,4375059), ST_Point(1541675,4461553))), 3003)
ST_AsText(ST_MakeEnvelope(1381933,4375059, 1541675,4461553, 3003))
ST_MakeBox2D(ST_GeomFromText('POINT(1381933 4375059)', 3003), ST_GeomFromText('POINT(1381933 4375059)', 3003))

Above shown coordinates are coming from one Italian WFS but I also tried those scripts at several different WFSs and the result was the same.

This link looks promising but actually not works:
QGIS Spatial Filter (boundary box)

ST_Within(geometry,ST_SetSRID(ST_MakeBox2D(ST_Point(1381933,4375059), ST_Point(1541675,4461553)), 3003))

The "geometry" must be defined first.

Any ideas how to force the WFS to download only the data within bbox. Many similar questions exists at the web but non of them answered directly how to do it or why those scripts are not filtering the data. Would be better if one can describe how to do it via available QGIS UI (SQL Query Composer) or to exactly explain how to include the bbox into the WFS's link and access the portal directly with bbox defined in it.
I also tried to achieve this by controlling the "Maximum number of features" and "Page size" (10000 and 100 respectively) but the problem remains.
My Network General settings are:
Time out for network requests (ms): 240000
and Cache settings Size (KiB): 1024000


texts: What is the effective and legal way to get map tiles for the size of 2 or 3 states?

texts:
I would like to get map tiles possibly from Open Street Map (yes I am aware about tile usage policy and would not like to breach that)  or other source for the purpose to serve it as offline maps to applications.

Total area will be of the size of let’s say 2 or 3 states of US (300K square miles) and from zoom level 1 to 12 levels (possibly in future up to 17 levels), so I think it will be couple of GBs.

Possibly it can be 2 ways, generating those map tiles locally by OSM data or download tiles from some source with some utility. Or may be I have no idea and there is something simple exist!

What are the specific ways this can be achived quicker, easier and legal way?


texts: Estimating tree cover (or other vegetative cover) over impervious cover using NLCD data

texts:
Has anyone attempted to estimate tree cover or general vegetative cover over impervious cover using the NLCD data sets?  The provided layers (land classification, tree cover, impervious cover) could be combined to produce an estimate - and I currently have an algorithm that does this - but I'm wondering if anyone else has tried.

As an example of what I am talking about, one grid cell might be classified as medium density residential in the original data set (type = 23), with an impervious cover percentage of 70% and a percent tree cover of 40%.  Obviously there is some overlap of canopy and impervious cover, since they sum to be greater than 100%.  So, based on the fact this cell was classified as a medium density residential cell, we use a set of simple mathematical equations to estimate tree cover over impervious.

Link to NLCD data sets:  http://www.mrlc.gov/nlcd2011.php


texts:
I am trying to create a raster layer in QGIS with a custom CRS.  When I measure the distance of the equator it is wildly incorrect. The distance should be 38,563.0258 km but comes out anywhere between 2km and 200,000km.

I am trying to create an equirectangular projection.

The CRS is +proj=eqc +a=6158.143 +b=6137.496 +unit=m +no_defs


texts: Check if night hours (TimeWithinDay; AreaSolarRadiation)

texts:
I am creating a script that uses AreaSolarRadiation.  Currently arcpy gives a cryptic error during the night hours.

arcgisscripting.ExecuteError: ERROR 999999: Error executing function.
Failed to open raster dataset
Failed to execute (AreaSolarRadiation)

Is there a way to simply check to know when it is night hours so I can skip running the tool? Currently I just catch the cryptic error and skip it.  The script calculates Solar Radiation every hour over several days.  It would be nice to have a quick check to save computation time during night hours.

import arcpy
from arcpy.sa import *
import datetime

arcpy.env.workspace = r'C:\Workspace'
arcpy.CheckOutExtension('Spatial')

print('Begin Script')

date_time = datetime.datetime.strptime('2014-01-01', '%Y-%m-%d')
day_of_year = date_time.timetuple().tm_yday #(Jan 1 = 1)
start = 12 # Hour to start calculation
end = 13 # Hour to end
twd = TimeWithinDay(day_of_year, start, end)
sky_size = 200
dem = r'C:\Workspace\dem.tif' # Any DEM file (use a small one for testing)

# Works during the day
out_solar_radiation = AreaSolarRadiation(dem, '', sky_size, twd)
print(out_solar_radiation)

start = 2
end = 3
twd = TimeWithinDay(day_of_year, start, end)

# Does not work at night
out_solar_radiation = AreaSolarRadiation(dem, '', sky_size, twd)
print out_solar_radiation
print('End Script')

Using ArcGIS 10.3

When the workspace is a place arcpy can write to I get a different error

arcgisscripting.ExecuteError: ERROR 010036: Error in creating the sun map.
ERROR 010003: The time range is at night when sun light is not available
Failed to execute (AreaSolarRadiation)

Esri help pages don't have very helpful information though.

http://resources.arcgis.com/en/help/main/10.1/index.html#//00vq0000000n010036
http://resources.arcgis.com/en/help/main/10.1/index.html#//00vq00000002010003

Tool dialogue and error screenshots


texts:
Is there a way to manipulate and edit ArcMap graphic legend items?

From what I found researching, one way is to convert the legend into graphics, ungrouping all the elements and editing each graphic element on it's own. But, by doing so, the legend seize to be linked to the table of content elements and any changes I make to the map are not reflected in the legend.

I would like to keep that relationship between the legend and the TOC while having control on the size, level of details and visibility in the legend.
I'm using ArcMap 10.5, but if someone knows if that functionality is available thorough ArcPro, I would like to known that as well.

See attached image as an example


texts: How to implement routing with Google Maps in Wordpress?

texts: I need to put only one point with custom marker on the google map. When user enter his address, there must show up a route to that point from his address. What is the simplest way to get that function?


texts: Qfield: OSM data not displayed, layer is grey

texts:
I am using QGIS 2.18.20 and Qfield 0.10.13 Kesch on Android 7.0.
In order to transfer data to the Android device, I am storing the project file and all related files in a specific folder which I copy with a sync program to the device.

In another post, it was mentioned that the x-y-z tile server is compatible with Qfield. However, all I am getting on the device, is the OSM layer with a grey background, even though it is set to visible plus a blank image of the layer.

I have tried to save the layer in QGIS as a tiff file, but I am getting the message that this format is not supported.

How do I get OSM raster data onto my device?


texts: ArcGIS Server Could Not Find 'System/GPServer/PublishingToolsEx'

texts:
I encounter this error which trying to register a PostgreSQL database:

  Unable to process request. Error handling service request :Could not find a service with the name 'System/GPServer/PublishingToolsEx' in the configured clusters. Service may be stopped or ArcGIS Server may not be running.

I am using ArcGIS Server 10.5 with patches installed.


texts: Element not traversable- closest facility -one way roads?

texts:
I am trying to write an ArcPy script using the closet facility option to find the closet facilities (with minutes as a cost attribute) for vehicles.

I have a problem that all the incidents along the one-way roads, are considered as not traversable locations, I have read here about this problem and there is a suggestion that the problem in the FT or TF of the one-way roads.

How can I solve this problem, as the line for making the closet facility layer is as follows:

arcpy.MakeClosestFacilityLayer_na(inputNetworkDataset, Closest_Facility, "MINUTES", "TRAVEL_FROM", "", "1", "", "ALLOW_UTURNS", "", "USE_HIERARCHY", "", "TRUE_LINES_WITH_MEASURES", "", "NOT_USED") #

as the input network dataset is adjusted with restriction (roads direction), cost attribute (minutes) and hierarchy?


texts: Join by location returns null and incorrect values

texts:
I'm having some trouble using the join by location feature in QGIS (2.18).  I have a data set of ~7000 points, and another polygon data set.  Both are ESPG3573 shapefiles.  However, when I join by location many points that are within the polygon don't join properly.  I get a lot of "NULL" fields.  When I adjust the precision, it reduces the number of NULL joins, but also joins some locations inaccurately.

I've tried every geometric predicate and precision adjustment I could imagine.


texts: Adding Text in Google Earth Engine Thumbnail

texts:
I am creating a thumbnail of monthly-mean ndwi images in google earth engine. I want to add date as text(label) to each image so when thumbnail runs, dates are displayed on preferably top and change with images.
Is there any way to achieve this?


texts:
I have been trying to export my polygon shapefile from Qgis to postgis but have not succeeded.

I have tried such through the 'database' plugin of qgis but still have not got it.

I wish to know how I can do this, whether there is anything I need to do first in either postgis or Qgis before carrying out the process.


texts: Where can I find the GRASS add-ons metadata?

texts:
I am trying to install grass7 addons locally.  I have downloaded them and am using the url=path version of the g.extension command line.  I get an error as follows:

g.extension url=/home/user/source/grass7-addons/grass7/ -g
List of available extensions (modules):
Fetching list of extensions from GRASS-Addons SVN repository (be patient)...
WARNING: Flag 'g' ignored, addons metadata file not available

I previously downloaded a metadata file from somewhere other than the svn repository.  I am trying to find it again (and I hope this question will make it easier to find in future).

Update:
I examined g.extension source. In the absence of the metadata file, it won't read the available extensions and won't compile them.  It was possible to compile extensions manually by setting the install directory for grass to world writeable, then compiling each extension manually:

grass72
sudo chmod -R a+w $GISBASE
cd /path/to/extension/source
make MODULE_TOPDIR=$GISBASE <extension_name>


texts: Finding creator of Inverse Distance Weighted method?

texts:
I am interested in the very first person who invented the Inverse Distance Weighted method or the very first reference that this method was mentioned.

I tried to search on Google but could not get an answer.

Does anyone know?


texts:
I have a grid (can be in shapefile and can be also in coordinates) and I need to know how can I create tilings with it to Landsat 8 images (16 bit images), selecting the output tile size, the overlap.

I have tried with MapTiler but it doesn't work with that images (16bit) and also with gdal2tiles.

I tried installing GeoTools or SimpleTiles but I couldn't and I don't know if it's an easiest way.


texts: KML file showing wrong co-ordinates on Google Earth

texts:
This is little snippet from the kml file now the co-ordinates are for some where in UK with Lat- 51.45 and Long - 0.0386 but when I plot this kml file on Google Earth it shows all the points in middle of ocean between Somalia and Seychelles ?

 <Placemark>
  <name>2016067</name>
  <description>   <![CDATA[   03-May-16

16:35
Tuesday
A320
FW
UAV UNSPECIFIED
A
LHR
Unknown
700
Unknown
Unknown
Unknown
Unknown
IFR
Unknown
]]> </description>
  <LookAt>
   <latitude>51.45</latitude>
   <longitude>3.888889E-02</longitude>
   <altitude>0</altitude>
   <range>0</range>
   <tilt>0</tilt>
   <heading>0</heading>
   <altitudeMode>relativeToGround</altitudeMode>
   <gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>
  </LookAt>

  <Point>
   <altitudeMode>relativeToGround</altitudeMode>
    <coordinates>51.45,3.888889E-02</coordinates>
  </Point>
 </Placemark>

 </Document>
</kml>

What am I doing wrong I am using VBA to generate KML file ?

Process:

I have this Position Co-ordinate: 5133N 00241W
I split them to get the Lats and Longs with appending extra zeros at then end if required and get the following values:

Latitude    Longitude
513300N      002410W

Then I convert them from DMS to decimal format using following formula

LatDec = Left(.Range("V" & i).Value, 2) + (Mid(.Range("V" & i).Value, 3, 2) / 60) + (Mid(.Range("V" & i).Value, 5, 2) / 3600)
LongDec = Left(.Range("W" & i).Value, 2) + (Mid(.Range("W" & i).Value, 3, 2) / 60) + (Mid(.Range("W" & i).Value, 5, 2) / 3600)

And they produce the right decimal co-ordinates and everything seems right but I just don't get the right plot on Google Earth.


texts: Finding correct service for arcpy.createArcSDEconnectionFile_management in ArcPy?

texts:
I'm working on a toolbar for modifying an SDE database in acrmaps. My code works in a file geodatabase so I'm trying to use this function to make it work in an ArcSDE. I've gotten every other variable in this function figured out, but I have no idea how to find the service variable. I did find some commands for that in arcmaps 9.3, but I am using 10.3 and the command console has been removed.

How do I figure out what the ArcSDE service name or TCP port number is? Is there a better way to do this?

Here is the documentation on the function:

http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/create-arcsde-connection-file.htm


texts: How to Create a Vector Field from Separate u and v Data Files?

texts:
I am using Quantum GIS and trying to create a vector field using data from two separate netcdfs. One contains the u data, one contains the v data. Can this be done, and if so, how? Thanks.

Jason


texts: OpenStreetMap modify tags based on multiple criteria

texts:
I have and .osm file and I would like the modify the tags based on the following criteria.

If highway = "unclassified"
and has a cycleway tag
Then change highway to "tertiary"

I know that with osmfilter I can modify all the "unclassified" roads

./osmfilter streets.osm --modify-tags="highway=unclassifiedto =tertiary" -o=streets2.osm

But is there a way to specify the additional criteria? Preferably a method that works on large osm files.


texts: Using ArcGIS 10 to find areas of overlapping use and areas with low use?

texts: I have a spatial data set that shows areas of use (several different types of use) on the landscape.  I am looking for ways to overlay these spatial use layers so that I can show where the areas of highest use (hotspot locations) as well as areas of moderate use and areas of lowest use.  How can this be best achieved?


texts: Using different ArcMap licenses on same computer?

texts:
I am currently a GIS analyst for a company and use their ArcMap Desktop license on my computer.

I am also considering working part-time for another company, who also would give me an ArcMap Desktop license. It would be A LOT easier to be able to have these on the same computer.

Is it possible in any way to use two different licenses on the same computer? I know I can't install two versions of the software on the same machine, but is it possible to switch between licenses when desired without major issues?

Or could I just force myself to use ArcGIS Pro for one company (which I really am trying to do anyways) and ArcMap for the other?

I definitely don't want to violate any licensing rules (like using one license to do the other company's work), but I also don't want to have to lug around two computers if I can avoid it.


texts: Scripting to remove specific characters in ArcGIS 10.4

texts: I am unable to find in the Help / Resource the script if there is one, to remove certain characters in a column. Example  MPRR-BLK39-T4S-29-01. I want to get rid of T4S for 25 parcels. Instead of going to each individual parcel and manually edit, is there a certain script that will delete out "T4S"?


texts: Selecting coordinates of points below DEM (DTM)

texts:
I have a DEM file and a big list of X,Y,Z point (about 1M). Each of them can be below or above the DEM file.

Is there a quick way to select the x,y,z points below the DEM file using Python?

I did not find yet a solution on Google or StackOverflow.


texts: Open source alternative to ArcGIS geoprocessing service concept?

texts:
I am searching for any examples of implementing a logic that Esri has built with geoprocessing services. You author a custom tool or it can be a system tool >> you publish it exposing this functionality as a web service >> you consume the web service with a client.

A classical simple example: user can click on the map to create a point > the coordinates are sent to the server > buffering operation is being executed at the back-end > the buffer zone feature (or just an image) is sent back to client and shown on the map canvas. I've been developing Esri GP services for last 3 years and it has been a nice experience specifically since version 10.1.

Are there any examples of the open source system/solution that one could use to build a similar logic?

I've googled and found sextante gis but there was nothing specific on how this works and how much of logic that is available through Esri is available. 52North also seem to be working on that, but again I am missing the clean explanation of the concept.


texts:
I would like to try "lasdetectshape" in lidR package to detect line pattern objects in my point cloud.

library(lidR)
las <- readLAS("9a-1.las", select = 'xyzicnrRGB')

las <- lasdetectshape(las, shp_line, attribute = "Shape", filter = NULL)

However, getting following error:

Error in lasdetectshape(las, shp_line, attribute = "Shape", filter = NULL)

could not find function "lasdetectshape"

I tried re-install lidR package and re-started R with no sucess.


texts: How to display KML image overlays in OpenLayers?

texts:
I am working on displaying Ground Overlays on OpenLayers by parsing KML manually.

To do so, I was trying to add an image on top of Google Map by looking at GroundOverlay section from code.google.com/apis/kml/documentation/KML_Samples.kml file.

<GroundOverlay>
      <name>Large-scale overlay on terrain</name>
      <description>Overlay shows Mount Etna erupting
          on July 13th, 2001.</description>
      <Icon>
        <href>http://code.google.com/apis/kml/documentation/etna.jpg</href>
      </Icon>
      <LatLonBox>
        <north>37.91904192681665</north>
        <south>37.46543388598137</south>
        <east>15.35832653742206</east>
        <west>14.60128369746704</west>
        <rotation>-0.1556640799496235</rotation>
      </LatLonBox>
    </GroundOverlay>

On Google maps it looks like this

Now following is the code I am playing with to display the image in a similar fashion on top of Google Maps layer in OpenLayers:

  //-------create base map------------------------------
    map = new OpenLayers.Map('map',{
        projection: new OpenLayers.Projection("EPSG:900913"),
        displayProjection: new OpenLayers.Projection("EPSG:4326")
    });

    var gmap = new OpenLayers.Layer.Google(
        "Google Streets", // the default
        {
            numZoomLevels: 20
        }
        );

    map.addLayer(gmap);

    var point = new OpenLayers.LonLat( 14.93,37.70);
    var zoomLevel=7;
    point.transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
    map.setCenter(point, zoomLevel);

    map.addControl( new OpenLayers.Control.LayerSwitcher() );
    map.addControl(new OpenLayers.Control.MousePosition());

    //-------add an image------------------------------
    var proj = new OpenLayers.Projection("EPSG:4326");
    var bounds = new OpenLayers.Bounds(37.91904192681665, 37.46543388598137, 15.35832653742206, 14.60128369746704)
    bounds.transform(proj, map.getProjectionObject());

    var graphic = new OpenLayers.Layer.Image(
        'Large-scale overlay on terrain',
        'http://code.google.com/apis/kml/documentation/etna.jpg',
        bounds ,
        new OpenLayers.Size(453, 339) ,
        {
            'opacity': 0.5,
            'isBaseLayer': false,
            'visibility': true,
            projection: new OpenLayers.Projection("EPSG:900913")
        }

        );
    map.addLayer(graphic);

Now with above code, the layer name gets added to the layer switcher control, but no image is displayed. Could you please see if I am setting the projection, size and other parameters correctly? Also how do an image rotation?


texts: Atmospheric Correction for multiple Landsat-8 scenes

texts:
I need to perform an atmospheric correction for Landsat-8 data and can't find a solution.

There is a very limited amount of information dealing with L8-correction methods in a comprehensive way, that's why I created this post.
There's some existing questions here on StackExchange dealing with details related to this post but they are outdated. E.g: "how can i correct atmospherically Landsat 8 images?" considers i.atcorr as a solution which doesn't work anymore (see below). The answers to "How to atmospherically correct Landsat 8 data?" deal with single image Dark Object Subtraction which is not suitable due to reasons given below. (Sorry for not providing direct links, StackExchange prohibits this for new users)

So far I have tried:

ATCOR toolbox in ERDAS - costs a lot of money and, having worked with it for several years, I'm not content with it's performance
i.atcorr in Grass 6.4 does not support Landsat-8
i.atcorr in Grass 7.0.3 does not work
i.landsat.atcorr does not work and is not updated anymore
ESPA-SR is very complex and I fail to set it up properly or run any commands. github.com/USGS-EROS/espa-surface-reflectance
Dark Object Substraction is not feasible for a large amount of scences (as it requires user interaction) and has a questinable performance

Does anybody have other suggestions or solutions?#

Edit/Update: A relevant post: Open Source Alternatives to ERDAS IMAGINE ATCOR?


texts: GRASS function "V.net.centrality" Error env: python3: No such file or directory

texts: I am using QGIS 3.4 (just updated) on a Mac OSX Mojave 10.14. I am trying to use the grass function "v.net.centrality" but I keep getting an error. The error is ... env: python3: No such file or directory. How can I fix this?


texts: Taking ArcGIS feature class to pandas pivot table?

texts:
I'm new to pandas and am trying to create a pivot table based off of two fields - DIVISION and MATERIAL. I'd like to count each occurances of each value. Rows would be DIVISION and columns would be MATERIAL.

Example:

Here's what I've come up with so far:

import arcpy
import pandas

#path to feature class
servFc = r"Path\to\featureclass"
#create numpy array
npArray = arcpy.da.FeatureClassToNumPyArray(servFc,
                                            ["MATERIAL", "DIVISION"],
                                            null_value = -9999)

#numpy array to pandas data frame
pandaDf = pandas.DataFrame (npArray)
#pivot table - guessing here
pandas.pivot_table (pandaDf, index = "DIVISION", columns = "MATERIAL", aggfunc = numpy.sum) #<--- want count, not sum

Results:

Empty DataFrame
Columns: []
Index: []


texts: Export 3D data dxf file problems with elevation value

texts:
I have the problem that i can´t export a shp file into DXF and include the eleveation value I make all the procedure explane on "export 3D data dxf file 4" but each time I have the folow error:

C:\>ogr2ogr -f "dxf" C:\Users\Dieter\Desktop\Fuchstal50\HL1m.dxf
C:\Users\Dieter\Desktop\Fuchstal50\levelline1m\contour.shp -zfield "levelline"
ERROR 1: DXF layer does not support arbitrary field creation, field 'ID' not created.
ERROR 1: DXF layer does not support arbitrary field creation, field 'levelline' not created.

And when I import the file into Autodesk to see if I have import the elevation, is not elevation information X,Y are the coordinates numbers but Z is 000000?


texts: I received a batch of aerial images along with an index file that essentially tells me which aerial image covers each 20x20km tile. Can I also create this type of index TAB through MapInfo?


texts: Problem converting qrc file into py one by PyQt5

texts:
I am in my first steps in PyQt5. I intend to create a plugin within QGis 3.0. I would like to convert the file resources.qrc into py file, by running windows shell commands with python. However, when I execute:

pyrcc4 resources.qrc -o resources.py

The code of resources.qrc is as follow:

<RCC>
 <qresource prefix="/">
  <file>://Program Files/QGIS3.2/apps/qgis/python/plugins/testPlugin/icon.png</file>
 </qresource>
</RCC>

The code of testPlugin.py is as follow:

from PyQt5.QtCore import *
from PyQt5.QtGui import *
import resources

class TestPlugin:
 def __init__(self, iface):
   self.iface = iface

 def initGui(self):
   self.action = QAction("Run", self.iface.mainWindow())
   QObject.connect(self.action, SIGNAL("triggered()"),self.onRun)
   self.iface.addPluginToMenu("Test Plugin", self.action)

 def unload(self):
   self.iface.removePluginMenu("Test Plugin", self.action)

 def onRun(self):
   QMessageBox.information(self.iface.mainWindow(), "debug","Running")

I receive the following message error: invalid syntax. I verify the path files, but without success.

When I execude the code from Windows commande, pyrcc4 is not recognized as internal or external command, executal program or command file.

Any help is welcome.


texts: Openlayers CQL.js compare attribute columns

texts:
I'm trying to use a CQL filter in OpenLayers in order to identify some polygons in which the value of one column is higher then the other. So, when I use the following cql filter

production_2010 > production_2008

I get an error ERROR: In parsing: [production_2008], expected one of: VALUE: /^('([^']|'')'|\d+(.\d)?|.\d+)/

The funny thing i that GeoServer CQL filter will allow such comparison (done using the layer preview web page).

So, from what I understand, OpenLayers CQL.js can only parse filters that have an attribute column name on the left and a value on the right?


texts: How to move data according to the distance

texts: I have a data in the shapefile format. Now I have to move them according to the boundaries. Is their any solution to move according to the distance without manually. I want to select the data with select by location and after points being selected they should be move horizontally or vertically with distance prescribed. I just go for point displacement but every time a shapefile need to export in that process.


texts: Create/Update Polygon Divisions from Border Geometry

texts:
Is there a method to create and update polygons (parcels?) from attribute definitions (legal definitions)?

For example, polygon X is defined as the inner geometry bounded by county line A, river B, highway C, interstate D, and county line E.

But say in a year the definition changes from river B to river F which is a nearby and roughly parallel river. Polygon X should update to include the new area but Polygon Y (on the other side of River B) should lose the area between rivers B and F.

I can, of course, create and update these polygons manually, but I'm curious to know if there is a utility, method, or process already in existence to perform this function. For example, if I create a higher resolution river feature class and want to automatically update all of the affected polygons.


texts:
pdal: why does filters.hag and filters.ferry with HeightAboveGround=Z reset original points to Z=0?

I'm essentially trying out the example-3, given here:

https://pdal.io/stages/filters.hag.html#example-3

{
  "pipeline":[
  ...
  take input and perhaps do some other stuff
  ...
    {
      "type":"filters.smrf",
      "ignore":"Classification[7:7]", // ignore "noise points" from input
      "slope":0.05,
      "window":45,
      "threshold":0.8,
      "scalar":1.25
    },
    {
        "type":"filters.hag"
    },
    {
        "type":"filters.ferry",
        "dimensions":"HeightAboveGround=Z"
    },
  ...
  do output
  ...
  ]
}

Results, when plotted:

The code above recreates the problem in the sense that if I remove the filters.hag and filters.ferry, the red cloud would be the same as the blue one.

Is there something I could do, to add the offsets back to the output?


texts: How much raster data can TimeManager handle?

texts:
I have average wind speed data for the UK at 5x5km grids in raster form for every month over 10 years.

I load the first 7 months into timemanager and the animation is fluid without any loading/down time. As soon as I add the 8th raster (tested with different rasters), there's about 50 milliseconds of thinking time where nothing is displayed until the raster loads and displays the layer. I've built pyramids for the rasters but it hasn't helped. If I load a basemap, then there is 'thinking' time between every raster making the whole animation studder.

Has anybody else ran into a similar issue when animating large datasets?

In the end it won't matter as I can still export the stills into a folder and stitch them together in video editing software but it would be nice for the animation to run smoothly in QGIS.


texts:
I want to create an Esri Story Map and integrate/include an own web map. I would prefer to create both the web map and story map using an API so that I can programmatically develop the maps.

Is there an API for Esri Story Maps and is it the same as for creating web maps (there it is the ArcGIS API for Javascript)?


texts: Running PyQGIS in FME PythonCaller transformer?

texts:
I am trying to get information from a QGIS project and layers and produce a new project based on new analysis results made on FME.

How to install the PyQGIS module and then using the custom python interpreter in FME Desktop?

I am using QGIS-ltr 2.18.23 (from OSGEO4w64) and FME 2018.1.0.1 (Win64).
And the python/QGIS related paths into PATH environmental variable are:
C:\OSGeo4W64\apps\qgis-ltr\bin;
C:\OSGeo4W64\apps\Python27;
C:\OSGeo4W64\bin

In FME desktop I am reading the C:\OSGeo4W64\bin\python27.dll as the preferred Python interpreter
and PYHTONHOME path is: C:\OSGeo4W64\apps\qgis-ltr\python


texts: Install QGIS plugin manually - Package not available in Plugin Manager

texts:
If it is helpful, I am using QGIS 3.4.3 (Madeira) and MacOS High Sierra v10.13.6

I am trying to install a QGIS plugin manually, I've been using the instructions from the PyQGIS Programmer's Guide by Gary Sherman. I've also found several helpful threads on stackoverflow such as:

How to install a QGIS plugin when offline?

installing plugins manually

How to Install QGIS 2.6 plugins offline (Though I am using version 3.4)

I've created a plugin on a local drive using the Plugin Builder.

I have compiled the resources file using the following (in the terminal) which is straight from the QGIS documentation

pyrcc5 -o resources.py resources.qrc

and I copied my plugin directory to my QGIS plugins directory.  Here is a screenshot of my directory, with some other plugins I've installed using the Plugin Manager. My test plugin is called "whereisthis":

When I open the Plugin Manager in QGIS, the other plugins in the same folder are visible under installed (such as NNJoin, mmqgis, EcoValuator) but 'whereisthis' is not on the list:

The book states: "You should now see your plugin in the list of installed plugins". But it is not there.

According to the other stackoverflow threads which I referenced earlier, I have reloaded my repository, I have enabled experimental plugins, I have rebooted QGIS and my machine (several times).

I also edited my metadata.txt file to make sure the correct minimum and maximum versions are available:

The plugin is also not in the "Invalid" tab of the Plugin Manager:

Is there something else I am overlooking?


texts: In QGIS import/update multiple layers from single spreadsheet

texts:
I have a spreadsheet I regularly update with new data. It contains X, Y and several column pairs. How does one assign in one operation information from the pairs (and associated X,Y) to their respective delimited text layers for plotting?
I convert Excel file to csv then add "delimited Text Layer". Example from  spreadsheet, pairs cols e&f, g&h etc: Also Edit greyed-out in attribute table.


texts: Why does QGIS 3.4 and higher create .tmp file instead of refresh editing layer after saving?

texts:
I downloaded QGIS 3.4.0 and try to save edits in .geojson file. I can save new objects, but not edits in attributes. Insted of it, QGIS creates .tmp file with my chаnges into the same folder with editing .geojson. To save my edits I had to copy the text of .tmp file and put it by hand in my .geojson. How to enforse QGIS 3.4.0 save changes in layer like it was in 3.2.3 and do not create .tmp files?

UPD: For further validation analysis I use .geojson in classic JSON tree-like structure, but QGIS - in his own structure stroke-by-stroke. And if I export my .geojson by QGIS, it saves the file in his structure and this new one could be edited and saved with no any .tmp files. So it looks like QGIS 3.4 cannot save edits if .geojson file has tree-like structure (unlike QGIS 3.2).

UPD2:Below parts of broken and working GeoJSONs

Broken:

Working:


texts: How to export postgis points as blocks in dxf with ogr2ogr

texts:
I'm trying to export postgis points as blocks to DXF format.
I have a simple table in postgis with columns:

CREATE TABLE pod_com_azimuth
(
  ogc_fid integer,
  rotation double precision,
  pointtype text,
  geom geometry(Point)
)

I'm converting it to DXF with an ogr2ogr utility:

ogr2ogr -f DXF angle_test.dxf
PG:"dbname='coms' host='localhost' port='5432' user='mofo' password='mofo' schemas=public"
-sql "select ogc_fid, rotation as blockangle, pointtype as blockname, 'rblk' as layer, geom
from pod_com_azimuth"

But when I open the resulting file in AutoCAD i get a layer with POINT objects. But I need them to be blocks with a blockname and blockangle values taken from postgresql fields. How do I export them as blocks (inserts) ?


texts: I can't use any GRASS tool, I get the error "The following layers were not correctly generated"

texts:
I've been trying to use GRASS r.fill.dir to get a filled DEM but I get the error:

The following layers were not correctly generated.

I tried using SAGA Fill Sinks, that worked. I get the same error on every GRASS tool I use.

QGIS version 3.12.0-București


texts: FME Workbench: Merging Multiple Shapefiles into One Database Table

texts:
I'm new to FME Workbench, but have used Quick Translator for a while. What I have is a directory: C:\Mexico\Maps\Rural where I’ve extracted the Shapefiles for multiple states. Nothing else is in that directory, just 4 files per state (.prj, .shp, .shx, .dbf). In SSMS, I have a new database name MexicoRural. I would like to use FME to load all files from the directory into one table.

I've tried creating multiple workspaces and the best I can get is that it will load the first Shapefile, but not the others. Any ideas how to do this?

UPDATE: I modified the [FEATURE_TYPES] in Published Parameters and was able to get it to read all files, but it wrote each file as a separate table to SSMS. Below are my writer settings.


texts: How to create GoogleMaps/OSM hyperlink for given bbox coordinates

texts: I have extracted the bbox coordinates from a shapefile and want to create a hyperlink for google maps respectively OSM. When you click on the hyperlink the map should be zoomed to the bbox extend and most perfectly the bounding rectangle should be rendered. Do you know how to do it? Thanks!


texts: Projection for a map covering 2 UTM zones

texts: I know similar questions have been asked about this already, but I would like to check something specifically... I have a copy of a published 1:1m map of Ivory Coast which states (in the legend) that it's projected in UTM30N, WGS 84. The problem I am wondering about is that the map spans zones UTM30N and UTM29N, so doesn't this mean that there is likely to be quite a lot of distortion across the map? Wouldn't lat-lon have been a more appropriate choice for such a map? I'm intrigued and would like to know what others think, because it's an official, published map and its authors must surely know more than I do about this!


texts: Mapinfo: Color label by attribute-expression

texts: It can be done in QGIS, but how to do that in Mapinfo?. I need to classify the labels color by  attributes from a column.


texts:
I'm simply trying to recreate a map I've already made successfully but with an updated table. I added the table to CartoDB, selected "Map View," and then selected "Torque Cat." Aside from doing those things, I've done no editing, but I'm receiving the following errors:

There is a problem with the map tiles. Please, check your CartoCSS style

And when I open the CSS Editor, I see this error:

line 4: Rule -torque-frame-count not allowed for Map.

Here's my CartoCSS:

/** torque_cat visualization */

Map {
-torque-frame-count:512;
-torque-animation-duration:30;
-torque-time-attribute:"cartodb_id";
-torque-aggregation-function:"CDB_Math_Mode(torque_category)";
-torque-resolution:2;
-torque-data-aggregation:linear;
}

#all_flights_201410011911_lines_smoothed_mas_pt{
  comp-op: source-over;
  marker-fill-opacity: 0.9;
  marker-line-color: #FFF;
  marker-line-width: 1.5;
  marker-line-opacity: 1;
  marker-type: ellipse;
  marker-width: 6;
  marker-fill: #FF9900;
}
#all_flights_201410011911_lines_smoothed_mas_pt[frame-offset=1] {
 marker-width:8;
 marker-fill-opacity:0.45;
}
#all_flights_201410011911_lines_smoothed_mas_pt[frame-offset=2] {
 marker-width:10;
 marker-fill-opacity:0.225;
}
#all_flights_201410011911_lines_smoothed_mas_pt[value=1] {
   marker-fill: #A6CEE3;
}

Seeing as I've done nothing but selected defaults, I'm at a loss for how to fix this.


texts: Need few references of ArcGIS Java Script API version 2.8

texts:
I need few samples from version 2.8 & I have check the site but Esri hosted latest version 3.2 so where should I get version 2.8 ??

I gone through this post regarding 2.8 version..and the only way is that I need to download SDK and install it on my machine..but is there any live link available for version 2.8??


texts: How can I export an image of the entire world from Google Earth Engine?

texts:
I'm a total noob but I've been successful generating a number of nice maps with desired overlays, and I've exported regional imagery successfully, but I'm having trouble exporting images of the entire world.
I'm animating in Maxon Cinema 4D (a 3D design app) and I'm hoping to generate 4K or higher resolution GeoTiffs with equirectangular projection (2:1 image ratio) of the whole world that map properly to a sphere. (Tiles are fine too as long as they add up to the whole world.)
I've searched and searched and am in disbelief I can't figure it out, so I can't thank you enough for helping me get over this hurdle.


texts:
Recently I have experienced a few problems with ArcGIS 10, so I switched back to 9.3, thinking that my live will be back to normal ... and it is not.

I am using at the time tool made by Venkatesh Merwade, producing river batymetry with sections - great tool by the way.

When I realized that the tool will not work under 10, I switched back to 9.3, so I could work. And it turns out that now when I try to use it under 9.3 I receive an error HRESULT E_FAIL

Would anyone know whats wrong?


texts: Changing one attribute of symbology, while leaving everything else alone in ArcGIS Pro?

texts:
I have 50 different attributes that I am symbolizing in ArcGIS Pro 2.4.   They have a variety of colors with black outlines.

How do I change the outline & transparency of 30 of these attributes at the same time without everything changing to the same color?

I could individually change all 30 but I'd like to highliht those 30 and change just the outline and transparency values,  without the colors becoming the same.


texts:
I have an issue when trying to use the 'Save as image...' function in QGIS2.18

It always shows what I had earlier placed as text annotations. Even with all the layers turned off they still on the resultant jpg. I can't see the annotations anywhere, I deleted all the print composers in case they were being picked up there, but that didn't help.

Anyone any ideas?


texts: How can I calculate the vertical distance to the nearest water?

texts:
Summary:

I would like to create a raster where each cell contains the vertical distance to the nearest water (a decent approximation would be acceptable).  The problem is that I'm not sure how to go about it.

Current approach:

I've looked through the documentation for my GIS (I'm using Grass 6.4 if that matters).  And I can't find any direct way to perform this calculation.  I've also searched the web without luck.

So I dreamed up the following:

convert my water vector to a water raster (1=water, null=everything else)
replace the 1s in the water raster with the altitude above sea level
perform "neighborhood" (moving window) analysis.  Calculate the average altitude of water for a 100 meter radius for every cell in my region (ignoring nulls)
repeat the above with 100m, 200m, 300m, ..., 2000m.  One raster for each distance.
using r.grow.distance calculate the distance between each cell and it's nearest water
then, using map algebra, I look at the distance to nearest water for each cell and its own altitude and subtract the average altitude of water for the appropriately distanced raster.

The problems with my method:

It is very computationally demanding.  I am working at a 10m resolution and I need to perform this modelling on around 60 million cells.  I've been creating rasters on a fast desktop for days and days and I'm not even close to finished.
At small radii, the calculation seems reasonable.  If the distance to nearest water is 75 meters and I use a 100 m average altitude to water, the approximation is pretty good.  But if the distance to nearest water is 1875 meters and I use the 1900 meter raster I will be averaging in the altitude to water of many cells far removed from the nearest water to my cell.  The results are dissatisfying.  I considered using some kind of smoothing process for the final raster but I wonder if there is a completely different approach that I am not seeing.

I've been reading about predictive modeling projects where vertical distance to nearest water is a one of the inputs to the model so I know it can be done but I'm just not sure how.

I'd appreciate any help I can get with this problem.  Thanks.


texts: Converting map to KML/KMZ format and opening it on Google Earth?

texts: How can I convert this map to KML/KMZ format and open it on Google Earth?


texts: Use QGIS general tools/actions in my plugin

texts:
I am creating a QGIS plugin that will use some general tools available in QGIS like "identify features" and a plugin like a "digitizing tool". Is it possible for example to link a button of my plugin to identify features tool, so when the user click on the button, will call the identify features tool?

I am using QGIS  3.4


texts:
I am using the spatial join tool.

Is there a spatial join tool that I can specify a certain radius and only join the features in that radius?

Perhaps I would have to crop the data to my radius then use spatial join.

Create a model, unless there is a tool that does this?


texts: Arc Map 10.2.2 crashes with execution of buffer/Arc tool box

texts: I have been trying to get simple buffer zone around a polygon shape with 50m distance but after entering data ArcMap 10.2.2 suddenly crashes without any warning.Tried repairing and reinstalling software, but nothing seems work. Not only the buffer, I guess My Arc toolbox is not working, because I tried to use near, multiple buffer ring too and nothing works.


texts: Create Spatial Index in PostGIS on an entire Schema

texts:
I have loaded a number of shapefiles using SPIT (QGIS plugin) to my PostGIS database.  These layers did not have a Spatial Index created upon loading.  I am wondering if there is a way to create a Spatial Index for each layer in the schema without writing a query for each layer.  I am not a good PostGIS script writer, so any help would be greatly appreciated.

Thanks


texts: Clip OL TileLayer by Vector AND stop it from fetching the tiles

texts:
I'm trying to clip a layer by vector in OpenLayers 5. I've found this answer that kind of works, but it does not solve my specific problem, namely bandwidth.

I'm combining WMTS services from two different countries, and would like to block one service from serving tiles over the other country's area, since that just wastes bandwidth. The countries are Norway and Sweden, so simple bounds won't help me (the border goes on the diagonal of any bounding box).


texts: QGIS - Eliminate sliver polygons in standalone Python code

texts:
I am trying to remove sliver polygons under a certain area.  I need to do this in a stand alone Python script, and not from within the GUI.

Is this possible?  In standalone python I was trying a piece of code base on
processing.run("qgis:eliminateselectedpolygons",\

but that is not available from an external script.  Eliminate works great if I'm in the GUI.


texts: Determining distances of points from closest line using MapInfo?

texts:
I have a set of points and a set of lines. I'd like to know distances of the points from the closest line... answering the question "how many points are within 500m to 1000m of one of the lines, how many between 1000m to 2000m, etc."

Distances can be approximate if necessary (i.e. between 500m and 1km as a category) but if it's possible to do something more refined that would be great.

Data is currently in Mapinfo TAB files.

I seek a Mapinfo solution, if possible.

I have a working but very inefficient system just now which looks like this ...
buffer the lines information, creating several files/tables, one for a buffer 500m from line (call this "buffer500m"), one for 1km (buffer1000m), one for 2km etc, then do simple repeated MapInfo SQL queries. With these I select all points within the wider buffer, save this (call this "pointswithin1000m" etc), then from these results again using an SQL select query select those in the narrower buffer and delete these... the result being a file/table with only those points in the wider buffer but not in the narrower one. This has to be repeated for each distance (i.e. once for 500m to 1km, once for 1km to 2km, and so on.

I tried a more sophisticated SQL select to give me those points within the wider buffer but not within the narrower buffer but either this wasn't possible or I didn't get the syntax right.


texts: Multilinestring to shapefile using QGIS?


texts: Publish Arcgis Server with another local machine/computer

texts: I use ArcGIS server and desktop to develop web-based GIS in the city of Balikpapan, Indonesia. I found the error when using a PostgreSQL database registers. Domain server that I use is http://simtaru.bappeda.balikpapan.go.id. when I publish a service from another computer, why the error? is there any advice and input?


texts: How do I calculate kernel density using cases and controls in QGIS?

texts:
I have a dataset with approx 1250 geolocated points - approx 150 are cases of a disease and the rest are controls. My area of interest is around 20km by 20km with wide variation in population density. I would like to display prevalance (cases/(cases+controls)) as either a kernel density layer or using contours. I would like to use a 3km Gaussian kernel.

Are there plug-ins that can do this?

I couldn't see how to do this in Heatmap.


texts: Alternative ST_NumGeometries in type geography

texts:
In PostGIS (2.1.8) I use function ST_NumGeometries for nums of count geometry. This function have one argument 'geometry' type.
I need this function for geography type. I looked for but I didn't find it.