texts: I have a table that contains a field with street names. Each street name ends with the street type.  Fore example, Washington St, Happy Valley Rd, Redstone Dr.  I need to extract the last part of the street name and have it populate a field called Street Type.  I been trying to use the AttributeSplitter transformer but it only splits strings according to a delimiter (in this case it's a space), but this does not work.  Any suggestion on using a different transformer or combination of transformers? Solutions need to be in FME as this task is part of a greater workflow.


texts: How to specify "system:time_start" in time series charts in Google Earth Engine

texts:
I want to plot mean NDVI throughout the period of interest.

I have a polygon file loaded in Asset called boundary.

var start = ee.Date('2017-05-01'); //Dates of interest
var finish = ee.Date('2018-10-31');
var sentinel = ee.ImageCollection('COPERNICUS/S2')
 .filterBounds(boundary)
 .filterDate(start, finish)
 .filter(ee.Filter.lte('CLOUDY_PIXEL_PERCENTAGE', 5));

var NDVI = sentinel.map(
    function(img) {
         return img.normalizedDifference(['B8','B4'])
                  .rename('NDVI');
    });

print(NDVI);
print(ui.Chart.image.series(NDVI, boundary, ee.Reducer.mean(), 10));

But it turns out Error generating chart: No features contain non-null values of "system:time_start". How do I specify "system:time_start" argument?


texts:
Join attributes by location and filter via Python

I want to do a spatial join between 2 shapes. Then I want to work on the new join table, I want to make a filter if the field of "ID pa" has the same value so the field of "ref_chambre" must neither be "OHN" and must not contain the value 1 and 2. I did a test on the join and here is the script.

from qgis.core import *

from qgis.utils import *

import os, sys

import processing

NAN_CHAMBRE = "C:\Users\melouaer\ing\jointure/NAN_CHAMBRE.shp"

ZONE_PA = "C:\Users\melouaer\ing\jointure/ZONE_PA.shp"

result = "C:\Users\melouaer\ing\jointure/result.shp"

general.runalg("qgis:joinattributesbylocation", NAN_CHAMBRE , ZONE_PA u'intersects', 0, 0, '', 1, result)


texts: Merge attribute data using spatial query in QGIS

texts:
I have two vector layers that I wish to correlate attributes - a shapefile containing boundary polygons and a shapefile containing point locations.

I'm using the vector>spatial query tool to generate a new layer consisting of only boundaries that contain the specified points.

This works as I expect but I am looking for a solution that will provide me with an attribute table of point names with a corresponding column listing the boundary regions they fall within.

Any help would be appreciated.


texts: Find maximum and minimum value of points within a polygon buffer?

texts:
I have a series of 500m buffer zones along a polyline. I also have a series of points following the line, each point represents a 10m x 10m cell. I calculated the values of a field in each point known as "F18".

I want to find the average, maximum and minimum values in F18 for all points within each buffer zone and add fields to the attribute table of the buffer for each.

ArcGIS 10.1, arcinfo license.


texts: Problems with dissolving layers [QGiS 3.4.1]

texts:
I am currently working on a set of data that defines restricted areas for use of photovoltaic modules.

This set of data amounts to 270.00 polygons in total [with their own geometry].

For simpler application in the future, I now want to dissolve the Layer to have just one polygon instead of almost 300.000. After running the dissolve function for an incredible 28h, it finally created an output layer. However, this layer can not be shown visually in QGIS, or used for further processes (even though it shows a data set of one polygon within the attribute table).

I already ran a geometry check on the layer which stated that the geometry of the input layer [undissolved layer] is flawed. I then buffered the layer by 0, and tried the geometry repairing extension to QGIS. Both could not solve the problem, and took tremendous time to do.

I also tried to cut the big layer in data sets of 20.000 and dissolve these layers, before putting them together in a layer again before dissolving this layer. This however, also didn't work and cost me a total of 2 weeks working on it.

Now I am wondering why the undissolved layer can be displayed by the program without any problem, but no algorithm [like dissolving] can be run on the layer.

Note that any of the algorithms can be run for the individual polygons within the layer, if run on one single polygon at a time [tested for 500 individual polygons out of the 270.000 total polygons]

How can I  either repair the multipolygon player without swallowing all my computing power for another week, or effectively find the flawed polygons within the layer to repair them individually?

Is there an approach to simplify a layer that big without taking literal days?.


texts: "Make NetCDF Table View" for multiple locations in ArcMap

texts:
I have a NetCDF dataset, and I want to extract the values for several locations. I use the "Make NetCDF Table View" tool. As you know, there is "Dimension Values" at the bottom of this tool. We give the latitude and the longitude of a specific location, and the tool creates a beautiful table for this specific location.
However, I have an excel file that contains latitude and longitude variables for several locations.
Instead of doing one by one with the"Make NetCDF Table View" tool, how could I extract the variables for several locations in ArcMap and save them as csv or similar format?
There is also a time dimension in the dataset. I put this time dimension in the "Row Dimension" option of the "Make NetCDF Table View" tool.


texts: Using multiple Boolean variables in R script within QGIS

texts:
I am testing the capabilities to run my R script in QGIS. I am facing a basic question.

I am defining a dropdown menu with all the parameters for a specific variable:

##test1=group
##Sensor?=selection S1;S2;S1 AND S2

Then I use this basic code to test if I can use the selection of the user within an if statement

if (S1){
print("It is working")
}

My script is not working and is reporting the following error. Any idea how this type of variables can be used in a if statement. Shoud I use a reguluar boolean variable. If so, how should it be implemented?

Sensor?=0
Error: unexpected '=' in "Sensor?="
Execution halted
Converting outputs
Loading resulting layers
Algorithm [Unnamed algorithm] finished


texts: I have a park polygons layer and a set of points which I gave a 1000m buffer. For each of them I had calculated the area size with calculate geometry. So with which tool could I calculate the size of park within each buffer? I had tried intersect; it gives the results of the size of many parts of polygon under the buffer, I need to calculate the area size by myself. If I have 20 buffers could I get the sum of the polygons' size directly? I am using ArcGIS.


texts:
I would like to split a line to segments using PostGIS. For this I found the following SQL String:

SELECT ST_AsText(ST_MakeLine(start_point,end_point)) as geom FROM
(
    SELECT
        ST_Pointn(geom, generate_series(1, ST_NumPoints(geom)-1)) as start_point,
        ST_Pointn(geom, generate_series(2, ST_NumPoints(geom))) as end_point
    FROM (
        SELECT ST_Segmentize(ST_GeomFromText('LINESTRING(0 0,0 50)'),5) as geom
        ) as line
) as tmp;

This gives me a correct result with 10 rows from 1 geometry. If I will change the linestring in the follow String  I will only get one row.

SELECT ST_AsText(ST_MakeLine(start_point,end_point)) as geom FROM
(
    SELECT
        ST_Pointn(geom, generate_series(1, ST_NumPoints(geom)-1)) as start_point,
        ST_Pointn(geom, generate_series(2, ST_NumPoints(geom))) as end_point
    FROM (
        SELECT ST_Segmentize(ST_GeomFromText(
        'LINESTRING(8.53011977325458 47.4525557235204,8.53683231588295 47.4527692267847)'
        ),5) as geom
        ) as line
) as tmp;

Why doesn't the query not giving multiple rows? Please can you help me in this case. For the line in the second example I should have a splitting of the line in segments.


texts:
I was looking in Google Earth and saw lots of feeds/KMZ for historical and current Hurricanes.

I am after some Meteorological WMS feeds into data that is related to past and present hurricanes and topical storms [like Irene (2011)] so that I can create a mashup, most likely in one of the ESRI APIs.

Meteorological data in particular, but anything else you think would be relevant.


texts: What GIS software is used by web maps sites (Google, Bing Maps, etc)?

texts:
We all have seen beatiful (imo) maps produced by Google and Microsoft. There are many others; some of them are of global use (such as MapQuest, TomTom or HERE), and some are just of country scale.

I assume that these companies have obtained/collected/bought raw vector data and then have used a GIS software package and some custom cartography workflows to produce maps with good symbology/layout and then cached them into multiple tiles.

Rasterizing vectors into tiles is not that particularly interesting, but I was often wondering what kind of Desktop GIS software have those large companies used to make those maps? Esri, for instance, uses ArcGIS platform for making the Esri basemaps such as Esri World Street Map.

What desktop GIS software do Google and Microsoft use for creating maps? I am curious about that because I want to know what other GIS packages apart from Esri ArcGIS are capable of doing this work on such a large scale.


texts: Connecting dots with lines, thickness depended on attribute value

texts:
I am having a point data of in total of 13 destinations within a region. The goal is to present how many people who were in destination "A" also visited the other 12 destinations.

I have this data calculated both in relative and absolute figures. Now, I want to show it on the map.

The data represents relations for a destination X, "Dub". Where Dub and Dub cross, there is an absolute number of visits for that one destination. The other crossings, eg. Dub-Zad, is a percentage of people that, out of those 316 people, also visited Zad (14% or ca. 51).
This is all within one region. Now, I want to map this so the line between Zad-Dub is eg. 1.4, Dub-Spl 3.4, Dub-Mak 0.3 and so on. I have, naturally, the coordinates for all of the destinations.

I hope I am more clear now. So, as I said, I have coordinates of those destinations but I don't know how should then the data look and how to use the data to connect the dots the way I want to.


texts:
I am trying to calculate EVI for a Sentinel 2 Level 2A image collection. I have applied the Sentinel cloud mask provided by GEE but am not sure I am applying EVI correctly because my range is not between -1 and 1 and when I try to visualize it is a single color.
This is what I see when I inspect the bands using the Console.
"EVI", double, EPSG:32616, 10980x10980 px
My question is if I am already dividing by the scale factor (10000) in the cloud mask do I still need to divide each band by 10000 in my EVI equation? Any insight into why the EVI I'm producing is not usable?
//Area of interest
  var roi = /* color: #d63000 */ee.Geometry.Polygon(
        [[[-89.88191416015627, 14.139636998051515],
          [-90.32686044921877, 13.737115730837438],
          [-89.87916757812502, 13.526248029454758],
          [-89.60176279296877, 13.982444096452182]]]);
/**
 * Function to mask clouds using the Sentinel-2 QA band
 * @param {ee.Image} image Sentinel-2 image
 * @return {ee.Image} cloud masked Sentinel-2 image
 */
function maskS2clouds(image) {
  var qa = image.select('QA60');

  // Bits 10 and 11 are clouds and cirrus, respectively.
  var cloudBitMask = 1 << 10;
  var cirrusBitMask = 1 << 11;
  // Both flags should be set to zero, indicating clear conditions.
  var mask = qa.bitwiseAnd(cloudBitMask).eq(0)
      .and(qa.bitwiseAnd(cirrusBitMask).eq(0));

  return image.updateMask(mask).divide(10000);
}

// Add EVI using an expression.
var addEVI=function(image){
var EVI = image.expression(
      '2.5 * ((NIR - RED) / (NIR + 6 * RED - 7.5 * BLUE + 1))', {
      'NIR' : image.select('B8').divide(10000),
      'RED' : image.select('B4').divide(10000),
      'BLUE': image.select('B2').divide(10000)}).rename('EVI');
      return image.addBands(EVI);
};

var Nov19= ee.ImageCollection('COPERNICUS/S2_SR')
            .filterBounds(roi)
                  .filterDate('2019-11-01', '2019-11-30')
                  // Pre-filter to get less cloudy granules.
                  .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE',10))
                  .map(addEVI)
                  .map(maskS2clouds);

print(Nov19);

Map.addLayer(Nov19.select('EVI').median().clip(roi), {min:-1,max:1,palette:['red', 'green']}, 'EVI Nov19');


texts:
I am trying to split a field which contains, e.g., 2-10 and get the 2. The print statement produces the value 2 which is what I expect. I am getting a TypeError:

TypeError: 'Row' object does not support item assignment

Where am I going wrong; it appears as though I am following documentation and other answers on stack exchange.

ArcGIS 10.3.1, Python 2.7

cursor = arcpy.UpdateCursor(feature, ['CUT_YEAR1'])
for row in cursor:
    print str(int(round(int((((row.getValue("cut_period")).replace(" ", "")).split('-'))[0]))))
    row[0] = str(int(round(int((((row.getValue("cut_period")).replace(" ", "")).split('-'))[0]))))
    cursor.updateRow(row)


texts: When projecting data the distance between different coordinate locations overestimated or underestimated?

texts: I was wondering as we project data is the distance between different coordinate locations always going to be underestimated on a flat map surface with respect to the distance between locations on the ellipsoid or overestimated? Also, could it be constant with the map surface?


texts: Overpass query grouping results by tag value

texts:
I'd like to ask overpass turbo how many objects have the same property in a given area.
For instance, what is the distribution of the building tag? could return:

// for a total of 3005 buildings for instance
yes: 3000
church: 3
school: 2

It would help me find where buildings have not been updated for a while, based on the source tag attribute.


texts:
I want put OpenLayers controls outside a map but dont know how.  I find this example http://openlayers.org/dev/examples/editingtoolbar-outside.html but its not what i want.  I have a button and want to edit my WFS layer by click this button. So i need in

OpenLayers.Control.ModifyFeature(wfs, {
    title: "Modify Feature",
    displayClass: "olControlModifyFeature"
});

So how to put this in button? And i use a geoext.


texts: Delete a feature data set in SDE 10 programmatically

texts:
Is there a way to delete a feature data set and all of its feature classes programmatically either by using custom code or pre-existing command line tools?

There is a tool provided by SDE called sdetable.exe but i'm not sure if this will do the trick.

My feature data sets are setup in ArcSDE via scripts which call a custom executable that imports XML workspaces. I'd like a way to delete the feature data sets that the XML workspaces import because when I re-run the scripts I get things like this:

Underlying DBMS error [ORA-00972: identifier is too long

(VITD.Surface_Drainage_Channel_Area_1)]

The '_1' is appended because there is already a feature class named Surface_Drainage_Channel_Area. So I'd like to have my scripts first drop the VITD feature data set and all of its feature classes before importing my XML workspace XML document that creates it.


texts: LAStools in QGIS 2.8.5: "missing dependency. lastools folder is not configured"

texts:
I am using QGIS 2.8.5 Wien and I am trying to install LAStools toolbox. I followed the instructions in rapidlasso.com to install it.

I did everything said on the link, but when I tried to run it, it said:

  missing dependency. this algorithm cannot be run :-( lastools folder is not configured. please configure it before running lastools algorithms.


texts: ArcGIS query - how can I find the average value (water consumption) from set of polygons?

texts:
I am fairly new to arcgis, so this is probably a really simple task, but I would like to ask advice so I can learn how to do it. :)

Basically,

I have a polygon layer that has attributes for each house within a set of neighborhoods each house has the attribute of which neighborhood that it belongs to as well as its water consumption.

My problem is this, I want to be able to find the average water consumption for each neighborhood by averaging the water consumption of each house within that neighborhood, and then be able to show average water consumption for each neighborhood on a choropleth map.

Could anyone give me advice on what is the best way to go about solving this problem?


texts:
I have been getting this error when trying to create kernel density maps using QGIS 2.0.1 and SAGA 2.1.0. It seems to occur only when the extent is large, i.e. the entire state of Texas. If I do it on a smaller region, it works well. This occurs with any combination of settings. I also get the same error any time if I try to do any sort of Kriging, regardless of parameter settings. I have attached the error message I got and the settings I used this go-round. The log file is at the bottom.

Any ideas? I am sure others are experiencing this issue as well. I am on Ubuntu 13.04.

Log File
Algorithm Kernel density estimation started
grid_gridding "Kernel Density Estimation" -POINTS "/home/ross/GIS/Ham Radio/NewShapes/txhams.shp" -POPULATION "wgt" -RADIUS 5280 -KERNEL 0 -TARGET 0 -USER_XMIN 343308.727344 -USER_XMAX 4398326.38181 -USER_YMIN 8477265.06341 -USER_YMAX 12335473.6077 -USER_SIZE 100 -USER_GRID "/tmp/processing/USER_GRID.tif.sgrd"
io_gdal 1 -GRIDS "/tmp/processing/USER_GRID.tif.sgrd" -FORMAT 4 -TYPE 0 -FILE "/tmp/processing/52ac69fe3bfe4f939401e6b9a226a791/USER_GRID.tif"
Error: grid: memory allocation failed [1872.40mb]
Error: executing module [Kernel Density Estimation]

## #####

### ##

# ## ## #### #

##### ## #

# ## ##### #

library path: /usr/lib/saga/libgrid_gridding.so
library name: Grid - Gridding
module name : Kernel Density Estimation
author : O.Conrad (c) 2010

Load shapes: /home/ross/GIS/Ham Radio/NewShapes/txhams.shp...

Parameters

Points: txhams
Population: wgt
Radius: 5280.000000
Kernel: quartic kernel
Target Grid: user defined

Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion `map->l_init_called' failed!
Error: Grid file could not be opened.
Error: executing module [GDAL: Export Raster]

## #####

### ##

# ## ## #### #

##### ## #

# ## ##### #

library path: /usr/lib/saga/libio_gdal.so
library name: Import/Export - GDAL/OGR
module name : GDAL: Export Raster
author : O.Conrad (c) 2007

Load grid: /tmp/processing/USER_GRID.tif.sgrd...
failed
GDAL: Export Raster: could not initialize data objects
Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion `map->l_init_called' failed!
Converting outputs
Loading resulting layers
Algorithm Kernel density estimation finished


texts: Missing function ST_Extent in PostGIS db

texts:
I hope you can help as I am tearing my hair out here. Do any of you elite geo peeps have any idea why some specific functions could be missing from my PostGIS install?

I am trying to use Mapnik with PostGIS but when I try to run queries from Python it fails with an error of:

ERROR:  function st_extent(geography) does not exist at character 73
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
STATEMENT:  SELECT ST_XMin(ext),ST_YMin(ext),ST_XMax(ext),ST_YMax(ext) FROM (SELECT ST_Extent(geom) as ext from reseller_map_core_reseller) as tmp

This is the part of the mapnik code:

shapes = mapnik.Layer('Geometry from PostGIS')
shapes.datasource = mapnik.PostGIS(host='localhost', user='user', password='password', dbname='sales_map', table='sales_map_core_sales', geometry_field='geom', srid='4326')
shapes.styles.append('My Style')
m.layers.append(shapes)

I'm just trying to overlay all of the regions from the selected table onto my mapnik generated image.

I have installed PostGIS successfully, created a spatial db using extensions and my other GeoDjango/PostGIS seems to work so far.

I have looked in the db using pgAdmin and I can see that the st_extents() is missing from the list for some reason even though the others seem to be there.

Any ideas why this specific function (and possibly others) could be missing when I have installed everything?

I am using:

PostGIS: 2.0.3
Postgresql: 9.2.3
Mapnik 2.10

Thanks for your help!


texts: Removing a 'non-gap' gap from a polygon that straddles +/- 180 longitude; looking for an R-based, code solution

texts:
I am working with a set of polygons from here: http://lme.edc.uri.edu/index.php/digital-data.  In the artic, there are several polygons that straddle the +/- 180 longitude line.

These are single polygons (only one entry in attribute table), yet they have overlapping edges along this boundary.  (i.e., if I look at a 1:1 scale, there is no gap; I assume there are repeated vertices).  These internal gaps in the polygons are causing some issues with reprojection (e.g., to Mollweide, where the polygons wrap across the globe) and area calculations, and I don't think moving the center of the map around will help.

I may have missed a good solution, but most people are solving slightly different: a) overlapping different polygons that they need to snap together, or b) a 'true' gap/slice out of a polygon that they want to mend.

My goal is the following:
1) identify polygons that have this kind of internal 'non-gap'
2) remove the 'non-gaps' from the polygons, creating a single set of non-overlapping vertices

I would like to know if there is a way to achieve this in R.  I have enough facility with R to import of shapefiles, change projections, and make area calculations, but I have cobbled this together from R documentation and stackexchange.  I do not need you to write the code out for me (though I would not object), but I am hoping you can point to a plausible approach, perhaps with some psuedocode or at least identification of useful tools/packages.


texts: Fastest way to add shapely geometries to a PostGis database using geoalchemy2

texts:
I am looking for the absolute fastest approach to adding +10,000 shapely geometry objects to a  PostGIS database using geoalchemy2.

I'm having no speed issues when uploading to a localhost postgres server, but when I upload directly to my remote server it takes 35x as long!

I realize this might be a server question and not appropriate for this site, but curious if anyone has a successful workflow for:

Quickly uploading shapely geometries to a PostGIS database using geoalchemy2


texts: GIS Analysis Services for third party DBMS

texts:
In our database environment (gemstoneDB - smalltalk) we would like use some of the core features of GIS Tools like intersecting shapes, find nearest polygons, create buffer around lines and points etc.

We started to implement some of those features by writing the algos on our own. As it goes down well for our users, we would like to offer more and more GIS features in the future.

Can you recommend any best practice on how to implement a third party GIS tool, which can serve this features? Workflow would be sending geojson to the service and getting back whatever requested (in geojson). So it is not only about viewing the data on tile layers but really getting the data as vector data so that we can rejoin it in the database.

EDIT

sorry for not beeing more clearly. I added tags for qgis and arcgis because the company I work for is open for commercial as well as open source techs. I recently found turf.js and we will give it a shot on nodejs. maybe there is something similar like turf - but this looks very promising at the moment.


texts: How to create a Processing script using the shortest path algorithm?

texts:
I'm currently using the Road Graph plugin to find the shortest path in a road network - however, I'd like to put this to a processing script (to be used in a model later) and the Road Graph Plugin has no API to be used in a model.

Is there a way to put the shortest path algorithm to a processing script and then use this script in a model?

I found some python scripts for networks/shortest path in the Python Cookbook and tried to put it to a processing script - but as I am a complete newbie with python I didn't get far..

The script should:

Take a roadnetwork (blue) and and a line vector layer (violet) as
input
Put the start (green) - and endpoint (red) of the line as start and
end of the path to be claculated
Use the intersections of the input line and the network as waypoints, that the path should follow
Find the shortest path (red ribbon) by routing through the network and save the path as vector layer

Can anybody help me with this script?


texts: Remove layers using python- path orientation

texts:
Expanding on my previous question Code error - remove layer using python, i try to remove layers from mxd's (in ArcMap 10.3, python 2.7.8), that don't appear in the data frame with this code:

import arcpy,os
from arcpy import env

env.workspace = r"D:\desktop\Project"
for mxdname in arcpy.ListFiles('*.mxd'):
    print mxdname
    mxd = arcpy.mapping.MapDocument(os.path.join(env.workspace, mxdname))
    df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
    for lyr in arcpy.mapping.ListLayers(mxd, "" ,df):
        if lyr.getExtent() != None:
            if df.extent.disjoint(lyr.getExtent()):
                arcpy.mapping.RemoveLayer(df, lyr)
                print 'removed '+str(lyr)
    mxd.save()
del mxd

but i get an error:

>>>
project1.mxd
removed point

Traceback (most recent call last):
  File "C:\Program Files\CCleaner\yaron\shonot\software\---gis---  \tools\YARON_SCRIPTS\remove lyr that are not in df 2.py", line 19, in <module>
    print 'removed '+str(lyr) # this is optional(earase the # sign): ,'from '+str(mxdname)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-5: ordinal not in range(128)
>>>

I think this error derives from the fact that one layer has different path orientation (right to left- different language from English), If i use layers with regular path orientation(English only) the code works just fine.


texts: Creating rectangles on centroid points in ArcPy?

texts:
I would like to create rectangles that placed on given centroid points.

There are hundreds of points.
Certain rectangle shape(not a square) file is given.
Create rectangles that place the centroid of it on the hundreds of points each.

I've tried to copy and paste manually but I need an automated process.

Any idea?


texts: How to label each gridsquare in MGRS grid individually using ArcGIS for Desktop?

texts:
I want to be able to generate an MGRS grid of arbitrary resolution (say, 1km or 100m) and have each grid square individually labeled with its full MGRS coordinate.

This was easy enough to do with the 1km MGRS grid shapefiles available from NGA.mil, but I'm not sure how to do it in ArcMap itself. The MGRS data frame grids don't seem flexible enough, as they apparently only support axis or ladder labeling.

I tried the Make Grids and Graticules toolbox with a custom XML from the Production Mapping extension but it didn't seem capable of doing it either. I can make a grid of Points at the desired resolution, but any Annotation I add under them is only capable of labeling north-south or east-west (so the same easting or northing will be repeated everywhere), so it seems this is only intended for ladder labeling.


texts: Predicting the location where new health centres should be built using R,Machine Learning

texts:
I have the geolocation of health centres in Ireland mapped in Tableau and I am looking to try to implement a machine learning aspect to this project where new health centre locations are predicted in order to show where new health centres should be placed in the future in order to provide better health services in the country(in rural areas etc.).

I have population data and the boundaries for this project would be counties, each county can have multiple HC's.

I am unsure how to go about this and I am looking for advice as Im new to machine learning. For example what Prediction Algorithm would best suit this task. Im also using RStudio to do this project.

Here is an image of the current health centres:


texts: Creating raster or vector raster from DEM point file?

texts:
i have a point shape of 75.000 elevation points in a regular 5 m grid.
We now want to create a polygon grid with the elevation points as "centroids".

Unfortunately, all attempts to do so fail:
I first thought to create a raster from the point grid, and then vectorize the raster to get my polygon grid.
Bu when i create a raster image from the points, the cells are created with the points representing the corners of this cell.

So, how to create a raster image or polygon grid from regular points, where those points represent the centroid ?


texts: Which Network Analyst tool(s) or other geoprocessing tool(s) would be useful for this analysis?

texts:
I have been doing GIS for a few years now but never Network Analyst so I thought I would give this a go. I've built a multimodal network.

Question I want to solve: Using street center lines (walking) and bus routes, how far are these parcel polygons from the end destination? I want to know which parcels are well connected to the destination and which parcels are not well connected.

This analysis doesn't use walking/bus speeds/wait times, I want to keep it as simple as possible to start.

In my multimodal network, I have:

Street centerlines
Bus routes
Bus stops (transfer points between street and bus route)
Parcel centroids (start point)
Separate point feature class for destination
I was thinking, is this a Closest Facility question? I would run the tool to start at my destination then find the closest facilities (the parcels)?

Another idea I had was Make Location Allocation Analysis Layer but I'm not sure about that.

I have run both of these tools but the output layers were blank. I'm not sure what I am doing incorrectly, I thought at least something would show up.


texts: GDAL C++ code for JPEG2000 compressed NITF

texts: I need to convert JPEG2000 compressed multi-image NITF files to GeoTIFF or TIFF in C++ through GDAL. I am trying it with NITFDataset but unable to do so. If someone has any sample code, please post.


texts: OpenLayers: Possible to show zoom level?

texts:
Been researching this for a while and nothing has come to fruition. Best I could find was:

OpenLayers.Control.ZoomStatus = OpenLayers.Class(OpenLayers.Control, {
  autoActivate: true,
  element: null
});

But 'ZoomStatus' isn't even mentioned in the documentation (maybe it is but can't seem to find it). Found it at this link: http://trac.osgeo.org/openlayers/attachment/ticket/3629/OpenLayers.Control.ZoomStatus.js

Can anyone offer some insight as to how to display the zoom level/status in the browser?


texts: QGIS 2.16 grass 7 missing dependencies Windows 7 64

texts:
So I just installed QGIS 2.16, and when trying to run grass commands specifically r.watershed, i get the following error, Missing dependency.

which seemed to be similar to this issue QGIS 2.14 standalone GRASS provider missing Msys folder, can't execute tools so I tried out the solution 'aQGISuser' suggested and downloaded the msys base package, changed the path settings in QGIS but I still get the following error. Wrong value for parameter "R folder" Can anyone help?


texts:
I have created several custom SVG symbols in Inkscape to use in QGIS. I have several that have fill patterns, but these patterns are not displaying in QGIS. I also am having this problem with symbols in which I have inserted text. I have attached screenshots, with an example of just one of these symbols.

The symbol as it was created in Inkscape http://imgur.com/yCUJOaW

The symbol as it displays in QGIS http://imgur.com/JtuRGK7

I am of course willing to upload files to be examined, but I am not certain of the best way to do so.

I am moderately familiar with QGIS, but I am brand new to Inkscape.


texts: Importing raster data automatically to GeoServer

texts:
I'mtrying to make an automatic raster data import to GeoServer for later use in an OpenLayers web application in which i need to add raster files frequently, so I added Image Mosaic JDBC Plugin and configured it following this tutorial,
but I end up with this error :

java -jar C:/"Program Files (x86)"/"GeoServer 2.15.0"/webapps/geoserver/WEB-INF/lib/gt-imagemosaic-jdbc-21.2.jar ddl -config /  C:/"Program Files (x86)"/"GeoServer 2.15.0"/data_dir/coverages/osm.postgis.xml -spatialTNPrefix ne_raster -pyramids 6 -statementDelim ";" -srs 4326 -targetDir ne_raster_sqlscripts
[Fatal Error] :1:1: Content is not allowed in prolog.
Aug 18, 2019 9:23:58 PM org.geotools.gce.imagemosaic.jdbc.DDLGenerator start
INFO:
org.xml.sax.SAXParseException; systemId: file:/C:/; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
        at java.xml/com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
        at java.xml/com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
        at org.geotools.gce.imagemosaic.jdbc.Config.readFrom(Config.java:140)
        at org.geotools.gce.imagemosaic.jdbc.DDLGenerator.start(DDLGenerator.java:113)
        at org.geotools.gce.imagemosaic.jdbc.Toolbox.main(Toolbox.java:47)

I also tried to follow this tuto
using GeoServer 2.15 and PGRaster 2.15 but still getting errors when save

Could not list layers for this store, an error occurred retrieving them:
Failed to create reader from file:data/trees.pgraster.xml and hints
Hints:
EXECUTOR_SERVICE = java.util.concurrent.ThreadPoolExecutor@a39986[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
REPOSITORY = org.geoserver.catalog.CatalogRepository@1a376a4 System
defaults: FEATURE_FACTORY = org.geotools.feature.LenientFeatureFactoryImpl@17186db
FORCE_AXIS_ORDER_HONORING = http GRID_COVERAGE_FACTORY = GridCoverageFactory
TILE_ENCODING = null
LENIENT_DATUM_SHIFT = true
STYLE_FACTORY = StyleFactoryImpl
FORCE_LONGITUDE_FIRST_AXIS_ORDER = true
COMPARISON_TOLERANCE = 1.0E-8
FILTER_FACTORY = FilterFactoryImpl

I don't know if there's something I missed or those plugins are just buggy.

trees.pgraster.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE ImageMosaicJDBCConfig [
      <!ENTITY mapping PUBLIC "mapping"  "mapping.pgraster.xml.inc">
      <!ENTITY connect PUBLIC "connect"  "connect.pgraster.xml.inc">
]>
<config version="1.0">
      <coverageName name="oek"/>
      <coordsys name="EPSG:3763"/> tried 4326 also
      <scaleop  interpolation="1"/>
      <axisOrder ignore="false"/>
      &mapping;
      &connect;
</config>

connect.pgraster.xml.inc

<connect>
  <!-- value DBCP or JNDI -->
  <dstype value="DBCP"/>
  <!--   <jndiReferenceName value=""/>  -->
  <username value="postgres" />
  <password value="geoinfo" />
  <jdbcUrl value="jdbc:postgresql://localhost:5432/ArbresZones" />
  <driverClassName value="org.postgresql.Driver"/>
  <maxActive value="500"/>
  <maxIdle value="0"/>
</connect>

mapping.pgraster.xml.inc

<spatialExtension name="pgraster"/>
 <mapping>
      <masterTable name="mosaic" >
              <coverageNameAttribute name="name"/>
              <maxXAttribute name="maxX"/>
              <maxYAttribute name="maxY"/>
              <minXAttribute name="minX"/>
              <minYAttribute name="minY"/>
              <resXAttribute name="resX"/>
              <resYAttribute name="resY"/>
              <tileTableNameAtribute name="tiletable" />
      </masterTable>
      <tileTable>
              <blobAttributeName name="rast" />
      </tileTable>
</mapping>


texts: Writing multiple file geodatabase tables into csv file with arcpy

texts:
I was asking a question about Merging geodatabase previously, (link: Merge from arcpy.ListTables() producing duplicate rows?) and although the script worked, it took more than 9 hours to run when merging >3000 tables with 1 rows in each table. I was wondering whether instead of merging the tables it would be faster to write the contents of each geodatabase table into a csv file and keep appending tables to it. If so, how to do it?? I now need to merge tables of different geodatabase (it has 39 fields and varying number of rows) and I have a feeling that if I use the script from my previous question it will take even longer than 9 hours.

Basically, how to iterate through 3000 tables and write the attribute tables of each to the same csv and keep appending to it?

Here's the screenshot of the geodatabase tables I talked about above:


texts: Arcgis Javascript API for query tasks on tiled map service

texts:
I'm using ArcGIS Javascript API 3.17 to view my point data from ArcGIS server 10.3. Initially I have published the point data as dynamic map service but it is taking too long time to render the data over web as my feature class has around 80,000 point features. So I've changed dynamic map service to tiled map service and generated the cache. Now it is rendering too fast from cached tiles. Now the issue is that I have to perform Query task on my data.

Is it required to add dynamic map service also under tiled service in the map to perform the query tasks?


texts: Eye-friendly colours for long periods of work

texts:
Apologies if this question doesn't fit the rules here.

I am digitising a large amount of remote footways and I will be panning, zooming a lot and I've done 2 days on this so far and always get quite a bad headache. Is it the colours I'm using?

I have a pre-existing footway/road layer that I am adding features to. A polygon of footway which I am creating new features over, a buffer around this footway and a plain polygon layer that I use to cover areas I have completed.

Can somebody recommend some alternative colours to use to minimise eye strain and headaches?


texts: Accessing the feature layers inside a geodatabase using ArcPy

texts:
In an Python Toolbox I have a parameter that gets the location of a geodatabase input.gdb which has several layers of input data.

contextual_data_param = arcpy.Parameter(
    name="context",
    displayName="source for contextual data files",
    datatype="GPFile",
    direction="Input",
    parameterType="Optional"
    )

From that parameter I would like to access feature layers in the .gdb individually.

Appending layer names using os.path.join() hasn't worked because the parameter returns a geoprocessing value rather than a string/path.

Is GPfile the right datatype to be using?

How can I open a feature layer in a geodatabase using the separate names of the feature layer and the geodatabase?


texts: Coloring points by raster values in QGIS?

texts:
While it's simple to color a point shapefile by an attribute field, I can't figure out how to match the colors with those from a raster.

I have a raster file that I'm displaying with a continuous colormap, with values clipped between -5 and 5. Using 5 colors results in colors -5, 2.5 0, 2.5 and 5.
I'm forced to use the singleband_pseudocolor symbology so that I can clip the values.

The values in my point shapefile are all negative, between -0.5 and -2.3.
I want to match the colors to the 5 colors in the colormap, but the colormaps will only reflect the values in the point shapefile.

I've tried saving/applying the colormap of the raster file, and manually adding extra points to match my limits; the former does nothing and the latter causes the endpoints to mismatch so there is one less color than there should be. I've also tried to rasterize the points but this isn't working at all.

I'm doing this in QGIS and can attach screen shots if necessary.


texts: Missing fonts in QGIS after upgrading to macOS Sierra?

texts:
I've created a handful of maps using the Iowan Old Style font. After upgrading my Mac to Sierra, it wasn't there any more. I opened Font Book and lo and behold it wasn't there either. After digging around, the font lies in the /Library/Fonts folder and is accessible to applications that must access the folder directly (Adobe products, DYMO Label printer, etc). It isn't however accessible to programs like Pages and QGIS.

I'm trying to figure out how to unhide that font which I've tried a variety of deleting and reinstalling and such. My question would be if anyone knows if there is a way to get QGIS to act like the Adobe programs and access the font folder directly (or however it does it).

I'm currently running QGIS 2.16.3.


texts: QGIS quickest method of calculating distance between multiple points in one layer?

texts:
Using Qgis 2.18.3, I am looking for the quickest method of calculating the aggregated distance between multiple points. As the Crow flies would be enough...

I have a  point layer in a small area. They have unique and incremented ID's.
(in my case these are stops of a truck)

I was using the Points to path plugin to create lines. Then using $length to calculate the length and then basic statistic to aggregate the length.
I could build a model to automate this a little.
The thing is that I have hundreds of those seperate point layers...

Is there an other method which is quicker?


texts: Problem deleting elements in map composer

texts:
I would like to make a query about the use of the map composer. Sometimes, when I add elements to the map, for example the scale bar, I have realized that I can delete it by pressing only the Delete key (see attached image), while at other times I can not perform this operation. Moreover, I can not even delete the element and I must turn off the layer so that the element is not displayed on the final map.

Reference: https://docs.qgis.org/2.14/en/docs/user_manual/print_composer/print_composer.html

How can I solve this problem?


texts: Dissolve only overlapping polygons in R using sf

texts:
I extracted information from open street map that contains many polygons, some of them overlapping. I want to union all polygons that overlap with other polygons. This question has been asked before here: Dissolve only overlapping polygons in R but I am looking for an approach that uses the sf package.

Here is a reproducible example:

sq = function(pt, sz = 1) st_polygon(list(rbind(c(pt - sz), c(pt[1] + sz, pt[2] - sz), c(pt + sz), c(pt[1] - sz, pt[2] + sz), c(pt - sz))))
x = st_sf(box = 1:6, st_sfc(sq(c(4.2,4.2)), sq(c(0,0)), sq(c(1, -0.8)), sq(c(0.5, 1.7)), sq(c(3,3)), sq(c(-3, -3))))
plot(x)
st_overlaps(x)

What I am looking for is an appproach that unions the 2 rectangles that show overlap and the 3 rectangles that have overlap. Problem is that I do not know how to identify the 3 clusters of rectangles that I have in my example. With this information, I can run group_by %>% summarize() on the result and solve my problem.


texts:
I'm trying to build a workflow with the QGIS 2.2 processing toolbox. I want to clip a raster layer with a vector layer using the GDAL tool "clip with a layer mask". But it doesn't work.

The error message in the historic-info is:

"GDAL execution console output
ERROR 4: `0' does not exist in the file system".

The error message mentioned in the historic-algorithm is:

"processing.runalg("modeler:model_clipp_raster","D:\\Mes
Documents\\Documents\\Qgis
processing\\Test_LaFleche\\la_fleche.shp","D:\\Mes
Documents\\Documents\\Qgis processing\\Test_LaFleche\\72_SCAN_25\\SCAN_25_Topo\\Extrait_72_Topo.tif",None)".

I've done the treatment in the QGIS "classical" interface without problem. It seems to me that problem stand in the fact that the raster can't be loaded.

I hope I'm clear enough. If anyone has an idea about the source of my problem and the way to fix it, I would be really grateful.


texts: OpenLayers 2.13 floating components resize not working

texts:
In my application i am using ExtJS4. After upgrade from OpenLayers 2.12 to 2.13.1 i noticed that i am unable to resize windows (floating components) that are on top of the map, like the resize action was losing focus. When i drag the window outside map div the resizing works fine. The problem does not exist in 2.12. Also when i set the window to modal, the resize is working properly.

What may be causing such behaviour?


texts: Custom forms and location of python code

texts:
I'm working with custom forms for the attribute table of various qgis-object and it works realy well, but I would like to have my forms and their python files separated from the projects. This is not a problem with the ui file but I can't specify a location for the python files. Is this possible at all?

Thanks!


texts: Is there any need to convert units for time-based cost attribute in Network Analyst?

texts: In Network Dataset, Global Turn Delay is in seconds. Whereas my cost attribute is in minutes. Also my turn feature class impedance is in minutes. Is there any need to convert turn impedance to seconds and make another cost attribute having units as "seconds"?


texts:
I am searching for a downloadable database of administrative boundary shapes, best would be worldwide data.

I have found GADM but it seems a bit outdated, also the OSM site defining the administrative boundaries seems interesting but I haven't found any exports based on this definition.

The detail level of the shapes is not that important as it would be used to let a user select the city/region (if not in a city or no data for that city available). A hierachical representation like Country > Region > City would be great.


texts:
Using a 3-meter DEM, can I create an accurate 5 feet interval contour file?
Or is the minimum interval contour I can get is 10 feet (roughly 3 meters)?


texts: Classify satellite Image using Machine Learning

texts: I am new to the field of Machine Learning and I want to know what all way I can implement machine learning to classify any satellite image.


texts: I'd like to create a Categorized style in QGIS, classify with it data in a shapefile and then save the shapefile with the new categorized style. Is it possible?


texts: Can I use the Google Geocoding API to parse and standardize address data?

texts: I need to parse single-field addresses into multiple fields such as address number, street name, street type, etc. Esri has the Standardize Addresses tool in the Geocoding Tools toolbox, but I am curious if anything similar is possible with Google's API. It looks like it is wonderful at geocoding and reverse geocoding, but I haven't found any info on standardizing input addresses. I understand that for commercial purposes I would need to pay for some sort of licensing, but first I want to know if it is possible in the first place.


texts: Can a Python program which calculates points along a line be used directly in ArcGIS?

texts:
I have a Python program that calculates points, that is (x,y) coordinates. Can I have this integrated somehow in ArcGIS (PRro) so that these points are directly shown on a map?
I am a beginner combining Python with ArcGIS.


texts: Retrieve geographic coordinates from OSM imported data

texts:
We have just finished importing OSM data into our PostGIS (Postgresql) database. And we are having difficulty understanding the geometry of various shapes imported.

We run a query to retrieve the lines, for example:

SELECT osm_id, "access", "addr:housename", "addr:housenumber", "addr:interpolation", layer, leisure, "lock", man_made, maxspeed, ST_asText(way) FROM planet_osm_line

This returns us all the lines. However, when we inspect the geometry (way column), we find something like this:

"LINESTRING(-8426184.85 4679341.47,-8426249.88 4679495.66,-8426327.24 4679668.92,-8426374.7 4679770.75,-8426379.19 4679784.19,-8426381.28 4679795.83,-8426381.56 4679810.66,-8426384.24 4679827.68,-8426389.03 4679840.52,-8426396.19 4679859.94,-8426421.87 4679923.03)"

We are unable to understand the coordinates shown above. We are expecting to get geographic coordinates, like

  -47.34572, 82.98789

. Instead we are getting coordinates like

  -8426184.85 4679341.47

Any help with this? Thanks in advance


texts:
I have 16 DTED maps of (1 degree x 1 degree). I have to generate combined height matrix of maximum 4 (1 degree x 1 degree) DTED maps in my C++ application.

Can someone suggest to me which open source GIS API I should use in Windows 7?

Thanks in advance.

thanks for your valuable reply, i will try GDAL. I have to analyse radio line of sight for two points for communication, that may lie on two different DTED1 map , but the distance between two points will be maximum 150 to 200 km.

and one thing more, i will get two points from another application, and i have to send all height information matrix (rows * column) of that area, that area may be on same or two different DTED 1 maps.

I am confused about DTED 1 map, Whether it is raster file or vector file,
How GDAL process it, as a raster or as a vector.


texts:
I am trying to open Census tract data, downloaded from http://www.census.gov/geo/maps-data/data/tiger-data.html  Every time, I open the file in ArcGIS, the software will return an "serious application error...unable to continue" and close by itself after a few minutes. Does anyone have the same problem, or know how to deal with it?

I have tried different computers, different state's file, and redownlaoded files...


texts: Tilemill didn't render streets correctly, some parts are missing

texts: can someone please explain me what's happend in the picture below or how i can debug what's going wrong? I downloaded some .osm.pbf files imported the files via osm2pgsql into a postgis database and render the tiles using tilemill with the openstreetmap-carto project. Some parts of the Streets are missing.


texts: What do the error messages from renderd mean?

texts:
I'm pre-rendering a small section of a map for offline use, and I'm getting errors from the output of render_list.  I've set up a postgreSQL database with postGIS, and I'm using Mod Tile/Renderd to serve tiles.

The command itself returns zero, and the metaimages appear to have been created, but I'm still seeing cryptic error messages on stdout.

For example, if I run this command:

render_list -z 20 -Z 20 -a -x 66 -X 71 -y 94 -Y 99 -n 8

I would get this output:

Rendering all tiles for zoom 20 from (66, 94) to (71, 99)
Waiting for rendering threads to finish
rendering failed with command 0, pausing.

Are these error messages benign?  I can't find any documentation on what the codes mean.


texts: Are spatial queries possible using Python and cx_Oracle?

texts:
I am trying to execute a spatial query on an Oracle spatial table via python using the cx_Oracle package.

I can make generic queries successfully, but when I try anything involving a geometry or spatial query, it results in errors.

This is what I have tried:

import cx_Oracle
...

lon = -120.494352
lat = 36.585289

# open a connection to oracle
con = cx_Oracle.connect('myuser/mypass@spatialdb')

# create a cursor
cur = con.cursor()

# Create and populate Oracle objects
typeObj = con.gettype("MDSYS.SDO_GEOMETRY")
elementInfoTypeObj = con.gettype("MDSYS.SDO_ELEM_INFO_ARRAY")
ordinateTypeObj = con.gettype("MDSYS.SDO_ORDINATE_ARRAY")
obj = typeObj.newobject()
obj.SDO_GTYPE = 2001
obj.SDO_SRID = 8307
obj.SDO_ELEM_INFO = elementInfoTypeObj.newobject()
obj.SDO_ELEM_INFO.extend([1, 1, 1])
obj.SDO_ORDINATES = ordinateTypeObj.newobject()
obj.SDO_ORDINATES.extend([lon, lat])
print("Created object", obj)

# set up a distance-calculating sql statement
sql = "select id into :id from spatialtbl s where sdo_nn(s.geometry, :obj, 'sdo_num_res=1', 1) = 'TRUE'"

try:
    # execute the distance sql
    cur.execute(sql, id=id, obj=obj)
    print(f'The id is {id.getvalue()}')
except cx_Oracle.Error as error:
    print(error)

which results in the error:

ORA-01036: illegal variable name/number

Can anyone tell me what I may be doing wrong code-wise or if spatial queries are even possible using Python and cx_Oracle?


texts: Interpolating raster to get finer resolution?

texts:
I am working with precipitation raster layer. It happens the raster data to be in a resolution of 0.25 degrees grid.

How could I interpolate those pixels to have a better resolution, say, a resolution of 0.1 degrees grid?

Actually I need to clip  the raster using a mask layer, in order to create a map. But the pixels' area is too large compared to the area of the vector. So, I get something like the picture below.

I seek any kind of solution, other than interpolation. For example, if there were some way to break down the pixels into small areas, but the pixels still having the same values, it also would work.

Windows 8 user.


texts:
I have POSTGIS="2.4.3 r16312" on my linux server and I need to upgrade it to POSTGIS="2.4.4 r16526" or any newer version.
I use the following:

ALTER EXTENSION postgis UPDATE;

but it gives me the apparante message:

version "2.4.3" of extension "postgis" is already installed

Would you plesae let me know if how to upgrade the PostGIS version?


texts: Why doesn't the Undo/Redo History Widget run my custom undo/redo methods?

texts:
We're writing a Python plugin for QGIS 2.8.3. I've derived a class from QUndoCommand to contain "undo-able" work. When I push it onto the undo stack, its redo method gets called as expected, but QGIS doesn't call the undo method when I click Undo in the Undo/Redo History widget, nor call the redo method again when I click Redo.

The code looks like:

class TestUndoCommand(QUndoCommand):
    def __init__(self):
        super(TestUndoCommand, self).__init__("TestUndoCommand")

    def redo(self):
        super(TestUndoCommand, self).redo()
        QMessageBox.information(None, "Redo", "Redo")

    def undo(self):
        super(TestUndoCommand, self).undo()
        QMessageBox.information(None, "Undo", "Undo")

undoAddCmd = TestUndoCommand()
someLayer.undoStack().push(undoAddCmd)

What am I missing?


texts: Summing multiple rasters using ArcGIS Desktop?

texts:
This is a question related to an earlier one of mine (Reclassifying multiple rasters in ArcGIS Desktop?). I want to sum up 162 rasters: I tried to load them all into ArcMAP in order to eventually use Raster Calculator, but I have 2 issues:

ArcMap seems to get stuck as I try to load hundreds of rasters;
I would be forced to write by hand a very long sum into Raster Calculator.

Is there a way to circumvent those issues, i.e. to summing all the rasters without Raster Calculator and/or without writing a very long sum formula?


texts: Unable to debug ArcGIS 10.2 add-in on ArcMap with "No GUI components found in this Add-In"

texts:
I am working on an ArcGIS add-in (a very simple toolbar with a few buttons) with VB.Net and ArcObjects SDK in Visual Studio 2010. The solution was built successfully and the debug settings were configured.

When I hit Debug, ArcMap application was opened. I couldn't find the toolbar docked anywhere on the ArcMap toolbar. I went to "Customize" -> "Add-in Manager" and the add-in being debugged was not there. Then I tried "Add From File...", located the "esriaddin" file and clicked "Install Add-in". It populated a message box saying "No GUI components found in this Add-In."

I made some Google searches but haven't got any luck to reach a solution yet.

What was I missing? Has anyone come across the same issue and any direction?

Thanks in advance!

------ EDIT ------ the esriaddinx file attached as below

<ESRI.Configuration xmlns="http://schemas.esri.com/Desktop/AddIns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Name>CFAArc10ToolsAddIn</Name>
  <AddInID>{112b1e91-3b7f-4d18-8584-65427e99b287}</AddInID>
  <Description>Contains Custom Tools for use in Arc10</Description>
  <Version>4.0</Version>
  <Image>Images\CFAArc10ToolsAddIn.png</Image>
  <Author>{First Last names}</Author>
  <Company>{Company name}</Company>
  <Date>30/05/2014</Date>
  <Targets>
    <Target name="Desktop" version="10.2" />
  </Targets>
  <AddIn language="CLR" library="CFAArc10ToolsAddIn.dll" namespace="CFAArc10ToolsAddIn">
    <ArcMap>
      <Commands>
        <Button>
          ... ...
        </Button>
        ... ...
      </Commands>
      <Toolbars>
        <Toolbar>
          ... ...
        </Toolbar>
        ... ...
      </Toolbars>
    </ArcMap>
  </AddIn>
</ESRI.Configuration>


texts: Predefined Coordinate Systems missing in QGIS 2

texts:
in QGis 1.8 were lots of predefined coordinate systems (national projections). Where have they all gone in qgis 2.0? I specifically need the Gauß-Krüger-Projections Zone 1 to 5.

Is there any plugin to load those coordinate systems?


texts: Reaching field value of record in ArcGIS field calculator?

texts:
I have two fields showing number of people in two age groups "young" and "old". these people also live in a cell (point) whose distance to a specific facility is calculated. then I categorized these distances to two groups of "far" and "close".

Now, I want to create four new fields that the values of "Old_far" and "young_far" will the exact values of aforementioned population groups if the cell is located in the group of far, otherwise they will be zero and the values go to the field of "Old_close" and "Young_close".
the code for a field I tried follows:

-for old_far:

def func(X):
    if X==2:
        return !old!
    else:
        return 0

Old_Far =

func(!distance_group!)

the code above returns an error of "exceptions.SyntaxError: Invalid syntax(Line 3)"

I want to reach the value of the "old" field of the same record. Should I some how reach the value of that field?

I am using ArcGIS Desktop 10.1.


texts: Count number of points by name within distinct polygons

texts:
In PostgreSQL/PostGIS I have 2 tables:

A POLYGON table (polytable1) with shapes named 'Poly 1', 'Poly 2' etc... Each name can appear multiple times (i.e. 20 polygons with the name 'Poly 1')
A POINT table (pointtable) where each point has a simple letter name ('w','x','y' etc) There are only 5 variations of name (only 4 shown in this example).

I want to create a copy of the polytable table (or just run as a SELECT output) but with new columns storing a count of how often a point falls inside it. The columns can be named after the point names.

To illustrate for an example, I'd like to take this scenario for polytable1 and pointtable:

and produce this output for polytable2/SELECT view:


texts:
I am using QGIS 1.8.

I have two layers, both polygons. Layer 1 consists of propertiers, where ID is individually names. Layer 2 consists of lakes. The query I want is:

Total count of squaremeters of lakes for each property in layer 1. And an output with the results for each output. Maybe as add to the already existing table in layer 1?

Tablestructures with area-info are ready go. I just need s tool and guide how to do it.


texts: Optimum grid/pixel size for interpolating rainfall and temperature

texts:
I have a set monthly rainfall and temperature data within an approximately 100 x 100 km study area.  The sampling points are unevenly distributed within the study area.  Based on a paper by Janis et. al, the number of samples is more than enough.

I plan to create a raster layer by interpolating the data using either Inverse Distance Weighting or Spline techniques.  I can't decide on the best grid/pixel size to use.  Is there a certain tull of thumb given an x number of samples and a y size of the study area to determine the best grid size to use?


texts:
My company is preparing to do a survey of the water utility infrastructure for a small village on an island, on lake Titicaca in Bolivia. What would be the best starting place for a template to use for gathering the data using a data collector. Would the local govt model for utilities be a good starting place or is there something else that would be better.
Our task is to gather data about the population, their water sources and infrastructure if any. We will also be scouting out potential sites to build a purification center for the town. In the end I expect to provide the Bolivian government several maps showing all of the data we've collected, just not sure where to start with a database.


texts: Showing QgsAddAttrDialog in a Python plugin

texts:
I want to invoke the builtin add field dialog from my python plugin in QGIS:

This is the add attribute dialog of the attribute table.

It is located HERE. I expect it to return a QgsField. Unfortunately qgis.app namespace does not exists which would seem the obvious location of it.

It would be nice to invoke it without layer attribute since I want to ensure the returned QgsField attribute for all of the selected layers instead of a single one.


texts: Using Leaflet elevation profiles with multiple GeoJSON features?

texts:
I have a GeoJson file that contains many routes, i need to show each route on an elevation profile via Leaflet.elevation plugin, in need to when i click on a route it's profile show on the elevation profile, here is my code

  function addData(e) {
    var el = L.control.elevation();
    el.addData(e);
    map.addControl(el);
}

function onEachFeature(feature, layer) {
    layer.on ('click', function(e) {
        addData(feature)
    });
}

  $.getJSON('data/routes/network=Nwn_Lines.json', function(e) {
    Nwn = L.geoJson(e, {
      style: function(feature, layer) {
        return {color:'#0000FF', weight:3, opacity: 0};
      }, onEachFeature: function(feature, layer) {
        layer.on('mouseover', function() {
          $('#Name').html("Name: "+'<strong>'+layer.feature.properties.name+'</strong>');
          layer.setStyle({color: '#FFFF00', opacity: 1});
        })
        layer.on('mouseout', function() {
          $('#Name').html("Name: ");
          layer.setStyle({opacity: 0});
        })
      }, onEachFeature: onEachFeature
    }).addTo(map);
  });


texts: How can I get a transformation-parameters-report (spatial-adjustment)

texts:
In ArcGIS resource center about spatial adjustment (How Transform works), there are transform report like this !

  Scale (X,Y) = (249.927,249.927) Rotation (degrees) = (0.362)
  Translation = (2855.407,3715.168) RMS Error (input, output) =
  (0.118,29.398)

  Similarity X =  Ax + By + C
             Y = -Bx + Ay + F A =   249.922         B =   -1.578 C =   2855.407        F =   3715.168

when I do a transform ,how can i get the report like it ?


texts: How to get WMS layer title instead of the layer name in QGIS?

texts:
When I connect to a WMS service in QGIS, the name displayed in the layers panel is the layer name.

Can I configure QGIS to always display the layer title for WMS layers and fallback on the name if the title is unavailable?


texts: Why is the difference between 005 and 006 versions of MOD13Q1 data?

texts:
I tried to repeat a project that used EVI in MOD13Q1. I failed and found that the project used the 005 version of MOD13Q1, and I can only download the 006 version on NASA's ftp.

I compared the 005 and 006 versions of the MOD13Q1 EVI.(Other websites keep some of the 005 version data.)
The difference in values at some points is small, while others are large, why? How should I use some emprical formula in such case?


texts: vertical and horizontal scales on raster

texts:
I have a raster image which is a log. What I like to be able to do is to extract the X any Y points from the raster. That are in two sets of units

The ideal outcome would be an output of an x and y

Generally I am using Arc Gis . Does anyone know if there is possible here, or in another software on the standard package. My work does not allow many add ins to be readily downloaded


texts:
I'm using QGIS Server and an OpenLayers-based web client (in EPSG:3857). I have a QGIS project that I want to serve with QGIS Server, containing layers in several CRS, including custom ones.

Everything shows up correctly in QGIS, and on the fly projection is enabled. My QGIS project projection is set to EPSG:3857.

On the client, layers with well-known projections (like EPSG:4326, EPSG:3395 in my case) are shown correctly. But layers with custom CRS are not shown at all.

Is that normal? Is there a way to make all layers visible?


texts:
I'm trying to convert pixel coordinates of a TIFF file into longitude and latitude ones. The image is from a grib product of a geostationary satellite and I want to georeference it.

I'm reading this doc http://2014.cgms-info.org/documents/cgms-lrit-hrit-global-specification-%28v2-8-of-30-oct-2013%29.pdf - Section 4.4, page 29.

Formula in page 29 returns small values from 0.0 to about 1.6. They are the so called "intermediate values", now I need to scale it. In page 32 there is the scaling function for that, but I don't know the coefficients declared in that...

Does someone know the correct way?


texts: Summarize Land use changes over time with Google Earth Engine

texts:
I'm trying to detect how many times land type has changed between 2001 and 2018 (inclusively).

For example, suppose a pixel that was:

Forest from 2001 to 2003
Bare ground from 2003 to 2010
Agriculture from 2010 to 2015
City from 2015 to 2018

Since the land use for this pixel changed 3 times, a value of 3 for this pixel would be written to the output image.  The resulting image would show which areas changed a lot, and which areas changed less.

I think there must be a function to do this, but I cannot find it.

I've considered writing code that calls subtract.  However, if I do that, I'll need to subtract all land types (17 landtype) between each 2 years.  Since there are 18 years of data, that works out to 17 X 17 X 18= 5,202 lines of code.

nsw_border is NSW.Australia shapefile (I got it from the Internet)

var dataset = ee.ImageCollection('MODIS/006/MCD12Q1');

var igbpLandCover = dataset.select('LC_Type1');

var multiband = igbpLandCover.toBands().clip(nsw_border);

var onlycity = multiband; // Just change name of variable

var city2001 = onlycity.select(0);
var city2002 = onlycity.select(1);
var city2003 = onlycity.select(2);
var city2004 = onlycity.select(3);
var city2005 = onlycity.select(4);
var city2006 = onlycity.select(5);
var city2007 = onlycity.select(6);
var city2008 = onlycity.select(7);
var city2009 = onlycity.select(8);
var city2010 = onlycity.select(9);
var city2011 = onlycity.select(10);
var city2012 = onlycity.select(11);
var city2013 = onlycity.select(12);
var city2014 = onlycity.select(13);
var city2015 = onlycity.select(14);
var city2016 = onlycity.select(15);
var city2017 = onlycity.select(16);
var city2018 = onlycity.select(17);

var difer2002_2001 = city2002.subtract(city2001).rename('differ2002_2001');


texts:
I wrote a function to determine which ith polygon with coordinates contains a given lon/lat point, using the polygons from the tz_world.shp file. I pass in lon = -77, lat = 42, which is in New York State. The ID from the 155th entry is 'America/New_York', which should be the correct answer. But, the use of point.inpoly returns a zero-row length object. Here is my code.

i = 155

timeZoneList = split( timeZonesShpFile, timeZonesShpFile$TZID )

ps = lapply( timeZoneList, Polygon )

p1 = lapply(seq_along(ps), function(i) Polygons(list(ps[[i]]), ID = names( timeZoneList )[i] ) )

my_spatial_polys = SpatialPolygons( p1, proj4string = CRS("+proj=longlat +datum=WGS84") )

polyNames = sapply(slot(my_spatial_spdf, 'polygons'), function(i) slot(i, 'ID'))

pt = SpatialPointsDataFrame(cbind(lon,lat), data.frame(row=1), proj4string=CRS("+proj=longlat +datum=WGS84" ))

thisPoly = my_spatial_polys[ i ]

thisList = getSpPPolygonsIDSlots( thisPoly )

thisDf = data.frame( row = 1, row.names = thisList )

thisSpdf = SpatialPolygonsDataFrame( thisPoly, thisDf )

pIp = point.in.poly( pt, thisSpdf )

> pIp

[1] coordinates row         row.1
<0 rows> (or 0-length row.names)

The screen-view of the coords shows typical bounding lon/lat points for NYS, which should surround my supplied lon/lat point.


texts: Georeferencing a PDF with pixels coordinates not in corners

texts:
I'm trying to georegister an existing PDF using GDAL.

I have two pixel coordinates and their corresponding locations in the source projection.

gdal_translate -of pdf -a_srs "+proj=lcc +ellps=WGS84 +lon_0=xxx +lat_0=yyy +lat_1=xxx +lat2=yyy +datum=WGS84" -a_ullr xmin ymin xmax ymax source.pdf dest.pdf

This approach works, but it assumes that the these coordinates are in upper left and lower right corners of the source. I'd need a way of giving also the pixel positions of the points given to a_ullr. Is this possible using gdal_translate? Basically all that would be needed is to be able to specify bounds in the resulting pdf that is not the default 0,0 1,1.


texts:
I've two geometry table inside my DB:

buffer: id INTEGER SERIAL PRIMARY KEY, geom POLYGON
polygons: geom MULTIPOLYGON

I need have the intersection between buffer and polygons and I will do this using this TRIGGER:

CREATE OR REPLACE FUNCTION intersection_function()
RETURNS TRIGGER AS
$$
BEGIN
    SELECT
        a.id as idb,
        ST_Intersection(NEW.a.geom, NEW.b.geom) as geom
    FROM buffer as a, polygons as b
    WHERE ST_Intersects(a.geom, b.geom);
RETURN NEW;
END;
$$
LANGUAGE 'plpgsql';

CREATE TRIGGER intersection_trigger
AFTER INSERT OR UPDATE ON test_intersection
FOR EACH ROW EXECUTE PROCEDURE intersection_function();

Table test_intersection has: id INTEGER SERIAL PRIMARY KEY, idb INTEGER and geom MULTIPOLYGON.

When I draw a polygon inside buffer table I expect to have the result of intersection inside test_intersection but that table is always empty.

It is my first trigger, what I've wrong?


texts:
qgis.utils.iface.activeLayer() accesses the current active layer, but I would like to get all checked layers in the QGIS ToC.

How can I do it?


texts: Extent projection problems with v.distance to raster

texts:
I get the following error in my graphical modeler run log when trying to convert a point shapefile to a raster after running v.distance:

Running Convert distance to nearest populated location to raster
[33/55] Input Parameters: { GRASS_MIN_AREA_PARAMETER: 0.0001,
GRASS_RASTER_FORMAT_META: '', GRASS_RASTER_FORMAT_OPT: '',
GRASS_REGION_CELLSIZE_PARAMETER: 25, GRASS_REGION_PARAMETER:
'Polygon?crs=EPSG:3400&field=id:integer(0,0)&uid={4e16a4ae-b3c2-4bb3-9063-0d09941d7c24}',
GRASS_SNAP_TOLERANCE_PARAMETER: -1, attribute_column: 'pop_dist',
input: '', label_column: '', memory: 300, output:
'C:/Users/Matthew/AppData/Local/Temp/processing_BydqZs/e147c79588ec4a2a8f29fc503b4ee010/output.rst',
rgb_column: '', type: [0], use: 0, value: 1, where: '' } g.proj -c
wkt="C:/Users/Matthew/AppData/Local/Temp/processing_BydqZs/61af0e012cd44100989ce13a41fb96bf/crs.prj"
v.in.ogr min_area=0.0001 snap=-1.0 input="."
output="vector_60a2a4d19760b74" --overwrite -o g.region
n=6030132.95375129 s=5997800.71795292 e=403880.634734779
w=334624.120789471 res=25.0 v.to.rast input=vector_60a2a4d19760b74
type="point" use="attr" attribute_column=pop_dist value=1 memory=300
output=outputf4ea9887c5014359b5ec095716b3300e --overwrite g.region
raster=outputf4ea9887c5014359b5ec095716b3300e r.out.gdal -t -m
input="outputf4ea9887c5014359b5ec095716b3300e"
output="C:\Users\Matthew\AppData\Local\Temp\processing_BydqZs\e147c79588ec4a2a8f29fc503b4ee010\output.rst"
format="RST" --overwrite Starting GRASS GIS... WARNING: Concurrent
mapset locking is not supported on Windows Cleaning up temporary
files... Executing
<C:\Users\Matthew\AppData\Local\Temp\processing_BydqZs\grassdata\grass_batch_job.cmd>
... C:\Users\Matthew\Documents>chcp 1252 1>NUL
C:\Users\Matthew\Documents>g.proj -c
wkt="C:/Users/Matthew/AppData/Local/Temp/processing_BydqZs/61af0e012cd44100989ce13a41fb96bf/crs.prj"
Projection information updated C:\Users\Matthew\Documents>v.in.ogr
min_area=0.0001 snap=-1.0 input="." output="vector_60a2a4d19760b74"
--overwrite -o WARNING: Projection of layer  is different from projection of layer <break_location> ERROR: Detected different
projections of input layers. Input layers must be imported separately.
C:\Users\Matthew\Documents>g.region n=6030132.95375129
s=5997800.71795292 e=403880.634734779 w=334624.120789471 res=25.0
C:\Users\Matthew\Documents>v.to.rast input=vector_60a2a4d19760b74
type="point" use="attr" attribute_column=pop_dist value=1 memory=300
output=outputf4ea9887c5014359b5ec095716b3300e --overwrite ERROR:
Vector map <vector_60a2a4d19760b74> not found

This operation is being performed in the graphical modeler, and it doesn't have a problem with this extent layer anywhere else and the results are a-ok.
I have added a define projection and reproject layer operations to the extent layer operation, but the same error comes up.


texts: How do I control the ZOrder of annotation classes in a geodatabase annotation feature class?

texts:
Let's say I have an annotation feature class with three annotation classes--anno1, anno2, and anno3--and I want to have anno1 on top, anno2 in the middle, and anno3 on the bottom.  Can I and where do I set this zorder?  Also, assuming zorder index starts at 0, is 0 on the bottom or the top?

I thought that the order in which I defined the annotation classes when I created the annotation feature class determined the zorder, but apparently that isn't true.  I didn't see any specific interface in the interactive process to set the zorder of the annotation classes.  Can I (do I have to) do it after the fact with ArcObjects?  That would be fine.  If so, what are the recommended interfaces to do it?


texts: I have QGIS 3.6 on my laptop. Is it possible to install QGIS 2.18 on the same laptop? Has someone this already done?


texts: Creating shapefile from a table based on "county name" field, while there are multiple counties

texts: I have ArcGIS 10.1. I am trying to make a shapefile out of an excel sheet that has county level data. I can't join this data based on the 'county' field to a county shapefile because I have multiple records in the same county (same county is repeated with a different information in other fields) . I tried the Join One to Many but you perform this tool on an excel sheet. Any suggestion?


texts:
I have the following:

A PNG or JPG of a random width and height, in pixels, that represents a partial map of the world (i.e. a rectangle of the United States).
The four corners of this image are represented by real latitude and longitude values that if plotted, would represent 4 corner points of the United States (LatTop, LatBottom, LongLeft, LongRight).
A coordinate that, if plotted, would represent a point somewhere inside of this "rectangle" (Latitude, Longitude).

My question is, what type of projection or formula would I use to calculate the X and Y coordinates (in pixels based off of the original PNG/JPG image) of the coordinate provided in #3 above?

Some example values would be:

ImageWidth = 1312
ImageHeight = 576
LatTop = 30.244381
LatBottom = 29.529928
LongLeft = -96.764958
LongRight = -94.404619
Coordinate Latitude = 30.100000
Coordinate Longitude = 95.100000

I found some information regarding Plate Carrée projections but I could not successfully apply it to this problem. Perhaps I am missing something.


texts: Is it possible to name a GRID with letters and also not from top down but from left to right?


texts: Remove map layer when animation restarts Mapbox gl

texts:
I am having issues in 'clearing' the map from lines when the user clicks on an element. The idea is to switch between different city-animations on click. For each city, a new geojson is called. The method below using setInterval() generally works but connects the lines from a previous animation with the new one (see image). How can I get rid of this behavior?

var geojson = {
    //empty geojson-linestring to append values
};

var counter=0;
var city = 'london';
var citchange = false;

map.on("load", function() {

    map.addLayer({
        'id': 'line-animation',
        'type': 'line',
        'source': {
            'type': 'geojson',
            'data': geojson
        }
    });

  var animation = setInterval(function(){
        animate(city);
    }, 100); //draw 1 new line every 1 sec

  $(document).on('click', '#myCheck li a', function () { //change geojson-data if button is clicked
        //change datainput
        city = $(this).closest('li').attr('value');
        citychange = true;
        clearInterval(animation);
        setTimeout(function() { //restart animation after 1 sec
            setInterval(function(){
                animate(city);
            }, 100);
          }, 100);
    });

  function animate(clicked) {
        $.getJSON(clicked + '.geojson', function(results){
        //if data is finished drawing or if city is changed reset var geojson
        if (counter >= results.features.length-1 || citychange == true) {
              counter = 0;
            geojson.features[0].geometry.coordinates = []; //empty out array
            geojson.features[0].geometry.properties = []; //empty out array
              citychange = false;
            }

        var x = results.features[counter].geometry.coordinates[0];
        var y = results.features[counter].geometry.coordinates[1];
        geojson.features[0].geometry.coordinates.push([x, y]); //attach coordinates to geo-json linestring

        map.getSource('line-animation').setData(geojson);  //draw coordinates
        counter++;
        });
    }
});


texts: Trouble with if loop in Field Calculator

texts:
I'm trying to calculate a field using Python with field calculator but am running into a syntax error. I'm hoping someone can point out what the error is, and I can't seem to figure it out. Below is the code.

Unfortunately, BUS_YR is stored as a string. It has the last 2 digits of a year and I'm trying to convert it into an integer of the full year. So 96 becomes 1996 and 00 becomes 2000.

def Reclass(NEWYEAR):
  BUS_YR=int(BUS_YR)
  If BUS_YR > 90:
    return BUS_YR+1900
  Else:
    return BUS_YR+2000


texts: How create geographic column in PostGIS table?

texts:
I merged several point shapefiles in PostGIS, but when I load the new merged shape in QGIS it is not possible to see points in the main window. To create the merged table I used this piece of code found in the forum:

CREATE TABLE merged (id serial primary key, attrib1 integer, attrib2 varchar(15),....);
SELECT AddGeometryColumn('merged','geom',<SRID>,'<FEATURE_TYPE>,'XY');
INSERT INTO merged (attrib1, attrib2, ...., geom) SELECT attribA, attribB,...,geom FROM table_1;
INSERT INTO merged (attrib1, attrib2, ...., geom) SELECT attribA, attribB,...,geom FROM table_2;

I think that the problem is that in the merged table the geographic column is empty. I tried to populate this column, but my attempt failed.

How can I populate this column?


texts: Select by attribute on shapefile works when added to ToC but not when pointing to workspace

texts:
I'm trying to build a script that uses select by attribute and select by location to do some operations on a couple of shapefiles containing a large amount of points and polygons. Preferably, I want to make it runnable without adding any files to Arcmap, but I can´t get Select by Attribute to work and I don´t understand why. Here´s an example:
arcpy.env.workspace = "C:/Projekt\Mitt_skolval/Test_adresser_skolor/"
fcs = arcpy.ListFeatureClasses()

print(fcs)

returns
[u'Adresser_18dec2020.shp', u'Skolskjutsomraden_4_5_2021.shp', u'Skolskjutsomraden_6_2021.shp', u'Skolskjutsomraden_7_9_2021.shp', u'Skolskjutsomraden_F_3_2021.shp']

If I then try this:
adresser = fcs[0]

arcpy.SelectLayerByAttribute_management(adresser, "NEW_SELECTION", "FID = 3")

It throws this error:
Runtime error  Traceback (most recent call last):   File "<string>", line 9, in <module>   File "c:\program files (x86)\arcgis\desktop10.8\arcpy\arcpy\management.py", line 7759, in SelectLayerByAttribute     raise e ExecuteError: The value cannot be a feature class ERROR 000840: The value is not a Raster Layer. ERROR 000840: The value is not a Mosaic Layer.

Saying from what I understand that I can´t use Select by attribute on a shapefile, which is weird. HOWEVER, if I add the same shapefile to the ToC and run
arcpy.SelectLayerByAttribute_management(Adresser_18dec2020, "NEW_SELECTION", "FID = 3")

It works.
Why is this?
I know I can solve this by creating feature layers, but I want to avoid this if possible.


texts: Transform metadata in xml format to html

texts:
I extract metadata from the GDB_UserMetadata SDE table. Now I want to transform that xml to html so that I can view it from my browser. To do that I use the ISO.xsl stylesheet found in C:\Program Files\ArcGIS\Metadata\Stylesheets. I add to the beginning of the file:

<?xml-stylesheet type='text/xsl' href='ISO.xsl'?>

It works fine in IE9 but Firefox says:

Error loading stylesheet: Parsing an XSLT stylesheet failed.

Does anyone know WHY?


texts: Failure to Add Layer from a WMS Provider QGIS 2.14

texts:
I just installed QGIS 2.14 using the osgeo4w-setup-x86_64.exe When I tried to add a layer from a WMS/WMTS provider, it failed citing Bad Request as the reason. I was using Lizardtech server but the result was the same with DM Solution as the server. Exact message:

  Failed to download capabilities: Download of capabilities failed:
  Error downloading
  http://wms.lizardtech.com/lizardtech/iserv/ows?SERVICE=WMS&REQUEST=GetCapabilities
  - server replied: Bad Request

What did I do wrong?


texts: Specifying field value in ArcPy update cursor for field calculation?

texts:
I am trying to update a field using the arcpy.da.Update cursor where I can use the value from a select by location result to populate a new field. Ideally, I would like to be able to use a field value, GEN_UNITS, from a row selected by location from "JoinLayer" divided by "Lines" from the 'subLayer' feature class. What do I need to do to approach this correctly?

#Make feature layer
arcpy.MakeFeatureLayer_management(pp_trans_GUJoin, "JoinLayer")

with arcpy.da.UpdateCursor (subLayer, [GUCountField, "SHAPE@"]) as GUCalcCursor:
    for subrow in GUCalcCursor:
        arcpy.SelectLayerByLocation_management(
                "JoinLayer", 'WITHIN_A_DISTANCE',
                subrow[1], .000002, "NEW_SELECTION")
        result = pp_trans_GUJoin.GEN_UNITS/subLayer.LINES
        subrow[0] = result
        GUCountField.updateRow(subrow)

print "GU_Count Updated"
del GUCalcCursor

Update*
It seems like a more robust spatial join route may be the better approach here. Though I still need to use the update cursor to update the GC_Count field in the 'SubLayer' feature class. With this code, I am now receiving an error of 'tuple' object has no attribute 'GEN_UNITS' for the 'result = joinsubrow.GEN_UNITS/joinsubrow.LINES' line. Do I need to search out these field values separately in separate search cursors? What would be the best route here?

import arcpy
from arcpy import env

arcpy.env.OverwriteOutput = True

defaultGdbPath = 'C:\Topo_Check_Tess_V5.gdb'

subLayer='C:\Topo_Check_Tess_V5.gdb\Subs'
transLayer='C:\Topo_Check_Tess_V5.gdb\TLines'
ppLayer='C:\Topo_Check_Tess_V5.gdb\PPs'

arcpy.AddField_management(subLayer, "GU_Count", "SHORT", "", "", "", "",
"NULLABLE", "NON_REQUIRED", "")
GUCountField = "GU_Count"

#Make feature layer
arcpy.MakeFeatureLayer_management(ppLayer, "ppLayerGU")

#Make feature layer
arcpy.MakeFeatureLayer_management(transLayer, "transLayerGU")

pp_trans_GUJoin ='C:\Topo_Check_Tess_V5.gdb\pp_trans_GU_SpatialJoin'

SubLayer_pp_trans_GUJoin =
'C:\Topo_Check_Tess_V5.gdb\SubLayer_pp_trans_GUSpatialJoin'

#spatial join of feature layers
arcpy.SpatialJoin_analysis ("transLayerGU", "ppLayerGU", pp_trans_GUJoin,
'JOIN_ONE_TO_ONE', 'KEEP_ALL', '#', 'WITHIN_A_DISTANCE', .000002)

#Make feature layer
arcpy.MakeFeatureLayer_management(subLayer, "SubLayer_Layer")

#spatial join of feature layers
arcpy.SpatialJoin_analysis ("SubLayer_Layer", "ppLayerGU",
SubLayer_pp_trans_GUJoin, 'JOIN_ONE_TO_ONE', 'KEEP_ALL', '#',
'WITHIN_A_DISTANCE', .000002)

#Make feature layer
arcpy.MakeFeatureLayer_management(SubLayer_pp_trans_GUJoin, "JoinLayer")

LINE_Fields = ['LINES','GEN_UNITS']

with arcpy.da.UpdateCursor (subLayer, [GUCountField, "SHAPE@"]) as
GUCalcCursor:
    for subrow in GUCalcCursor:
        arcpy.SelectLayerByLocation_management("JoinLayer",
        'WITHIN_A_DISTANCE', subrow[1], .000002, "NEW_SELECTION")

        with arcpy.da.SearchCursor("JoinLayer", LINE_Fields) as
        JoinLayerCursor:
            for joinsubrow in JoinLayerCursor:

                result = joinsubrow.GEN_UNITS/joinsubrow.LINES

    subrow[0] = result

    GUCountField.updateRow(subrow)


texts: Idaho's southern border looks curved in ArcMap. How do I make Idaho look flat?

texts:
I have a polygon of Idaho's borders in ArcMap. The southern border of the state is slightly curved. I realize that the Earth is curved in reality, but I want Idaho to look flat.

Is there a way to do this in ArcMap? I feel like a change in projection or coordinate system might help, but I don't know what those actually do, nor how to do it.

Any help is appreciated.


texts: Stream order from flow accumulation raster

texts:
I am looking to get Strahler Stream Order vector from a flow accumulation raster of a river network. I only find solutions with an elevation or direction raster.

Can I do this with GRASS?


texts: GRASS GIS: Time series of overland flow from r.sim.water

texts:
I am trying to perform an overland flow routing on a large area using r.sim.water in GRASS GIS. I've looked at other answers and made sure to set my computational region to the elevation raster I'm using which seems to be the first issue.
I ran the following command:

r.sim.water -t elevin=ForGrass_ProjectRaster1 dxin=ValleyDX dyin=ValleyDY rain=rain manin=manning infil=infilt depth=depth --overwrite

The rain, infiltration, and manning maps were just made like in the tutorial as a trial step:

# synthetic maps
r.mapcalc "rain    = if(elevation.10m, 5.0, null())"
r.mapcalc "manning = if(elevation.10m, 0.05, null())"
r.mapcalc "infilt  = if(elevation.10m, 0.0, null())"

The result in the command window shows:

Number of threads: 1
default nwalk=401152772, rwalk=401152772.000000
Min elevation   = 326.00 m
Max elevation   = 5381.00 m
Mean Source Rate (rainf. excess or sediment)    = 0.000001 m/s or kg/m2s
Mean flow velocity  = 3.995791 m/s
Mean Mannings   = 0.095378
Number of iterations    = 159 cells
Time step   = 0.94 s
(Thu Jun 13 21:44:06 2019) Command finished (23 sec)

And gives the following output:

So while it does not throw an error, the answer "converges" way too quickly for the size of my area and the 15m resolution. Anyone familiar with the command know what may be stopping the process without throwing an error?


texts: QGIS 2.18.5 update breaks on Ubuntu 16.04

texts:
Concurrent updates to GDAL (to 2.1.3) and QGIS (to 2.18.5) on Linux Mint 18.1 from the Ubuntugis repos breaks QGIS, with a noted dependency for the virtual package gdal-abi-2-1-2 being uninstallable.

The stable Ubuntugis ppa currently supplies GDAL 2.1.0 (gdal-abi-2-1-0) while the Ubuntugis-unstable ppa has been updated to GDAL 2.1.3 (gdal-abi-2-1-3).

Has anyone found a way around this?

Update:

QGIS bug report for those interested is here: http://hub.qgis.org/issues/16386

UPDATE 2

The ticket has been closed as fixed. Everything should be back to normal now.


texts: Limiting OpenLayers heatmap to vector feature boundaries

texts:
I'm looking to create a heatmap using OpenLayers, which is possible using the ol.layer.Heatmap class. However, I want to limit the visualisation of the heatmap effect to span just the underlying vector polygons (so not a true heatmap).

So in the end the heatmap should only visible as overlay on existing vector features. The reason I want to do this is that I want to give the polygons a weighted gradient, which depends on the weight of the individual vertices of the polygon. There will only be one polygon at a time (in a pop-up), so the heatmap effect will be isolated automatically to just one polygon, it just needs to be clipped. Does anyone know if this can be realized in OpenLayers?


texts: Overwrite option on a standalone ZonalStatisticsAsTable using ArcPy

texts:
How can I code an "overwrite option" on a standalone ZonalStatisticsAsTable using ArcPy?

I don't see any overwrite option from a Esri example.

# Execute ZonalStatisticsAsTable
outZSaT = ZonalStatisticsAsTable(inZoneData, zoneField, inValueRaster,
                                 outTable, "NODATA", "MEAN")

Is impossible or possible to overwrite?


texts: Does the GDAL GeoJSON driver read or write multipart geometries?

texts: In the documentation for the GDAL GeoJSON driver, I can only see mention of primitive geometries.  Does the GDAL GeoJSON driver read multipart geometries like MultiLineString?  If not, is there another established GeoJSON driver with a python interface that can read multipart GeoJSON type geometries from a URL?


texts: RasterToPolygon tool is looking inside the output location and not reading the fields

texts:
I am trying to convert IMG classified rasters to polygons. I created a code using the Raster to Polygon tool and it worked for 8 of the 50 files; for the rest, I get errors 010157 (Unable to open feature class C:Data\NewLayers\ClassifiedRaster. Failed to execute (RasterToPolygon).) and 010010 (Field not found. Invalid field index obtained.
Failed to execute (RasterToPolygon)). What is weird about the first error is that the folder NewLayers is actually the output folder and the workspace is set to C:Data so I don't understand why it is looking for the input file in the output folder. The weird thing about the second error is that field does exist in every raster that the error occurs in. Does anyone have any suggestions? Here is my code:

arcpy.env.workspace = r"C:Data"
arcpy.env.overwriteOutput = True
listras = arcpy.ListRasters("*", "IMG")
for ras in listras:
    name = ras.split(".")[0]
    outws = r"C:Data\NewLayer"
    outras = outws + "\\" + name + ".shp"
    try:
        try:
            arcpy.RasterToPolygon_conversion(ras, outras, "NO_SIMPLIFY","Class_Name")
        except:
            arcpy.RasterToPolygon_conversion(ras, outras, "NO_SIMPLIFY","Class_Names")
    except:
        #If the field does not exist, then list the fields so I can see what it might be called.
        #So far each raster that comes into the Except prints a field called Class_Name or Class_Names
        flist = arcpy.ListFields(ras)
        whatfields = []
        for f in flist:
            whatfields = f.name
            print str(name) + ": " + str(whatfields)


texts: Preparing SRTM (hgt) for use in SAGA GIS?

texts:
I am trying to prepare a raster file which i could use with SAGA processing tools for hydrologic analysis in QGIS. I am using Win 7, 32 bit, QGIS 2.14.20 and SAGA 2.3.2
I downloaded the srtm file in hgt format from the net. After i converted the file to a Geotiff while reducing the size with the QGIS clipper tool. I changed as well the CRS to UTM.

I have seen on this answer to a rather similiar question: QGIS: Saga Channel network: how to prepare SRTM data
that i should try the Fill sinks under SAGA. But even this function doesn´t work with my raster. I get the output, just as for the other tools, that: the layer(s) couldn´t be created.
I am quite sure that my QGIS/ SAGA setup is fine, because i tried all operations with a Raster DEM provided from QGIS and the SAGA tools worked all right and prepared what i am looking for. Therefore i suppose there must be a mistake in my raster file. I tried to change pixel value <=0 to no data value with the raster calulator but without success!  I would be very glad if someone can provide a direction for a solution.

As decribed above i start with the SRTM hgt file.
Step 1: Save the hgt as a Geotiff and change of CRS to UTM with the right click menu under "save as"

Step 2: I created a polygon vector mask layer and used the QGIS clipper under Raster - Extraction - Clipper:

The raster file i get has the following metadata:
]

Step 4: I tried using this layer with different hydrologic processing tools, SAGA and GRASS under QGIS. Here an example for GRASS using the _r.stream.extract_ tool:

This is the error i will get for unfortunately all the tools i tried to use:


texts: Interpolating (kriging) using only subsets of data points in QGIS

texts:
I'm working with county level data where I'm using ordinary kriging in QGIS 2.14.2 Essen (SAGA plug-in for reference) to characterize a point data in each county. The problem is that I don't want data points from another county influencing calculations near the border of an individual county.

The simplest but brute force way would be to separate my point data layer (x and y coordinates, response variable, and county name) by county and then, run ordinary kriging as a batch process for each county, by clipping each raster by the county polygon layer, and merging each county raster into one overall raster file. This seems like a lot of manual work each time I might run this data or add new counties though.

In the parameters for the Ordinary Kriging function, I can specify a maximum search distance for points to use in the calculation. What would be really nice would be to add on another condition that not only would each point used need to be < x distance away, but also fall within the the same county polygon. Is there a simple way to functionally do this, or would that come down to modifying the Ordinary Kriging function itself?

I haven't worked with Python yet (hence checking here for other potential options before I dig into it), but the other option I'm considering is to look into setting up a do loop for the list of counties using the work flow I mentioned in my second paragraph. Is this latter option the simplest way to move forward at this point, or is there some way to add this additional condition?


texts:
I am trying to replicate a process in MySQL that I have had been through in ArcGIS thereby using MySQL to set up an automated system for extracting future climate predictions from downscaled data to farm. The downscaled data frustratingly cuts off some key growing areas. To get approximate local data in ArcGIS I converted the climate data to grid points, then used the NEAR function to return a near distance and FID. I then joined attributes from the climate data to the farm data by the table Near FID.

In mySQL they do not have a NEAR function but a distance once, but I do not think this returns an FID and creates a value for all points not just the closest one? Does anyone have any suggestions?


texts:
I have a WMS layer that shows geological layers. When I click the different areas with the info tool from the toolbar, I can see all additional data (see right side of image).

Yet, I don't see any option for placing a label on this layer.

What do I need to do? I'd like to label the different areas with the content of that "FeatureInfoCollection" on the right.


texts: Why might layer appear not to turn off in ArcMap?

texts: I was called over to try and fix an issue with a coworkers ArcGIS software (ArcView 9.3.1 SP1, Windows 7) and couldn't fix it. When a certain layer is turned off in the table of contents it never turns off in the map. Refreshing the map doesn't work, jumping between data and layout view doesn't work either. Saving the map with the layer off, closing and then re-opening it doesn't make a difference. I removed and re-added the data, copied the shapefile to a different location, removed joins, etc. still the same problem. Has anyone had this issue and know of a fix? I don't have any control over the version and service pack they're using (they work for the state and I work at the county level, so we're on different systems). Other people in the office using the same data don't have the problem. I appreciate the help in advance.


texts: Osmconvert command-line window closes when I press Return

texts:
I am dealing with Open street map Data.
I want to convert some of these .o5m files to .osm format so that I can process them in QGIS.

So, I have downloaded Osmconvert to run on my Windows XP operating system.
I run the osmconvert.exe file and a black command-line window opens.
But, whatever I type into the command-line, when I press Return or Enter the window disappears and the program closes!

Please could anyone suggest what sort of problem this is that I've run into.
I'm new to command-line computing so apologies if its very obvious.

Many thanks
Martin


texts: Pros and Cons for developing GIS functionality in ArcGIS Web API (Silverlight) or ArcGIS for Desktop

texts:
I have an application coming together using the ArcGIS Server API for Silverlight.  The app, currently, takes in two geometry points from the user and passes the geometry to an ArcGIS Elevation server online to get elevation values.  Then the SL client sends the data over to an internal ArcGIS Server to do custom slope calculations and linear referencing on a semi-static polyline with a gp service.

What are pro and con arguments to move the UI from silverlight over to desktop application.  Perhaps a C# extension/addin that allows the user to select points similar to how they interact in the web map.  And documentation or white papers on the subject.  This would be strictly an ArcMap centric dev question.

Now it is an internal app.  But deployment issues would be a good topic.  As well as maintenance and complexity of development.  Any others points would be very welcome as well.

I guess this may not be a strict question to get an answer to maybe it needs to be moved?a

Thanks.


texts: How to calculate and store (ArcMap) slope on huge mosaic dataset?

texts:
I have a huge raster dataset stored in a geoDB (DHM with 2m resolution for all of Switzerland), uncompressed size ~75 GB. I want to use the ArcMap Slope tool (or another tool would also work) to calculate slopes for the whole country.
How do I go about processing such a huge dataset?
Is it possible to process this "tile by tile" (since it is already mosaiced, there should be some tiling?). Also unclear to me: The result will be of similar size... what would be an efficient way to store the result? I don't have write access on the DB it is coming from, but I could create a new DB.


texts: PyQGIS - how to override maximum number of features in combobox

texts:
Is there a simple way, how to override a maximum number of displayed features in QgsFeatureListComboBox? It seems that there is a hardcoded limit set to 100 features (in QgsFeatureFilterModel).

QgsFeatureListComboBox fits my needs almost perfectly except that limit. In most cases, there is small number of features to show. But sometimes, I have little over 100 features.