texts: Rule-based styling window freeze in QGIS 2.18.16-22

texts:
While I was working on cartographic files (QGIS 2.18.16 - Linux Mint 18.1) using the rule-based styling window, suddenly the window and the program freeze and I can not longer work on editing. By closing and reopening the project file (and also other analogues other than those on which I was working) the problem remains (if i try work with the rule-based styling) even after uninstalling and reinstalling QGIS updating it to version 2.18.22.
Opening the same files with version 3.2 the problem does not seem to exist.
I would like to continue using version 2.18.x ltr up to the next 3.4 ltr, can this problem be overcome? Can it depend on the existence of a cache related to the rule-based styling window that is no longer accessible?

I add some informations: 1-it seems that the block occurs only when the rule-based styling window is open 2-the files I've worked on are on an external USB hdd 3-coinciding with this problem I detected the unwanted creation of a second mount point for the external USB hdd while the previous one was not accessible and with the root owner 4-also restoring the mount point setting as before the problem remain

Update 2018-28-07: I found that this problem was already reported as a bug here: https://issues.qgis.org/issues/16778
but I did not understand if it was taken into consideration or if we need to propose it again.


texts: Any rules of thumb for neighborhood settings in Focal Statistics?

texts:
In ArcGIS 10, users can define the neighborhood in the Focal statistics tool.  The moving window shape can be set to any of the following: Wedge, annulus, circle, rectangle, irregular, and weight.  For example purposes, let's assume we want to calculate the mean tree canopy area from a binary classified canopy raster (i.e. 0 = no canopy and 1 = canopy present) at 1 m spatial resolution.  Given this example:

Are there any rules of thumb to determine which moving window shape should be used?

Once you determine the moving window shape, is there way to quantitatively determine the optimal neighborhood settings, or is this entirely subjective?


texts: How to compute equality of polygons in PostGIS independently of their orientation?

texts:
I tried some functions in postgis. Scope of work, get the equality of two shapes, independently of their orientation in
the space. I detect the shapes from autocad and of course in lifetime of a project, can happen that two shapes in two
different draws are oriented int different way.
so i tried the very first relationship, get difference of mirrored shapes(this was my very first trouble):

select st_equals(
ST_GeomFromEWKT('TRIANGLE ((0 0, 5 10, 30 0, 0 0))'),
ST_GeomFromEWKT('TRIANGLE ((0 0, 5 -10, 30 0, 0 0))'))

And i get False. Perfect.
But I was not more  happy, when i just tried to rotate the geometry:

select st_equals(
ST_GeomFromEWKT('TRIANGLE ((0 0, 5 10, 30 0, 0 0))'),
ST_GeomFromEWKT('TRIANGLE ((0 0, -10 5, 0 30, 0 0))'))

These are the same triangle, just rotate of 90°,I get also False.
Is postgis able to define the equality of shapes, also if are rotate in the space?


texts: Append column of .csv file to attribute table of a feature class

texts:
I am quite new to ArcMap. I want to add a column of a .csv file to the end of the attribute table of a feature class. The column and the attribute table are of the same length. I tried to use the "append" tool. First I copied and pasted the target column of my .csv file into a blank Excel spreadsheet and saved it as a new .csv file. I then added this to ArcMap. When I try to append this to my target attribute table using the "append" tool I get the following error message:

  "ERROR 000338: Inputs must be either all Feature Classes, Tables or Rasters; not mixed."

This is confusing because I only have one input dataset, so I'm not sure where the "mixed" warning comes from...


texts: Word division in properties/labels of QGIS?

texts:
Is it possible to make a word division with long labels in QGIS properties of a vector layer?

For example:
Name of the label: Llanfairpwllgwyngyll

Should be labelled:

Llanfair-
pwllgwyn-
gyll

After every hyphen a new row starts.


texts:
I need help with the Qgis CadTools CAD Console commands.

According to these help files there are six commands. I just can't get them to work.

Can someone help me?

Thanks


texts: Can I use a browser's developer tools to see the zoom level of current map in browser?

texts:
What I'm looking for

Where a map is being served by Mapbox in my browser is there anywhere within the Chrome/Firefox Developer Tools where it shows the current zoom level as displayed on screen?

What I've tried

I can see what zoom level the map starts at (within the code for website) and could manually count the number of clicks or scrolls I make. I know there is a listener function that knows what zoom level I'm on and trying find if that is reported in the console or other part of the Developer Tools panel

Why I'm looking for it

I'm trying to get a feel for what data to show at what zoom level so looking a precedent websites.


texts: Get polygons of crop classification from the Land Parcel Information Systems (LPIS)

texts:
I'm trying to get\download polygons of fields with crop type. There is a USA database called cropscape which is very friendly. There is also a European one called Land Parcel Information\Indentification Systems (LPIS) which some academic papers used for their study, e.g., here.
However, the information regarding this database is not clear. I cannot find relevant information directing me to how can I obtain field polygons from this data (if it is possible).

Did someone used this data in the past?


texts: Extract a cutline from VRT file in world coordinates?

texts:
I'm trying to extract the world coordinates of a cutline (clipping polygon) in a GDAL VRT file. Unfortunately, the cutline is stored in image coordinates (pixels), and i could not find the right method to transform it into world coordinates.

The following python functions didn't help:

def Pixel2world(geoMatrix, x, y):
  ulX = geoMatrix[0]
  ulY = geoMatrix[3]
  xDist = geoMatrix[1]
  yDist = geoMatrix[5]
  coorX = (ulX + (x * xDist))
  coorY = (ulY + (y * yDist))
  return (coorX, coorY)

def Pixel2coord(geoMatrix, x, y):
  """Returns global coordinates from pixel x, y coords"""
  xoff, a, b, yoff, d, e = geoMatrix
  xp = a * x + b * y + xoff
  yp = d * x + e * y + yoff
  return(xp, yp)

raster=r'virtual_raster.vrt'
ds=gdal.Open(raster)

gt=ds.GetGeoTransform()
print Pixel2coord(gt,1000,1000) #=> Returns wrong coordinates
print Pixel2world(gt,1000,1000) #=> Returns wrong coordinates

BTW: due to a coordinate transformation inside the VRT from EPSG:31255 to EPSG:3857, the resulting image is shifted and rotated. And (geoMatrix[0],geoMatrix[3]) does contain the upper left corner of the cutted image and not the uncutted one.

Has anyone successfully extracted a VRT cutline in world coordinates?


texts:
I am a beginner, learning the cartodb-API. below is my javascript code which is below my body tag in the HTML page.

The map, together with the points are loading correctly but the SQL command is not executing.

<script>
  function main() {
    cartodb.createVis('map', 'https://user.cartodb.com/api/v2/viz/010577da-dea0-11e5-ad6a-0e5db1731f59/viz.json', {
        tiles_loader: true,
        center_lat: 0.5637,
        center_lon:  3.896,
        zoom: 4
    })
    .done(function(vis, layers) {
      layers[1].setInteraction(true);
      layers[1].on('featureOver', function(e, latlng, pos, data) {
        console.log(e, latlng, pos, data);
      });
      var map = vis.getNativeMap();
      map.setZoom(6);
    })
    .error(function(err) {
      console.log(err);
    });

    var sql = new cartodb.SQL({user:'my_username'});
    sql.execute("SELECT * FROM my_table_name WHERE car = 'XXXX'")
    .done(function(data){
      console.log(data.rows)
    })
    .error(function(errors){
      console.log("errors" + errors);
    })
  }
  window.onload = main;
</script>


texts: NASA Web WorldWind - WMS GetFeatureInfo request

texts:
I have been looking for ways to make a WMS GetFeatureInfo request using the API of NASA Web WorldWind, however have not achieved yet. I tried picking as below, however this doesn't return the features of WMS.

  var serviceAddress = "http://localhost:8080/geoserver/wms?service=WMS&version=1.3.0&request=GetCapabilities";
  var layerName = "ubgd:cucs2012_milan";

  var createLayer = function (xmlDom) {
      var wms = new WorldWind.WmsCapabilities(xmlDom);
      var wmsLayerCapabilities = wms.getNamedLayer(layerName);
      var wmsConfig = WorldWind.WmsLayer.formLayerConfiguration(wmsLayerCapabilities);
      wmsConfig.title = "Milan - 2012";
      var wmsLayer = new WorldWind.WmsLayer(wmsConfig);
      worldWindow.addLayer(wmsLayer);
  };

  var logError = function (jqXhr, text, exception) {
    console.log("There was a failure retrieving the capabilities document: " + text + " exception: " + exception);
  };

  $.get(serviceAddress).done(createLayer).fail(logError);

  var handlePick = function(o) {
    var x = o.clientX, y = o.clientY;

    var pickList = worldWindow.pick(worldWindow.canvasCoordinates(x, y));
    if (pickList.objects.length > 0) {
      for (var i=0; i<pickList.objects.length; i++) {
        console.log(i);
        console.log(pickList.objects[i].userObject);
      }
    }
  };
  worldWindow.addEventListener("click", handlePick);

The pickList object returned looks to be the globe only, whether I click on the WMS layer or not.

Below is another trial, where I construct the URL myself, however this returns values even when I do not click on the layer. I suppose the URL has some wrong parameters. I believe x, y, width and height should be of the WMS layer, not the canvas, but I do not know how to get these values.

  var serviceAddress = "http://localhost:8080/geoserver/wms?service=WMS&version=1.3.0&request=GetCapabilities";
  var layerName = "ubgd:cucs2012_milan";
  var bbox;

  var createLayer = function (xmlDom) {
      var wms = new WorldWind.WmsCapabilities(xmlDom);
      var wmsLayerCapabilities = wms.getNamedLayer(layerName);
      bbox = wmsLayerCapabilities._boundingBoxes[1].miny + "," + wmsLayerCapabilities._boundingBoxes[1].minx + "," + wmsLayerCapabilities._boundingBoxes[1].maxy + "," + wmsLayerCapabilities._boundingBoxes[1].maxx;
      var wmsConfig = WorldWind.WmsLayer.formLayerConfiguration(wmsLayerCapabilities);
      wmsConfig.title = "Milan - 2012";
      var wmsLayer = new WorldWind.WmsLayer(wmsConfig);
      worldWindow.addLayer(wmsLayer);
  };

  var logError = function (jqXhr, text, exception) {
    console.log("There was a failure retrieving the capabilities document: " + text + " exception: " + exception);
  };

  $.get(serviceAddress).done(createLayer).fail(logError);

  var handlePick = function(o) {
    var x = o.clientX, y = o.clientY;
    var width = worldWindow.canvas.width;
    var height = worldWindow.canvas.height;

    console.log(bbox);

    $.ajax({
      url: "http://localhost:8080/geoserver/ubgd/wms?service=WMS&version=1.1.1&request=GetFeatureInfo&layers=ubgd:cucs2012_milan&query_layers=ubgd:cucs2012_milan&styles=&bbox="+bbox
           +"&height=" + height + "&width=" + width + "&info_format=application/json&srs=EPSG:3035&x=" + x + "&y=" + y,
      dataType: "html",
      type: "GET",
      success: function(data){
        console.log(data);
      }
    });
  };
  worldWindow.addEventListener("click", handlePick);


texts: Creating virtual layer or view table from original table using pivot table on QGIS?

texts:
I have a table and I need to produce a virtual layer with pivot or crosstable command.

Is it possible on QGIS 3.6 or 3.8?

My original sql is:

select cd_setor, Name, Path_relativo
from Fotos
order by cd_setor, Name, Path_relativo

The result that I intend is like as I show below.


texts: Panchromatic Image association with high spatial resolution

texts: How and Why is a Panchromatic Satellite Image associated with high spatial resolution? I googled and found that it is a single band image, but then why is it called pan-chromatic(All Colors). Does it mean it covers the entire visible region?


texts: Converting latitude/longitude pairs into gridded Web Mercator GeoTIFF

texts:
I have a set of data that is essentially an array of coordinates (WGS84) and values.

Example:

  51.5834,-101.1709,0.0452,51.5834,-101.1567,0.0648,51.5834,-101.1425,0.0339,51.5924,-101.2133,0.0339,51.5924,-101.1992,0.0365

This data values are ~1.079km apart. Since it is approximate gdal_translate cannot be used.

I would like to convert this data into a GeoTIFF that is projected into Web Mercator. I understand that some sort of gridding will have to occur.

I believe the current system is using the dimensions of pixels (at zoom level 8) as a sort of gridding system. I may not be 100% correct as reading C++ code (especially this code) is very confusing.

It calculates what pixel the latitude/longitude will intersect and applies the value there and somehow applies that to the GeoTIFF, which is then used to output tiles (using a Gdal2Tiles script)

However, I would like to do this with the standard GDAL tooling rather then some custom C++ code.

Is this possible? Basically taking a latitude/longitude/value CSV and converting that to a gridded Web Mercator GeoTIFF?


texts: Force refresh value defined by "data defined override" when export layout with PyQGIS 3.14

texts:
I am using the data defined override function to define the X and Y map grid intervals in the map layout.

I want to export my map layout using pyqgis. But the map grid interval is not automatically updated when exporting with my script. However, the grid interval changes automatically when exporting manually.
I tried to refresh the layout using layout.refresh () as mentioned in description:

Calling this also triggers a recalculation of all data defined
attributes within the layout.

How do I refresh data defined override automatically with PyQGIS?
Here is QGIS project file and stanalone code snippet I use to export images:

import qgis.core
qgs = qgis.core.QgsApplication([], False)
qgs.initQgis()

project_path = r'C:\DELETE\testing_grids\project.qgs'
layout_name = 'layout'

project = qgis.core.QgsProject.instance()
project.read(project_path)
layout = project.layoutManager().layoutByName(layout_name)

exporter = qgis.core.QgsLayoutExporter(layout)
export_settings_image = qgis.core.QgsLayoutExporter.ImageExportSettings()
export_settings_image.dpi = 50

map = layout.itemById('map')

map.setScale(50000000)
layout.refresh()
exporter.exportToImage(r'C:\DELETE\testing_grids\auto_export_1.jpg', export_settings_image)

map.setScale(25000000)
layout.refresh()
exporter.exportToImage(r'C:\DELETE\testing_grids\auto_export_2.jpg', export_settings_image)


texts: How to reduce the file size of GeoJSON data?

texts:
For my project I am trying to convert the tiger shapefile information for us states into GeoJSON format

However when I use the ogr2ogr tool the data file is about 20 MB. I have seen the geoJSON file of US States elsewhere of around 88KB.

How do I reduce the output to geoJSON file?


texts: QGIS 2.18 - Convert 3D Lines to 3D Polygons

texts:
I'm trying to convert a shapefile containing 3D Vector Polylines (with Z values) to 3D Vector Polygons with the tool "Line to Polygon" from QGis. The problem is that the Z values are lost during the process. The polygons that I get after transformation have no Z value.

Is there a way to fix this?


texts: Creating fixed buffer around a selected point in QGIS version 2.18.2

texts: I am relatively new to QGIS. I recently downloaded the version 2.18.2 and a lot of the geoprocessing tool options I was used to in the previous version seem to be gone. I want to create a buffer around one selected point in a vector layer, but the "Use Selected Features" option is no longer there (see below). Any suggestions?


texts: Personal Geodatabase not recognized as valid datasource in the last QGIS Windows Weekly build (64 bits)

texts:
I was using Personal Geodatabases in QGIS without any problem but it's stopped to work since I installed the last 64 bits weekly build for Windows (1.9.0-35-Setup-x86_64). I'm now receiving an "Invalid datasource" error message.

Is this problem related to the last weekly build or specific to the 64 bits version?

EDIT:
I confirm that it work on the last 32bit weekly build so the problem is specific to the 64 bits version...

Thanks a lot

Etienne


texts: Scrolling TOC programmatically using ArcObjects in ArcMap AddIn?

texts:
I've created the small add-in command for ArcMap, that allows find in TOC and select the layer by it's alias or feature class name. Useful when map document contains several hundreds of layers.

The only thing that I cannot implement is - scroll TOC to selected layer. Search in docs and Internet didn't help.


texts: Space Time Cube in ArcMap, always get invalid file format for output

texts:
I am using ArcMap 10.4.1 on Windows 7 to try and create a space time cube to model wildfire spatial/temporal patterns across a portion of Colorado.

I always get the error 000814 Invalid file type in the output Space Time Cube. The output is a netCDF file, and it's extension is .nc

I don't understand why I am getting this error, please see attached screen shot.
I try and create the output with the .nc extension and without it, and I get the same error either way. I have also tried to add other extensions like .shp just to see what happens and always the same error.


texts: Formula Dark Object Subtraction 1 QGIS (Semi-automatic Classification Plugin)

texts:
I am using QGIS with the plugin Semi-Automatic Classification Plugin to apply DOS1 atmospheric correction to bands 3 and 8 of Sentinel-2. Example:

I want to automate this task with a python script but I don't know which formula is using this plugin.

I've got similar results by getting the smallest pixel (ignoring no-data value) for every band and substract this pixel to all pixels from that band:

inFile = 'band3.jp2'
with rasterio.open(inFile) as r:
    values = r.read(1)
    values[values==0]=65535 #Ignore no-data values
    minValue = np.min(values)
    values = values - minValue
    values[values==(65535-minValue)]=0 #Set no-data values again to 0

But the result is not exactly the same. I have found the source code of the plugin but I don't understand it at all I just want to apply the same DOS1 formula with a simple script in python.


texts: FME Merge two files that only have some attributes the same

texts:
I am trying to join 2 spatial files that have some but not all attribution the same.

One of them (property_template.tab) has no data but has the schema that I want. The other one (cadastre_bpoly.tab) has the spatial info and only some required attributes.

In QGIS a simple merge vector gives the result I need where if an attribute matches it is filled but if not it's left.

In FME I have tried FeatureMerger where the requester/supplier has join on as $(SourceDataset_MAPINFO_5) but it doesn't give a result.

I have also tried ListBasedFeatureMerger.

ALL I need to do is the following:

Get the previous output of the property table and use it as a template (with no data)
Populate it with the cadastre and have it auto fill any attributes that are the same.
Join by attributes with an xls sheet that has a key field but be able to build up the key field using existing columns.

I understand #3 is really a separate question but I included it as it may help in choosing the correct transformers.

For points 1&2 above the merge shouldn't try to do any type of join by attribute but it doesn't allow me to leave the Join Attributes Requester/Supplier blank.

===== UPDATE

Based on Mark Ireland's suggestion


texts: Extremely slow processing time to map lat/lon data onto census shapefile with ArcPy?

texts:
I am a newcomer to ArcGIS and Python.

What I am trying to do is very simple: map 400K business locations using lat/lon coordinates onto a shapefile of California census tracts, and then export the data from the spatial join into a text file so that I have a spreadsheet containing the census tract that each business falls into. The input file of lat/lon data is a csv with 400K records, 5 variables and is ~15MB.

I have successfully completed this task interactively in ArcMap 10.2.1, but I would like to have a record of my process for future replication, hence my foray into ArcPy. In ArcMap, this process takes a few minutes. However, my ArcPy script takes multiple hours to complete. It appears to be the CopyFeatures step that requires significant computer resources and so I am not including ArcMap details or ArcPy code beyond this step. Note also that I have run my full ArcPy script on a subset of my data (the first 20 records of my 15MB file) and it works fine and finishes in just a few seconds. Given that, I know the issue is likely with the size of my file, but I have not been able to determine or successfully implement a work around to decrease the memory usage of my code.

Are there any ways I can modify my script to decrease processing time for this simple task?

I'm hopeful there's a way to make this as efficient with ArcPy as it is with ArcMap.

ArcMap steps:

Import shapefile containing census tracts

Add data -> choose shapefile

Import and prepare lat/lon data for spatial join

File -> Add Data -> Add XY Data -> select my 15GB csv -> X Field (longitude) -> Y Field (latitude) -> Coordinate System (WGS 1984)
Right click on XY data -> Data ->  Export data -> All Features -> Output feature class is a .shp saved in my GIS workspace -> upon completion of this step, a pop up displays asking whether want to add to map as layer and I choose Yes (don't think this is significant however)

ArcPy script:

# Import modules
import arcpy, csv
import os
from arcpy import env

# Set environment settings
env.workspace = "C:/Users/ccwright/Desktop/GIS_workspace"
arcpy.env.overwriteOutput = True

# Set local variables:
in_table = "infousa_latlon_small.csv"
x_coords = "longitude"
y_coords = "latitude"
out_layer = "lat_lon_layer"
feature_class = "lat_lon_feature_class.shp"
census_tracts_shp = "census_tracts_CA_only/US_tract_2000_CA_only.shp"
spatial_join = "spatial_join.shp"
spatial_join_output_txt = "spatial_join_data.txt"

# Set coordinate system to WGS-1984:
WKID = 4326
sr = arcpy.SpatialReference()
sr.factoryCode = WKID
sr.create()
env.outputCoordinateSystem = sr

# Process: Make XY Event Layer
arcpy.MakeXYEventLayer_management(in_table, x_coords, y_coords, out_layer, sr, "")

# Process: Copy Features
arcpy.CopyFeatures_management(out_layer, feature_class, "", "0", "0", "0")


texts:
I'm working on a Django tile solution to serve thousands of images. So far I have been able to set a Mapscript server with tilecache. Everything seems ok but when loading into Leaflet I got some kind of shift.

import os
from django.conf import settings
from django.http import Http404
from django.contrib.gis.gdal import SpatialReference

from TileCache.Service import Service
from TileCache.Layer import Tile
import TileCache.Layers.MapServer as MS
import TileCache.Layers.WMS as WMS
from TileCache.Caches.Disk import Disk

basedir = r"/tmp/somecache"

def get_eb_layer(name):
    mapfile = r"/dir/mapfile.map"
    svc = Service(
        Disk(basedir),
        {"raster": MS.MapServer("basic", mapfile, layers="raster", debug=False),}
    )
    return svc.layers[name]

def render_tile(name, z, x, y, extension='png', source_srs=None, dest_srs=None, bbox=None, scales=None, units=None):

    directory = basedir + '/' + str(name) + '/' + str(z) + '/' + str(x)

    if check_directory(directory):
        tile_path = directory + '/' + str(y) + ".png"
        if not check_for_tile(tile_path):
            layer = get_eb_layer(name)
            layer.source_srs = 'EPSG:4326'
            layer.dest_srs = 'EPSG:4326'
            tile = Tile(layer, x, y, z)
            img = layer.renderTile(tile)
            save_tile(tile_path, img)
            return img
        else:
            img = open(tile_path)
            return img
    else:
        print "Unable to create directory"

def check_directory(directory):
    if not os.path.exists(directory):
        os.makedirs(directory)
    return True

def check_for_tile(tile_path):
    if not os.path.isfile(tile_path):
        return False
    else:
        return True

def save_tile(tile_path, img):
    with open(tile_path, "wb") as f:
        f.write(img)

Here is the image:


texts: Accessing ArcGIS Resources for 10.3 and 10.4

texts:
I feel a stupid having to ask this question, but I have tried to find the new help pages for ArcGIS for a while now.

Usually I go to this page: http://resources.arcgis.com/en/help/ to find info about functions and such. And it contains information for 10.2 and older versions. However, I now have 10.3 on my computer, and while I suppose the differences aren't that huge I'd still like to use the updated version. (Would be so annoying trying to solve something, only to find out that it's not working because of an update.)

Nowadays, the linked page displays this text:

  ArcGIS 10.3 and 10.4 web help and administrative guides (such as
  system requirements and installation guides), are now available as
  part of the new ArcGIS websites. What remains on this website is an
  archive of older help systems.

Links to 10.3 and 10.4 only takes me to "What's new"-pages, and, after clicking around looking for "tools" and "documentation" and similar it then takes me back to the same page as above or info about functions in general.

It doesn't help that each page I try to load takes 3-4 minutes to display (maybe that's just me?).

TL;DR
All I want is to find the equivalent of this page http://resources.arcgis.com/en/help/main/10.2/index.html#//001700000050000000 but for 10.3.


texts: Make FeatureClass that has a FileGeodatabase data source editable?

texts:
I wasn't able to find any documentation on this, but is it possible to use the Editor widget in the Esri JS API to edit a FeatureLayer whose data source is that's stored in a FileGeodatabase?
I've tried using the widget to select and delete a feature, but nothing happens and there's no errors in the JS console.
I found a post on another forum suggesting it's not possible, but I didn't find any supporting documentation:

A feature layer can be editable if:

Your feature class (FC) data source is SDE


texts: Tree structure for a muticolored region quadtree

texts:
Is a B+ tree suitable for a multicolored region quadtree (for example, one segmenting a plot of land into several crops)? I recently purchased a copy of Samet's 'Foundations of Multidimensional and Metric Data Structures,' which, while containing a vast amount of insight, is more annecdotal than a Family Guy episode. What I've read through has not specifically stated that the B+ tree can only be used for binary images, but that has been the case of each of his examples.
If this structure is not a viable option, what would be a good alternative(s) to start reading up on? I'm less intersted in spatial efficiency and more concerned with update/retrieval speed and neighbor finding, if not implicit to the structure. If you have multiple suggestions, kindly do a brief compare/contrast? Thanks!


texts: Generate an empty large raster using GDAL?

texts:
Using GDAL, how can I simply create an empty single band raster? I can't seem to find out how. I know in PostGIS you can create a new table with a 'raster' column type, then insert a band into it. However I'm looking for a slick, GDAL solution (or another efficient non-PostGIS solution).

What I'm looking to create is a raster (GeoTIFF) with these settings:

format: -of GTiff

type: -ot UInt16 (16 bit unsigned integer)

cell resolution: -tr 5 5 (5x5m)

nodata: -a_nodata 255 (the values I intend to burn into this raster range from 1 to 10)

SRID: 27700

extent: -te 0 0 680000 1240000 (rectangular extent of Great Britain)

resulting raster would contain almost 34 billion cells (at 5x5m cell size)!


texts: Create TIN with modified resolution with arcpy

texts:
I have the polyline feature file myfeature.shp from which I create a TIN file:
import arcpy
arcpy.CheckOutExtension("3D")
arcpy.CreateTin_3d("mytin","Coordinate Systems\CH1903 LV03.prj", "myfeature.shp Contour softline", "constrained_delaunay")
arcpy.CheckInExtension("3D")

How can I affect the resolution? The parameter cellsize from environment as suggested in another case does not look like the parameter for this as my problem has nothing to do with raster.


texts: Creating bubble graphs in Carto using UK local authorities and Regions as the "Admin Region"

texts:
The data I have is a list of projects for which I have the following geographic information:

postcode
longitude and latitude
local authority
region (or country, eg Wales)

as well as other details for each project.

Dataset:

https://saira.carto.com/tables/fww_data_for_mapload1

I would like to create bubble map in Carto summing together project numbers according to UK local authorities and UK regions and countries.

map:

https://saira.carto.com/tables/fww_data_for_mapload1/map

So there should be one bubble for each local authority or region. For example using region: Northern Ireland would have the smallest bubble representing 71 projects and South East (England) would have the largest with 165 projects.

I tried to georeference the local authority and region but I get an error.

When I select the Bubble option from the wizard, the column drop down has only numerical values relating to each project. I can see no way of showing project numbers per "Admin Region".


texts: Selecting subsets of field to generate new field in ArcMap?

texts:
Aside from using code in the field calculator, how can one create a new field to have values based on another field?

For example I have a built-in field already which contains 0s and 1s and I want my new field to have 100 where that built-in field has 0 and 200 where the built-in has 1.


texts: Coordinate mismatch between Google Maps and Leaflet Using ESRI World Imagery

texts:
I mark a point on Google maps and get lat, lon values. When I put those values in my code which uses Vue2leaflet and ESRI World Imagery tiles from https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}, the coordinates seem to differ by ~20 meters.

Are they using different projections and/or datums? As far as I can tell, both should be using EPSG:3857 so I can't tell the source of the problem.

The coordinates I get from google maps is (lat: 40.836566, lon: 29.514314)

Google maps:

Leaflet:


texts: Why is ui.Slider throwing "a.toFixed is not a function" error message?

texts:
I'm trying to get the dates (YYYY) from the first and last images from a collection, let's say, Chirps. Next, I need to use these dates as the min/max parameters in a ui.Slider.
I made sure that i'm parsing Numbers to ui.Slider, even so, it's throwing an error message:

a.toFixed is not a function
in , line 6
in , line 1
in , line 13

Here goes the code.
var CHIRPS = ee.ImageCollection("UCSB-CHG/CHIRPS/DAILY");

var range = CHIRPS.reduceColumns(ee.Reducer.minMax(), ["system:time_start"]);

var firstImg = ee.Number.parse(ee.Date(range.get('min')).format('YYYY')); // 1981 - Number
var lastImg = ee.Number.parse(ee.Date(range.get('max')).format('YYYY')); // 2021 - Number

var sli = ui.Slider({
  min: firstImg,
  max: lastImg,
})

Map.add(sli)

Any idea?


texts: Getting "ERROR 000999: Failed to get raster"?

texts:
I'm trying create a raster with

arcpy.MosaicToNewRaster_management

and this message appears in the end of the process:

  Runtime error  Traceback (most recent call last):   File "", line 1, in    File "c:\program files
  (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 12384, in
  MosaicToNewRaster     raise e ExecuteError: ERROR 000999: Failed to
  get raster. Please check if the input parameters is correct. Failed to
  execute (MosaicToNewRaster).

My script is like this:

import arcpy
from arcpy import env

env.workspace = "C:\Users\user\Documents\ArcGIS\Default.gdb"
arcpy.MosaicToNewRaster_management("SG-21-Z-D.tif;SG-22-Y-C.tif;SH-21-X-B.tif;SH-22-V-A.tif", "marco", "marco.tif", "#", "#", "1", "BLEND", "#")

Should I change something?


texts: Create an optimized point layer derived from a road layer so that the driving distance between each point is x

texts:
Consider a classic state-wide or country-wide roadway network. I want to create a point layer, where each point is on the roadway network. This point layer will have each point separated by  its nearest neighbour by x km or y minutes.

As an addendum, Is it possible to upgrade the algorithm, so that the distance between any point and all its nearest neighbours is the same or as close to the same as possible and there for having the algorithm figure out what that magic distance is given a fixed number of points.

I'm open to suggestions on how to solve this problem. I have access to ArcGIS 9.3 (without network analyst), qgis 1.8 and postgis, python, and R. Most of my data is in SHP.

The goal behind this exercise is to determine how far is to locate antennas, infrastructure so that it is equidistant from all points on the network

Reflection on whuber's comment

I am trying to plan for proposed facility locations for a certain type of equipment on the highway network, in such a way that the driving distance distance between each one is x minutes, or the driving distances is y km.


texts:
I am currently working on a hydrology project where I am trying to break a stream network into 250m segments.  The problem is that the streams are not all adjacent, as I have clipped the NHD file to include only perennial streams in my watershed.  What I have been doing is taking these different, unconnected line features and merging them into one stream using editor.  I then have been using the "divide line by length" add in found here: http://www.arcgis.com/home/item.html?id=d5d27ee47330434b9a96b91136a0118f.

What this tool is doing however is spliting the whole set into 250m segments, but not necessarily keeping the new segments adjacent to each other.  The tool is combining segments that do not measure up to 250m with portions of other lines that also do not add up, but on totally unconnected streams.

I have also tried to use the split tool in editor.  I have been splitting by distance (250m), but it is only creating one new feature of that length, not breaking it up the entire merged stream.


texts: How to print two pagelayout on two sides at the same time ?

texts:
I am having a PageLayoutControl with name: PageControl1. I used below codes for printing it:

public override void OnClick()
 {
                try
                {
                    PrintDialog printDiag = new PrintDialog();
                    DialogResult res = printDiag.ShowDialog();
                    if (res == DialogResult.Cancel)
                        return;

                    ESRI.ArcGIS.Output.IPaper paper = new ESRI.ArcGIS.Output.PaperClass();
                    paper.Attach(printDiag.PrinterSettings.GetHdevmode().ToInt32(), printDiag.PrinterSettings.GetHdevnames().ToInt32());
                    paper.Orientation = PageControl1.PageLayout .Page .Orientation ;
                    PageControl1.Printer.Paper = paper;
                    PageControl1.PrintPageLayout(1, 1, 0);

                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message , null, MessageBoxButtons .OK , MessageBoxIcon.Exclamation );
                }

 }

And I have another PageLayoutControl with name: PageControl2. Do you know how to print these PageLayoutControl on two sides of one paper (only one click printing button) ? (PageControl1 on the front side, PageControl2 on the back side) ?

Thanks and regards,


texts: Does ArcGIS Desktop have similar tool to QGIS Clip raster by Mask layer which creates and outputs alpha band on request?

texts:
This QGIS tool creates an alpha band by clipping an image with a polygon.

https://docs.qgis.org/2.8/en/docs/user_manual/processing_algs/gdalogr/gdal_extraction/cliprasterbymasklayer.html

Is there an equivalent tool in ArcGIS 10x?


texts: Show content of layers in web map application

texts:
How can I show the layers used in ArcMap 10.1 such as .csv files, in published web map application?

When I publish the map it says:

  No layers found to display


texts: Python AddIns Installation Tool Not Showing After Double Clicking on makeaddin.py

texts:
I am using Python Add-In Wizard with ArcGIS 10.4.1 but after getting the files I am not able to create installation Wizard!

I tried to create the wizard by double clicking on the   looks like something running but No installation file generated at the directory! can you please let me know why this is happening?

  Update

import arcpy
import pythonaddins

class ButtonClass3(object):
    """Implementation for ESRI Addin Python_addin.button (Button)"""
    def __init__(self):
        self.enabled = True
        self.checked = False
    def onClick(self):
        pass

class ComboBoxClass1(object):
    """Implementation for ESRI Addin Python_addin.combobox (ComboBox)"""
    def __init__(self):
        self.items = ["item1", "item2"]
        self.editable = True
        self.enabled = True
        self.dropdownWidth = 'WWWWWW'
        self.width = 'WWWWWW'
    def onSelChange(self, selection):
        pass
    def onEditChange(self, text):
        pass
    def onFocus(self, focused):
        pass
    def onEnter(self):
        pass
    def refresh(self):
        pass

class ComboBoxClass2(object):
    """Implementation for ESRI Addin Python_addin.combobox_1 (ComboBox)"""
    def __init__(self):
        self.items = ["item1", "item2"]
        self.editable = True
        self.enabled = True
        self.dropdownWidth = 'WWWWWW'
        self.width = 'WWWWWW'
    def onSelChange(self, selection):
        pass
    def onEditChange(self, text):
        pass
    def onFocus(self, focused):
        pass
    def onEnter(self):
        pass
    def refresh(self):
        pass


texts: Interpreting GLDAS 2.1 precipitation data

texts:
I am trying to use the GLDAS 2.1 3-hourly precipitation datasets available at:

The dataset is documented here:
https://hydro1.gesdisc.eosdis.nasa.gov/data/GLDAS/README_GLDAS2.pdf

The data is available as NetCDF4 files, one file per time-step, for example:

GLDAS_NOAH025_3H.A20180208.0600.021.nc4
GLDAS_NOAH025_3H.A20180208.0900.021.nc4
GLDAS_NOAH025_3H.A20180208.1200.021.nc4

where 3H means 3-hour time step, A20180208 means the date 8th February 2018, 0600 means the time 6:00 UTC, 021 means the product version.
The NetCDF file contains a variable Rainf_f_tavg (Total precipitation rate) in units kg m-2 s-1.

What is not clear to me from the documentation is how to interpret the precipitation rate:

Is this the average precipitation rate between 6:00 UTC and 9:00
    UTC?
or is this the average precipitation rate between 3:00 UTC
    and 6:00 UTC?
or is this the averate precipitation rate between
    4:30 UTC and 7:30 UTC?

This information is critical for me if I want to correctly calculate accumulated precipitation for example how much rain+snow in mm has fallen between 7th February 2018 6:00 UTC and 8th February 2018 6:00 UTC.


texts: What s a good beginners default setting for grass?

texts:
I would like to define some business areas as a regular pattern within a polygon (e.g. I draw a polygon on a map and then create regular tiles of a certain length in it, while the tiles at the border are allowed to be cut).

Having Ubuntu, I thought I give GRASS a try. But when I start it, the Location Wizard (see help) confuses me:

What is this "Project Location"? Is it something like "Germany" or something like "/home/foobar" or a string defining the usecase? What will it be used for?

Then also the next dialogue:

Even with Wikipedia I'm not sure if I understand it:

  EPSG compiled and disseminated the EPSG Geodetic Parameter Set, a widely used database of Earth ellipsoids, geodetic datums, geographic and projected coordinate systems, units of measurement, etc.

Isn't the Latitude / longitude (e.g. 48.858222N, 2.2945E for the Eiffel Tower in Paris) the default for geolocations? Is that the spatial reference system?

Beginners Learnings

The "web default" reference system is called WSG84.
A reference system defines a coordinate system (e.g. Ellipsoidal coordinates: latitude and longitude)
It defines the shape of the earth: The 3 axes of the elipsoid
It defines a reference: WGS84 is relative to North America (I don't remember where I read this and I can't find it any longer, but it makes sense that due to tectonic plate movement we have to define one plate that is kept at the same coordinates and the others coordinates change)


texts: Another Student in Need of Career Advice

texts:
I would like to apologize in advance for asking yet another "what should I do with my life" type of question.

I am currently a senior who is very close to finishing up my B.S. in Information Systems. Over the past 5 months I have become very much interested in GIS, after taking courses in both Geology and Oceanography. I have been spending some time independently studying/learning application systems such as ArcGIS and Google Earth. I have noticed that most GIS related jobs are reserved for Geography, Architecture, and Environmental Sciences grads, which is obviously understandable being that the underlying principles of GIS are rooted in those disciplines.

My question is as follows: Do you feel that I would be considered for a position working in this field with an Information Systems degree, or should I move on to other aspirations?

I am considering completing a 9 course GIS certificate program offered at one of the local universities upon completion of my degree, though a GIS related internship would be great right now. Thank you for reading, and any bit of advice would be greatly appreciated.


texts:
I have a land mask file in netCDF (also in ascii, if needed) which basically consists of a lat/long pair and a boolean (1 or 0) determining if that value is over land or not. The thing is, I'm not really sure how to use this in my Java applications.

If I can create a WKT polygon from the boundary of land/water, that would be a huge help, but other wise I'm looking for answers on how to use the net CDF files in JAVA (I looked at the netCDF java stuff but wasn't sue how to use it for my purposes).

I grab points from another source and must determine if they are on land or not.


texts: Layout export from stand-alone PyQGIS script shows empty map

texts:
I have a problem with exporting of a QGIS layout by the pyQGIS. I have prepared the qgz project and also the qpt layout.

When I try to export the layout to PDF by QgsLayoutExporter.exportToPdf by calling python via the CMD, the resulting PDF is not prepared correctly (it has no map and scale bar is corrupted).This error is printed to the CMD window:

  ERROR 4: `path\to\output\directory\test.pdf' not recognized as a supported file format.

When I copy and paste the same code into the QGIS python console, resulting PDF is prepared correctly.

I tried the solution on Windows 10, QGIS 3.4 / 3.6 and on Ubuntu 18, QGIS 3.6. The behaviour is the same.

What am I doing wrong or is there a bug in the pyQGIS?

Here is my source code:

import sys, os
from qgis.core import *
from qgis.PyQt.QtXml import QDomDocument
from PyQt5.QtCore import *
from PyQt5.QtXml import *

os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = r'path\to\Qt5\plugins'
os.environ['PATH'] += r';path\to\apps\qgis\bin;path\to\apps\Qt5\bin'

# supply path to qgis install location
QgsApplication.setPrefixPath(r"path\to\apps\qgis", True)

# create a reference to the QgsApplication
# setting the second argument to True enables the GUI, which we need
# to do since this is a custom application

qgs = QgsApplication([], False)

# load providers
qgs.initQgis()

# Write your code here to load some layers, use processing
# algorithms, etc.

projectInstance = QgsProject.instance()
projectInstance.read(r'path\to\QGIS\project.qgz')

layout = QgsProject.instance().layoutManager().layoutByName("overview")
pdfPath = os.path.join('path\to\output\directory', 'test.pdf')
exporter = QgsLayoutExporter(layout)

imageSettings = QgsLayoutExporter.PdfExportSettings()
imageSettings.dpi = 300
result = exporter.exportToPdf(pdfPath, imageSettings)
print(result)
print(exporter.errorFile())

# When your script is complete, call exitQgis() to remove the
# provider and layer registries from memory
qgs.exitQgis()

This is the output prepared executing the code in the QGIS Python console:

This is the output prepared executing the code in the CMD:


texts: Converting polygons to contours based on value in polygon table

texts:
I have the following data and have been asked to create a map that shows the same data set but displayed as contours.

Each polygon has a value in it's table called "count". The "count" field is used to show the graduated colors.

How would I go about converting the polygon data set into "contour" lines.  I understand that these are not true contours and I'm not sure why "they" want to see it displayed this way, but I need to do it if I can.


texts: Are the functions in OGRPolygon accessible through the python bindings?

texts:
I'm currently trying to use the OGR python bindings to process some shapefiles. I want to obtain the number of interior rings in a polygon feature. Unfortunately I'm unable to use the documented function to get that information.

Here is my code:

from osgeo import ogr
field = ogr.Open("testExtract.shp")
lyr = field.GetLayer("testExtract")
feat = lyr.GetNextFeature()

geom = feat.GetGeometryRef()
featName = geom.GetGeometryName()
print featName
geoCount = geom.GetGeometryCount()
print "geoCount: " + str(geoCount)

print geom.getNumInteriorRings()
print geom.GetNumInteriorRings()
print geom.getNumInteriorRing()
print geom.GetNumInteriorRing()

This is what those print commands output:

POLYGON
geoCount: 6

AttributeError: 'Geometry' object has no attribute 'getNumInteriorRings'
AttributeError: 'Geometry' object has no attribute 'GetNumInteriorRings'
AttributeError: 'Geometry' object has no attribute 'getNumInteriorRing'
AttributeError: 'Geometry' object has no attribute 'GetNumInteriorRing'

Now, the only polygon in that shapefile has interior rings. And the python code is telling me that geom is a polygon with 6 interior and exterior rings, which is correct. And the documentation, http://www.gdal.org/ogr/classOGRPolygon.html#a3b996195adcf9fcd4f33570a37753dde, is saying getNumInteriorRings() is a valid function for an OGRPolygon.

So is the problem that GetNumInteriorRings() is not accessible through the python API? The python documention doesn't mention OGRPolygon as a class, just Geometry. http://gdal.org/python/osgeo.ogr.Geometry-class.html

Edit: I realize that each polygon only has one exterior polygon, so I can get that information. But I'm also interested in a couple of the other functions in OGRPolygon such as getInteriorRing (int) and getExteriorRing () so I am curious if those public member functions for OGRPolygon are accessible in Python.


texts: If I have a map of the U.S. with individual polygons at the county-level, and then in another layer, a set of points of interest, is there a way to tabulate how many POI per each polygon ("county") and export that data? I'd like to create a histogram showing how many POI per county there are for all counties.


texts: Raster to Ascii by python console in QGIS?

texts:
I'm working on PyQgis.

I have to convert a raster file to a file .asc. The classic procedure through the Qgis Menu is:

Raster -> Translate (convert format) -> on "Ouput file" select Arc / Info ASCII Grid.

Can this procedure be queried by the python console? What is the command?

EDIT

I tried to run:

processing.runalg('gdalogr:translate', '/path/to/raster.tif',100.0,True,None,0,'',None,False,5,4,75.0,6.0,1.0,False,0,False,None,'/path/to/output.asc')

But the result was:

Error: Wrong parameter value: None

Why?


texts: How to zoom to object on WMS layer with OpenLayers?

texts:
I have a map with WMS layer. And want to zoom to selected object. Now i use GetCapabilities from Geoserver and zoom to bbox of whole layer.
So how to do what i want?

Or can u tell me how to get feature bbox from Capabilities? Or how to get FeatureInfo without clicking on map?

UPDATE

                       info_id=myVecLayer.getFeaturesByAttribute("id",'5')
                       alert(info_id[0].geometry.getBounds());
                       app.mapPanel.map.zoomToExtent(info_id[0].geometry.getBounds());
                       //myVecLayer is WFS layer

Its do something strange. If feature shows in map window it will be zoomd to it. But if not shows get a error TypeError: info_id[0] is undefined. What is wrong?

UPDATE 2

Ok now this is Request method

                        info_id=OpenLayers.Request.GET({
                                    url:'http://localhost:8080/geoserver/wfs?service=wfs&version=1.1.0&request=GetFeature&typeName=cite:filedata_temp&featureID=filedata_temp.4',
                                    success: function(e){
                                    alert(e.responseText);
                                    }
                                });

its ok. But how to get bbox from there?

UPDATE 3

Now i use a GeoExt.FeatureStore to zoom to feature.
But i have a problem i try zoom_store.layer.getFeaturesByAttribute("id",'5'); and all work. But if i use variable zoom_store.layer.getFeaturesByAttribute("id",some_variable); i get error TypeError: info_id[0] is undefined. Why its heppening?


texts: Why can I not publish from -QGIS Geoserver plugin?

texts:
I am following the tutorial at http://qgis.boundlessgeo.com/static/docs/quickstart.html and I get to the step "To publish the project as it is, just select the QGIS project entry in the OpenGeo Explorer tree, and then click Publish.... You will see the following dialog:"

But 'Publish' is greyed out.

One oddity is that when I Add a Geoserver Catalogue I get a warning: Warning: Could not connect to the catalog at that URL

But I don't understand what this means.  Is there something else I need to configure on GeoServer?


texts: Processing arcobjects cursor is taking long time

texts:
I am maintaining a code on arcobjects 10.1, and there is a bug happening.
I have a code that is parsing through a cursor, and generate a where clause statement to run it on a second query.
So the code is like this

IFeatureCursor containsCursor = null;
IFeatureClass featureClass = null;
ISpatialFilter spatialFilter = new SpatialFilterClass();
IFeature tempFeature = null;

try
    {
        featureClass = workspace.OpenFeatureClass("tablename");
        spatialFilter.Geometry = operationalUnit.Shape;
        spatialFilter.GeometryField = featureClass.ShapeFieldName;
        spatialFilter.SpatialRel = esriSpatialRelEnum.esriSpatialRelContains;

        containsCursor = featureClass.Search(spatialFilter, true);
        tempFeature = containsCursor.NextFeature();
        String whereClause = null;
        String fieldName = tempFeature.Table.OIDFieldName;
        while (tempFeature != null)
        {
            if (tempFeature.HasOID)
            {
                whereClause = whereClause + String.Format(" and {0} <> {1}", tempFeature.Table.OIDFieldName, tempFeature.OID);
            }

            tempFeature = containsCursor.NextFeature();
        }

        (do something with the where clause)
    }
    finally
    {
        Helper.ReleaseObject(featureClass);
        Helper.ReleaseObject(tempFeature);
        Helper.ReleaseObject(containsCursor);
        Helper.ReleaseObject(spatialFilter);
    }

The loop that is generating the where clause is talking long time.
and when it is done, it tries to connect to the database, and the connection is dead.

Now, the funny thing is the slowness in only on the Dev server.
When I run it on my machine is fast.

This is my full details information

On my Dev server: It is a virtual machine, with Windows 2008R2
I run ArcGIS serer 10.1
I run the process binding to the Server, and to the server license.
I compile the process to run as 64 bit in order to bind to the server.

I access the database through Application Server SDE 9.3

P.S: I don't use direct connection (and we are not going to change the code to use it)

I measured the length of the statement, and on the server for 3500 records is taking > 45 seconds.

On my machine: my machine is Windows 7 with 8 gig Ram.
I run ArcGIS Desktop.
I compile the code to x86, and run binding to the desktop.

For the same amount of records it is taking < 4 seconds.

What is wrong there?


texts: Reclassifying "service area" in ArcGIS Desktop?

texts:
I have created service area from few point, and now I would like to reclassyfy it, but when i try to do it I can see the message:

  ERROR 000864 Input raster: The input is not within the defined domain.

  ERROR 000863: Invalid GP data type

but on this picture of process I can see that this is possible to do: http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?id=4850&pid=4849&topicname=Understanding_reclassification How can I do it?

I am using ArcGis10.

The process that i took is as follows:

pioints+network
created service area, but i would like to reclassify the data
i guess now i should use option "convert polygon to raster" to be able to reclassify
but then i need to "union" and the problem is that the input data can only be polygons


texts: How to get the Flow or directional raster map using GRASS?

texts: Aside from using r.fill.dir in GRASS, is this the script to produce the Flow or directional raster map? Is the output for the script the following graphic? http://grass.fbk.eu/grass63/screenshots/images/drastarrow.png


texts: Merging polygons of single feature using QGIS?

texts:
I am new to QGIS and have done some research on this topic before posting but not sure I found an answer.

I have one feature that has multiple polygons (islands of a nation). In reality, there is only one island, but my file has split the island into two polygons. I have turned on editing mode and selected the nodes of the one island and moved the polygon so it is adjacent to the other polygon, but now I have a line down the middle.

Is there a way either merge the polygon into one, or remove the line down the middle or some other way of accomplishing this?


texts:
I have a table of 150 records which I was able to geocode except for 21 points. I'm able to manually geocode the rest of these 21 points. Every time I add the point, it creates a new row (which I know is normal). Is it possible, however, to add the point to an existing row? I have 62 fields in my attribute table, so I'd like to avoid copy and pasting.

Here is what my table looks like (This is is a copy of my attribute table exported into excel):

So far, I've created a shapefile with all the the unmatched points plotted with an ID number as the only attribute. I was thinking that I could add the ID number to the my already geocoded data and join the two sets together.


texts: How to add extent to OpenLayers map in AngularJS

texts:
I am using AngularJS and angular-openlayers-directives to make a simple map, now I saw this simple example online HERE.

I just wanted to modify the code, to add an extent so that layers beyond a certain dimension would not be loaded, so my code looks as follows:

var coordinate1, coordinate2,
coordinate1 = ol.proj.fromLonLat([77.6013, 12.9044]),
coordinate2 = ol.proj.fromLonLat([77.6885, 12.9536]),
latlon = ol.proj.fromLonLat([77.6244159, 12.9370699]);

app.controller('DemoController', [ '$scope', function($scope) {
    angular.extend($scope, {
        quebec: {
            lat: latlon[0],
            lon: latlon[1],
            zoom: 5
        },
        bing: {
        extent:[coordinate1[0], coordinate1[1], coordinate2[0], coordinate2[1]],
            source: {
                name: 'Bing Maps',
                type: 'BingMaps',
                key: 'Aj6XtE1Q1rIvehmjn2Rh1LR2qvMGZ-8vPS9Hn3jCeUiToM77JFnf-kFRzyMELDol',
                imagerySet: 'Road'
            }
        }
    });

} ]);

See how I am generating the coordinates:

var coordinate1, coordinate2,
coordinate1 = ol.proj.fromLonLat([77.6013, 12.9044]),
coordinate2 = ol.proj.fromLonLat([77.6885, 12.9536]),
latlon = ol.proj.fromLonLat([77.6244159, 12.9370699]);

and using them in the following fashion :

quebec: {
     lat: latlon[0],
     lon: latlon[1],
     zoom: 5
   }

and also here:

extent:[coordinate1[0], coordinate1[1], coordinate2[0], coordinate2[1]]

Now this does't work, if I remove the extent parameter, I realize the map is somewhere in the Arabian sea, which is not the coordinates I have specified. So Where am I going wrong here and how do I specify extent using the angular-openlayers-directive?


texts: Raster cleanup eraser fail in ArcGIS for Desktop?

texts: I am running ArcGIS 10.3 ArcScan and trying to clean up a raster prior to vectorisation. The raster was a three band raster converted to greyscale using the 'Greyscale function', classified into 2 bands using the Symbology tool and saved as a new raster tiff in a folder (for this method see How can I flatten a multi-band raster to a single-band raster in ArcMap 10.2?). I can vectorise the raster using ArcScan, but I need to clean it up first using Raster Clean and the Raster Painting tools. When I try to clean it up the eraser appears to work, but when I let go of the mouse button all the erased pixels reappear. Nothing I can do seems to help. I have tried moving the tiff into the same folder as the shapefiles I am editing and will use for vectorisation. I have also tried exporting the tiff and shapefiles to a gdb. I don't know if this is because this was a greyscale raster that is then classified into 2 bands for vectorisation, or if there is some crucial step I am missing that would allow me to clean up my raster in ArcScan.


texts: Getting Minimum and Maximum Values of Raster Layer using QGIS Raster Calculator

texts:
I try to work with the minimum and maximum values of a raster layer in the raster calculator in QGIS 3.6. I try to do the following formular:

(  @RasterCellValue  -  @RasterMinValue  )  /  (  @RasterMaxValue  -  @RasterMinValue  )  * 65535

Is there a way to get the Min and Max Values from a raster layer into the formular?

When I use the GDAL Raster Calculator Tool and choose the option "Pre Calculated Value" instead of "Value" (marked yellow in the image below) the tool still calculates with the "Value" instead of "Pre Calculated Value" (see second image of the protocol).


texts: Adding vertices to existing lines where they intersect using ArcPy?

texts:
I need to add vertices to existing lines at intersections, something like this:

I want to do this automatically, by Python script. I can get the coordinates (x,y) of intersections in very simple way:

fc = "outputLayer.shp"
cursor = arcpy.da.SearchCursor(fc, ["OID@", "SHAPE@"] )
for row in cursor:
    x, y = row[0]
    listXY.append([x,y])

I can get ID lines too.
If I have coordinates, how to add vertex at exisiting line?


texts:
I have recently started development with SAGA and have run into some difficulties.

I have checked out the svn code base and have successfully compiled in VS-10 (except the project ViGrA).

Now I just want to create a new project and begin my development. I already have a project with some modules. I have checked the entries for them in the required MLB_interface.cpp. The project was supposed to be ready for a batch build, so I just added it as an existing project to the full saga solution.

When I build this new project I get errors like:

  error LNK2001: unresolved external symbol "__declspec(dllimport)
  public: static class CSG_String __cdecl CSG_String::Format(unsigned
  short const *,...)" (__imp_?Format@CSG_String@@SA?AV1@PEBGZZ)

for all of my module cpp/obj files.


texts: Transforming time series gridded meteorological data from .csv file to multiple .shp files (one per date) with pyQGIS

texts:
I downloaded gridded meteorological data as .csv file from the JRC CGMS database for a territory of interest. The file has data for predefined point locations over the territory in a regular-spacing grid. The data are daily and cover a period, say 1 year. So, in the .csv file there is a separate row for each combination of point and date (for example, we have 365 rows for the same point, each with data for particular date; then the next 365 rows for the next point. etc). The data also include geographic coordinates of the points.

I would like to automatically handle such data with the final goal of obtaining, let say, 365 shapefiles, each containing meteorological attributes from the .csv for a single date for all points.

Sample of the data (1 month; 2 points only) can be obtained from this link:
https://www.dropbox.com/s/0v5764swgewsdrd/Gridded_AgroMet_Data_Europe_ver2_0_sample2.csv?dl=0

What I tried so far is to open the .csv file in QGIS and export as a point shapefile. This shapefile, however has, for each point, 365 features lying on top of each other. I want a python script to select features based on the 'DAY' attribute end export in new shapefile. And I want this procedure to iterate over all unique values of the attribute 'DAY'. So far my script is just that:

shapefile = iface.activeLayer()
selection= shapefile.getFeatures(QgsFeatureRequest().setFilterExpression("\"DAY\"='20150101'"))
shapefile.selectByIds([s.id() for s in selection])

How to continue from here? How to export the selection? How to iterate between dates?


texts: QGIS 3.0 incompatble with Openlayers and Quicmapservices plugins

texts: Those plugins are very useful to my work, especially the satellite images. Now that I upgraded QGIS to the 3.0 version, they are not available anymore. How can I get back the content of those plugins?


texts: Overpass API: Find road intersection points with defined line

texts:
I have a geometrical line and I would like to have all intersection points where this line passes roads.

So far I have a line, defined by coordinates. I am looking for all intersection points with roads:

way(40.73792521975707,-74.00163173675537,40.743062717636114,-73.98819923400879);
   (way["highway"~"primary|secondary|tertiary|trunk|service|residential"];
    node(w););
out meta;

As an output I expect a series of points where this line crosses roads and such.

https://overpass-turbo.eu/s/BZB


texts: Applying symbology to Folium (Leaflet) polygon layers

texts:
I am trying to create a Folium map in Python that includes multiple polygon and line layers. I would like to be able to change the symbology of each layer to differentiate it from the others. I've tried to use the style_function, but that didnt seem to work. Is this possible?

style = {'fillColor': '#f5f5f5', 'lineColor': '#ffffbf'}

folium.GeoJson(prop_bnd_pth, name='Property Boundary', style_function=lambda x: style).add_to(map)
folium.GeoJson(stands_pth, name='Stands', style_function=lambda x: style).add_to(map)

I understand that both of the folium.GeoJson functions call the same style, but neither of them change in the map. They have the default blue symbology.


texts:
I have a windows form which opens with my ICommand, referenses IApplication and does some staff with it( it is not relevent ). The problem is that I want it to be onTop within ArcMap, and minimized if ArcMap is minimized. Two obvious solutions doesn't satisfy my requirements.

Set form's Topmost = true. (Stays on top even if ArcMap is minimized.)
Use DockedWindow. I have actually around dozen of such forms, I don't want to change all the projects structure due to such minor requirement.

Is there a way to make windows form be "adopted" by ArcMap window?


texts: How to make a database to be a model parameter in QGIS?

texts:
I built  a model in QGIS that imports vector into PostGIS database. My only problem is that I can choose which database I would like to import my data into but only if I rightclick on the model and edit it. (There is a drop-down list and I can choose.)

Is there a way to make it to be a model parameter (drop-down list) so that it won't be neccesary to edit the model every time I would like to choose a different database for the model?


texts: Georeferencing using GDAL geotransform top left corner coordinates

texts:
Following this stack exchange example by kflaw, and other examples of the use of geotrasform I am trying to georeference images using pre-computed extent rectangles. However, I am also struggling to correctly position the top left corner. Currently the level of offset increases with capture angle (from north).

Where the capture angle is small, the level of offset is minimal:

What is the correct method for determining the top left coordinates? are they pre or post rotation?

# import sys
# print(sys.path)
from osgeo import gdal, osr
import math

# Camera parameters (constants)
sensorWidth = 36
focalLength = 34.2
imageWidth = 8688
imageHeight = 5792

# Dict of test images
images = {
    # '20180319_091011_029A7639':{ #1
    #   'easting': 1580650.51,
    #   'northing': 5231861.27,
    #   'angle': 105.49,
    #   'altitude': 796
    #   },
    '20180319_092454_029A7649':{ #12
        'easting': 1575143.35,
        'northing': 5224588.46,
        'angle': 346.8,
        'altitude': 715.6,
        'width': 753.31,
        'height': 502.18
    },
    # '20180319_102352_029A7720':{ #83
    #   'easting': 1578520,
    #   'northing': 5212668.253,
    #   'angle': 2.24,
    #   'altitude' : 381.1
    # }
}

# Selected image
image = '20180319_092454_029A7649'

# Set the source and output paths and filenames
src_filename = image+'.tif'
dst_filename = image+'_ref.tif'

# Get the x and y coordinates of the centroid
x = images[image]['easting']
y = images[image]['northing']

# Get the flight vector
inputAngle = images[image]['angle']

# # Compute the GSD as a function of height, image size and camera specifications
# cellSize = ((sensorWidth * images[image]['altitude'] * 100) / (focalLength * imageWidth)) / 100
# print('GSD',cellSize)

cellSizeX =  (images[image]['width']) / imageWidth
cellSizeY = (images[image]['height']) / imageHeight

# Work out the projected dimensions of the image
width = cellSizeX * imageWidth
height = cellSizeY * imageHeight

# Calculate the x and y scale and skew
angleRadians = math.radians(inputAngle)
scalex = cellSizeX * math.cos(angleRadians)
skewx = -cellSizeX * math.sin(angleRadians)
skewy = -cellSizeY * math.sin(angleRadians)
scaley = -cellSizeY * math.cos(angleRadians)

# Find the coordinates of the upper left corner of the image
upperLeftX = x - width / 2
upperLeftY = y + height / 2
# upperLeftVal = RotateXY(upperLeftX,upperLeftY,x,y,inputAngle)

# Opens source dataset
src_ds = gdal.Open(src_filename)
format = "GTiff"
driver = gdal.GetDriverByName(format)

# Open destination dataset
dst_ds = driver.CreateCopy(dst_filename, src_ds, 0)

# Specify raster location through geotransform array
gt = [upperLeftX, scalex, skewx, upperLeftY, skewy, scaley]

# Set location
dst_ds.SetGeoTransform(gt)

# Get raster projection
epsg = 2193
srs = osr.SpatialReference()
srs.ImportFromEPSG(epsg)
dest_wkt = srs.ExportToWkt()

# Set projection
dst_ds.SetProjection(dest_wkt)

# Close the files
dst_ds = None
src_ds = None


texts: Suitable Raster processing methods to extract field boundaries from images

texts:
I'm trying to extract field boundaries and features from a lot of aerial images of agricultural land - and avoid digitizing these features manually. I've managed to get a crude raster file of the features that I want by manipulating the threshold colour values in GIMP and geocoding the resulting .tif in QGIS.

The nine broad contour lines are what I want to extract (and clean up a little) but more importantly I want to remove the randomly distributed noise seen in the middle of the fields. After cleaning the image I plan to convert to a vector and clip the existing farm boundary with it.

I am at a loss as to how to process these data?

I have both QGIS 2.8.1 and GRASS 7 available.


texts: Slow performance clipping raster with GDAL

texts:
I have a few large LiDAR DEMs that I want to merge. Each DEM has some glitches around the borders which need to be removed in order to get a seamless final product. I manually traced around each DEM to create a polygon which excludes the glitchy areas. I am using gdalwarp to clip the raster files, but I am experiencing very slow performance.

The rasters are between 3 and 10 GB, which I understand is pretty big… however I have ~3 ghz of processing power & 4GB of RAM. These rasters load into QGIS quickly and are quick to refresh. I can derive a hillshade or slope raster from one of these DEMS in 2 or 3 minutes.. so it seems unreasonable when it takes 4-6 HOURS to clip one of these rasters with gdalwarp.

Can anybody offer an explanation of what might be going on?

I am also bothered by the very large file sizes (up to 4x larger than the original) which result from the clipping. Research suggests that this is a compression issue, but gdalinfo does not return any compression info for any of the original rasters, and even when I compress the files are still 2x larger than the originals. Could there be any reason for this other than compression?


texts: Is it possible to open below code on PyQt Designer?

texts:
I want to add some design via PyQt Designer to below GUI:
class Ui_MainWindow ( object ) :
    def setupUi (self, MainWindow) :
        MainWindow.setObjectName ( "MainWindow" )
        MainWindow.resize ( 519, 354 )
        self.centralwidget = QtWidgets.QWidget ( MainWindow )
        self.centralwidget.setObjectName ( "centralwidget" )
        self.pushButton = QtWidgets.QPushButton ( self.centralwidget )
        self.pushButton.setObjectName ( "pushButton" )
        self.pushButton_2 = QtWidgets.QPushButton ( self.centralwidget )
        self.pushButton_2.setObjectName ( "pushButton_2" )

        self.layout = QtWidgets.QGridLayout(self.centralwidget)
        self.layout.addWidget(self.pushButton, 0, 0, QtCore.Qt.AlignHCenter | QtCore.Qt.AlignBottom)
        self.layout.addWidget(self.pushButton_2, 1, 0, QtCore.Qt.AlignHCenter | QtCore.Qt.AlignTop)

        MainWindow.setCentralWidget ( self.centralwidget )
        self.retranslateUi ( MainWindow )
        QtCore.QMetaObject.connectSlotsByName ( MainWindow )

Is it possible to open this directly on PyQt Designer?


texts: OpenStreetMap - only administrative regions

texts:
I'd need to display a map that shows only administrative regions level 1 for whole world. Is this doable with OpenStreetMap? I don't want any other data like roads, topology or similar to bi visible - only boundaries of administrative regions.

I'm new to GIS, so any guidelines will be helpful.

Project is commercial, so I'd need something that's free for commercial use.


texts: Calculating distance in WGS84 (MySQL and Geoserver)

texts:
Here is the environment in which I work:

An application using geo-referenced data
Database MySQL 5.5, storing georeferenced points
A Geoserver server, connected to the MySQL database

Here is the context (common to many people):
I have to calculate the distance between two points stored in my DB (and better, I want all the points within a known distance)

I have searched about the methods available to me on the net, and here are my results:

MySQL: I can use the method GLength of the LineString type , but the result is in degrees, which is useless. In addition, the SRID (mine is 4326) can not be used.
WFS protocol: I can connect to GeoServer WFS with a query, but currently there is an open issue with DWithin method (the one that interests me), indicating that the parameter "unit" cannot be used (http://jira.codehaus.org/browse/GEOS-937).
WPS protocol: I saw a method "Distance". But there is little information, and this method does not seem to use a calculation method that suits me (https://wiki.state.ma.us/confluence/display/massgis/GeoServer+-+WPS+-+Distance).

I have not found other potential solutions.

Are there errors in the results that I described?

I cannot install and use PostgreSQL. I know that it can be done with it.


texts: What is difference between ArcSDE and spatially enabled databases?

texts:
When would you want to use ArcSDE (available as ArcGIS Server Basic license level) versus a spatially enabled database?

What are the trade-offs on either side?

What are the benefits on either side?


texts:
how to set such scale in km on a map in geopandas as in the picture below.

I am using geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres')) map.

thanks


texts: QGIS spline plugin tool cannot be imported

texts:
I'm using QGIS 3.10.14 and installed the spline plugin for digitizing curves. However, I get the error message below when I try and load the spline plugin.
Traceback (most recent call last):
  File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 335, in startPlugin
  plugins[packageName] = package.classFactory(iface)
  File "C:/Users/seansuzedielois/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\spline\__init__.py", line 24, in classFactory
  from .splineplugin import SplinePlugin
  File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 685, in _import
  mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/seansuzedielois/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\spline\splineplugin.py", line 26, in
  from qgis.core import QgsWkbTypes, QgsMapLayerType
 ImportError: cannot import name 'QgsMapLayerType' from 'qgis.core' (C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\core\__init__.py)


texts: Merge Point Data and Raster using ST_SetValues in PostGIS

texts:
I'm trying to merge a point dataset with a raster dataset using Column X / Row Y.

I have written a tool which generates a raster and, from that raster, I have created grid points with St_PixelsAsCentroids(). These pixel centroids then undergo their own analysis (see image below) which I then want to merge back onto the raster. I know I can do this using geomval and ST_SetValues() but was wondering if there was a quicker way to relate back to the original raster's Column X / Row Y?


texts:
I am having an issue with a branching model when the iteration tool is used. The test code/scripts/models are in Google docs or arcgis forums

It runs and creates both versions of the process whereas it should only have either _GradedNULL or GradedDown. The test is simple and works.

The reason to do this is that the grading down set of processes takes a few hours to complete on each of the input text file and each area has more than 70. So if this branching worked it would save days of processing time.


texts: Reading in a single polygon from a shapefile

texts:
I have a shapefile/GML file with many thousands of polygons insides a specific layer.

I know the set of IDs that reference the set of polygons that I want to get the coordinates data from. Is there a way to get just this information easily, without having to load the whole shapefile layer into memory first?

I am currently using R with the rgdal package to load the shapefile/GML file, but am happy to look into other tools that might be able to help.


texts: How to get ECW support on QGIS 2.16 - Ubuntu 16.04?

texts:
after several attempts I am still not able to enable ECW support on QGIS on Ubuntu Xenial.

Before updating to latest version of Ubuntu, solution proposed here worked for me on the same machine, but now it fails to complete the

gdal-ecw-build

command.

I tried several version of ecw sdk, but it always ends with a series of errors, where the last one is:

make: *** [ecwdataset.o] Errore 1

I also tried to change the gdal-ecw-build script adding a flag as suggested here, but without any effects.

Some info about my setup:

GCC version: 5.4
GDAL version: 2.1
QGIS version: 2.16.2


texts: QGIS Numerical Digitize button always greyed out?

texts:
Trying to use Numerical Digitize 0.3.0 in QGIS 2.18.15. I have both that plugin and Numerical Vertex Edit installed, and I can see both icons (greyed) on the Digitize toolbar.

I create a new point layer, enable editing, and click the Add Feature button. Both of these buttons remain grey and unclickable.

I realise that this isn't a support site for these plugins, but am I doing something wrong? If not, we may want to address the fact that use of these plugins is the accepted solution for a number of other questions...


texts:
I have problem with the Geoserver.

I have a layer (called "cities") which contains points with attributes.
(ID, Name, Layer, etc....)
I'd like to write out all the names (at now it doesn't matter if overlap eachother).
In the geoserver the points showed correctly but the text-s are missing. Under an exact zoom level the all text shown correctly but above that level nothing. Just the marker point.

This is my SLD:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
    xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
    xmlns="http://www.opengis.net/sld"
    xmlns:ogc="http://www.opengis.net/ogc"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <NamedLayer>
    <Name>Point with styled label</Name>
    <UserStyle>
      <Title>GeoServer SLD Cook Book: Point with styled label</Title>
      <FeatureTypeStyle>
        <Rule>
        <ogc:Filter>
         <ogc:PropertyIsEqualTo>
           <ogc:PropertyName>layer</ogc:PropertyName><![CDATA[
]]>
           <ogc:Literal>17</ogc:Literal>
         </ogc:PropertyIsEqualTo>
       </ogc:Filter>
          <PointSymbolizer>
            <Graphic>
              <Mark>
                <WellKnownName>circle</WellKnownName>
                <Fill>
                  <CssParameter name="fill">#FF0000</CssParameter>
                </Fill>
              </Mark>
              <Size>6</Size>
            </Graphic>
          </PointSymbolizer>
          <TextSymbolizer>
            <Label>
              <ogc:PropertyName>textstring</ogc:PropertyName>
            </Label>
            <Font>
              <CssParameter name="font-family">Arial</CssParameter>
              <CssParameter name="font-size">12</CssParameter>
              <CssParameter name="font-style">normal</CssParameter>
              <CssParameter name="font-weight">bold</CssParameter>
            </Font>
            <Fill>
              <CssParameter name="fill">#000000</CssParameter>
            </Fill>
            <VendorOption name="spaceAround">-10</VendorOption>
            <VendorOption name="maxDisplacement">1</VendorOption>
          </TextSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

Is there any basic restrictions to the labels or any default settings?
Thanks! :)

Update:
I updated the SLD with the "conflitresolution".
In the attached image you can see, nothing happened.
Originaly the basic map created in Arcgis. The cartographer who originaly (a few years ago) created the map placed every single label to the right place (that time they made paper maps not webmaps). Now I'd like to put almost every label back to their place. The original shape has different layer to bigger and smaller cities and exact anchor point, angle, font size ect....
So that is why I'd like to show all label at the same time and scale, because the layera are scale dependent.

Thanks again :)

Update 2:
I tired Mario's code but still the same problem :/


texts: I can see the move tool. But coming across versions, i did not see any Rotate tool in Quantum GIS. As a hardcore feature editor myself, i have found it rather difficult. Am i missing something obvious?


texts: Which version of mapbasic to use for maximum interoperability with different mapinfo versions?

texts:
The oldest mapbasic download offered by pbinsight these days seems to be version 9.5.  I wonder can all subsequent versions of mapinfo run compiled code written with this?

If so, is an older (and hence more compatible) version of mapbasic available anywhere?

If not, which version is the best bet for a new application, without wanting to shut out potential users who don't have the latest version of mapinfo?


texts: Export ArcGIS Feature Class to CAD produces overlapping polygons

texts:
I'm experiencing problems when exporting a polygon feature class:

The original feature class has no overlapping polygons (as shown below, image 1), it's been topology checked, so no potential errors here.
I copy the relevant field from my feature class to a text field named "Layer", in order for the attributes to be available in the DXF.
I export to DXF as shown below (image 2)
the DXF produced contains overlapping polygons for all original features that were island-like (fully within another feature) as shown below (image 3).

Is there a way to prevent this from happening?

I'm using ArcGIS 10.3 with an advanced license.


texts: Looking for a good solution to have GPS position on KMZ files on Android platform

texts:
I'm looking for the best solution / app on the android platform to show my GPS position over a KMZ file, possibly offline.
Here is what I've tried to do:

Google Earth Android app

I downloaded KMLZ to Earth app and Google Earth app. Now I can open my KMZ files stored in a Google Drive with Google Earth, but GPS position seems to be not accurate. Also KMZ file doesn't look very well.

Maps Engine Android app

I manage in converting my KMZ file to Google MapsEngine. You can find how to looking at my answer here. Now the GPS position is ok, vector drawing is ok too, but I need to be always online.

Other apps

I've also tried many KMZ viewer, but got some problems opening my files on most of them, and none of these apps seems to be very good.

Can anybody suggest a better solution/app?


texts: ArcGIS Viewer for Flex - multiple feature services

texts:
I have two operational feature service layers in the flex viewer config.xml file, when I try to load both layers I get this error:

  Office Locations layer failed to load: Fault code: 500 Fault info: An
  unexpected error occurred processing the request. Fault details:

Interestingly, I can comment out either of the two layers (leaving only one operation layer), which allows me to edit with no error.  Both layers are coming out of the same SDE database.  Why can I not edit both layers?  My geometry service has a min/max of two instances.  Here is my code.

    <geometryservice> url="http://MyServer/arcgis1/rest/services/Geometry/GeometryServer"</geometryservice>

         <operationallayers>

            <layer label="Office Locations" type="feature" visible="true"
                   url="http://MyServer/arcgis1/rest/services/WICKSflexOffice/FeatureServer/1"/>
            <layer label="Industrial Parks" type="feature" visible="true"
                   url="http://MyServer/arcgis1/rest/services/WICKSflexIndustrial/FeatureServer/0"/>

        </operationallayers>

Thanks


texts: How to get cell size of raster shown in ArcMap using ArcGIS Engine and C#?

texts:
As the figure shows above, after classifying the raster, we can get the cell size by opening the raster Properties to its Source tab, and we can calculate the area by mutiplying the cell count and the cell size.

How can I get the cell size using C# instead?


texts: Differences in counted population between raster and polygonized values - QGIS

texts:
I'm slightly puzzled with the "polygonize" tool in QGIS. I'm working on population data, and therefore have clipped the NASA SEDAC Population count raster to my country of interest (Mozambique).

When I run the zonal statistics tool, the sum of all pixel values equate to 22'177'510 inhabitants. For the purpose of my analysis, I need to polygonize the pixels so I can move on using vector analysis tools. Therefore I've used the "raster pixels to polygons" in the processing toolbox, this does not ask for the cell size of the raster.

In the layers properties i have this information for the raster:
Width   1075
Height  1744

When I run the statistical summary (sigma icon on the toolbar menu) on my new polygonized layer, the pixels value now equate to 22'244'500. It is a slight difference but still, I don't understand this difference. It could be due to a difference in cell dimension, where the tool creates more polygons than pixels, hence this difference in population.
Both layers are projected in UTM Zone38S EPSG 5629.


texts: Return list of selected items of QListWidget PyQt QGIS

texts:
I'm a little bit confused (I'm a newbie) on how to get a list of just the selected Items of a QListWidget (in a QGIS plugin).

I set up the manageGui function in this way:

def manageGui(self):

    selectedLayers = []

    # Trying to set up the listWidgetView
        self.listWidget.setEditTriggers(QtGui.QAbstractItemView.DoubleClicked|QtGui.QAbstractItemView.EditKeyPressed)
        self.listWidget.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
        self.listWidget.setViewMode(QtGui.QListView.ListMode)

        # Load the layers in the listWidget
        layers = []
        for i in QgsMapLayerRegistry.instance().mapLayers().values():
            #load only POLYGON layers, to filer out useless layers
            if i.geometryType() == QGis.Polygon:
                self.layers.append(i.name())

        # Populate the listWidget with all the polygon layer present in the TOC
        self.listWidget.addItems(self.layers)

        #put the selected layers in a list
        selectedLayers = self.listWidget.selectedItems()

but the listWidget.selectedItems() seems empty. If I print selectedLayers I just get [].

I also tried to run a loop over the listWidget:

        #popultate the list with only the selected layers of the list
        for item in self.listWidget.selectedItems():
            self.selectedLayers.append(item)

but it doesn't work neither, always and empty list.


texts: Coordinates from a SQL Server Inserts don't Show Results

texts:
I am trying to parse a JSON output file from an .Mxd file. All work fine and the following SQL Insert in SSMS using sample coordinates:

  delete from RoomData
  insert into RoomData (Building_ID,Room,Shape) SELECT 1,'IrfanRoom',geometry::STPolyFromText('POLYGON ((531405.73999977112 104148.89000034332, 531414.71999979019 104179.65999984741, 531407.15999984741 104182.27999973297, 531406.94000005722 104182.35000038147, 531404.44000005722 104177.02000045776, 531401.59999990463 104168.5, 531401.59000015259 104168.47000026703,531401.48999977112 104168.19999980927,531395.61999988556 104152.19999980927,531405.73999977112 104148.89000034332))',4326)

DOES work in the sense that the ArcGIS Service page's query do return results and SSMS does show correct spatial data.

But..when I use some actual data coordinates in the above query, then the Service page doesn't return any results even though SSMS still does show correct spatial results. Here are the problematic coordinates:

 -9221155.6771000009 4120370.621299997,-9221155.0048999991 4120376.1005999967,-9221149.4818999991 4120375.4167999998,-9221150.1541000009 4120369.9375,-9221155.6771000009 4120370.621299997

What is happening here? I have tried srid of both 4326 and 3857 in the SQL inserts but still no luck. I don't have a great understanding of these coordinates and have been stumped for quite a while now. One clue is that any data with the actual coordinates don't load in ArcMap because I get error like 'coordinates exceed...'.

Edit: My data's projection, as seen in the .MXD is:

WGS_1984_Web_Mercator_Auxiliary_Sphere
Projection: Mercator_Auxiliary_Sphere
False_Easting:  0.00000000
False_Northing: 0.00000000
Central_Meridian:   0.00000000
Standard_Parallel_1:    0.00000000
Auxiliary_Sphere_Type:  0.00000000
Linear Unit:    Meter


texts: Summing number of pedestrians who use route using ArcMap and Network Analyst

texts:
I am using ArcMap 10.6 and Network Analyst.
I have multiple points (origins) which will travel to one destination. every point has number of people who will travel to that point. I used closest facility as a solution here.
How can I calculate how many people in every segment?
For example, if segment A has 100 people and segment B has 20 people and they intersect/combined into one segment. This new segment should have a value of 120 people. I tried to benefit from  Summing multiple routes using ArcGIS Network Analyst? but that has not helped so far.
Any idea?


texts: How do I save an ArcMap map document using VB.Net?

texts:
I am trying to save the map document that is currently open. How do I write the code? I have tried many suggestions that I found using Google searches, but nothing works. Currently I have:

Dim clickedDoc As IMapDocument = My.ArcMap.Application.Document
clickedDoc.Save(True, False)

which causes ArcMap to crash. I did get it to work with some other code, but it wouldn't actually save.

Also, this should be a background job. So no save dialog should come up.


texts: Setting constant input layer in QGIS modeler?

texts:
I have a model in QGIS where there are two vector layers that remain the same everytime I execute a model.

Is there a way that I can configure my model so that these layers don't require the user to "input" them. Ideally I could point to their location in my model file and not need the user to even know about them. Maybe you can do this already but I can't find the tool I need in the processing toolbox.


texts: I have a Spatialite database with points. From time to time now points are added. What would be the easiest way to remove duplicates based on the coordinates?


texts: DLL load error with Gdal polygonize in QGIS 1.8 (windows 7)

texts:
Possible Duplicate:
  Qgis polygonize problem - DLL load fail

[I had already posted this question, but was closed and redirected to a supposedly duplicate question. I'm re-posting since I believe this is note exactly the same case.]

I'm getting the following error message when I try to use the polygonize tool in QGIS 1.8 (windows 7):

Traceback (most recent call last):
File "C:\PROGRA~2\Quantum GIS Lisboa\bin\gdal_polygonize.py", line 34, in
import gdal, ogr, osr
File "C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages\gdal.py", line 2, in
from osgeo.gdal import deprecation_warn
File "C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages\osgeo__init__.py", line 21, in
_gdal = swig_import_helper()
File "C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages\osgeo__init__.py", line 17, in swig_import_helper
_mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: DLL load failed: No se encontró el proceso especificado.

I have already tried or checked the following with no success:

Making sure there is no PYTHONPATH variable
adding "C:\PROGRA~2\Quantum GIS Lisboa\bin\", "C:\PROGRA~2\Quantum GIS Lisboa\bin" and "C:\PROGRA~2\Quantum GIS Lisboa\" to the beginning of PATH variable
Checking that GDAL was not installed separately
Installed Visual Basic 2010 Express (couldn't find Visual Studio 2010 as suggested in the other post)
"Path to the GDAL executables" and "Path to the GDAL Python modules" are blank in he GDAL setting menu within QGIS.

Any ideas what this could be?
I wonder why would it be the path variable if all other Gdal are working fine. Wouldn't it have a DLL load error for all or other Gdal modules?


texts: Mysterious Data loss after compressing SDE database

texts:
I suffer sometimes from data loss in SDE database exactly after compressing database.

i mean by data loss that some data remains in its prior state before edits, but this problem do not affect the totality of the data, it may touch just a portion of a feature class , and it may not touch all the feature classes.

i have made the compressing script to take edits data in priority.

i remarked also problems when i try to close to application that i'm using for editing, when i make some edits it takes too much time to close after i close it with close (X) button,so in the most cases i kill the process with task manager. i wonder if in this time the Arcobjects or Arcsde make some back up for edits. may be this is the cause for the Data loss.

i still wonder if this problem is the cause of this data loss.

My question :

why my app take so long time to close after i've made some edits ?

i'm available for any additional informations.

I'm using Arcgis 10.1 , VS 2010 , C#


texts: How to check whether two raster (RasterBrick) objects show the same trend in R (how to apply spatial testing)?

texts:
I have two RasterBrick objects in R!
Both RasterBrick objects describes the same area and the same time periods.
Each raster in RasterBrick stores values for one specific month.

I would like to test whether distributions of their values are similar, if they're showing the same trend, whether they're describing the same process/phenomena.

Obviously I can calculate Pearson/Spearman correlation coefficients (Spearman correlation between two rasters in R), but I would like to use some sort of spatial statistical test.

I've found some information about autocorrelation testing for spatial data in R!, but very little about checking relation between two spatial data sets (many mentions mainly correlation coefficients: https://www.researchgate.net/post/How_to_statistically_compare_two_maps).

Is there any package which allows me to apply spatial/geostatistical tests directly on Raster objects (for example Mantel test - I mentioning this test, because I've found and example http://www.ats.ucla.edu/stat/r/faq/mantel_test.htm although not for raster objects)?

Could you suggest any statistical/geostatical tests/package, please?


texts:
I'm wondering if it is possible to set up a boundary on zooming for e.g. 3 different vector layers, so that when zooming in QGIS will automatically switch layer?

For example layer 1 has scale 1:450000, then when zooming in to scale 1:200000 QGIS will switch to layer 2 (having more details than layer 1) and when zooming in ot scale 1:20000 it will switch to layer 3.

Maybe this feature is about turning off layer 1 when reaching zooming scale of 1:200000 and so on...?

I'm using QGIS 2.12


texts: Seeking examples of Creative Cartography?

texts:
I am looking for some examples of creative cartographic output. I am planning for something like a mixture of cartography, graphic design and spatial information. The output will be initially in hardcopy, maybe poster size maps. These maps are reuired to be very unconvetional, uncommon but appleanig. I am not bothered about map scale, projection or other technical details, since my target audience will be mostly laymen in mapping. This could be considered as an idea of InfoGraphics, with a spatial sauce!

For example what I have in my mind is

A map for "Around the World in Eighty Days" by Jules Verne. This
will be a poster size map, with world boundary and trip route
alongwith some images/ photographs/ descriptions at major breaks.
Another could be the use of beautifull and informativs symbols in
    pollution maps (Elements of cartography, H. Robinson), where all the
    indicators are shown as a combination of parts of human face. eg.
    size of ear for sound pollution, color of mose for air
    pollution(from red to yellow), the curve of mouth for water
    pollution and etc.
Or even a map of Europe made out of clothes. You can see it
here.

I am not looking for webmaps or historical maps or maps of very specialized theme that requires special understanding of maps.


texts: How to create loops using processing algorithm in python console from QGIS

texts:
I'm new with python programming and I need some help for my case.
I want to use inverse distance weighted function to interpolate precipitation values using values from 78 weather stations. so I create this sequence of processing algorithms that run perfectly one time and produce an interpolate raster layer as I wantedbold.
The problem is that I wanted to run these sequence all the times I need. All bold "9" values in code should be run to numbers 2, 3, 4 ..., 10, including number 10.
Any ideas for helping me?

processing.runalg("qgis:joinattributestable", "D:\PATRICIA\IG\QGIS\DIST_COSTA_etrs89.shp", "D:\PATRICIA\DOCUMENTOS\ESTACOES METEOROLOGICAS\DADOS METEOROLOGICOS\HR\H_1999_1_**9**.xlsx", "EST", "num", "D:\PATRICIA\IG\QGIS\FWI\HR\ETACOES_HR_1999_1_**9**")
processing.runalg("qgis:selectbyattribute", "D:\PATRICIA\IG\QGIS\FWI\HR\ETACOES_HR_1999_1_**9**.shp", "H", 1, "NULL", "D:\PATRICIA\IG\QGIS\FWI\HR\ETACOES_HR_1999_1_**9**.shp")
processing.runalg("qgis:saveselectedfeatures", "D:\PATRICIA\IG\QGIS\FWI\HR\ETACOES_HR_1999_1_**9**.shp", "D:\PATRICIA\IG\QGIS\FWI\HR\ESTACOES_HR_1999_1_**9**_SF_Int.shp")
processing.runalg("qgis:selectbyattribute", "D:\PATRICIA\IG\QGIS\FWI\HR\ESTACOES_HR_1999_1_**9**_SF_Int.shp", "H", 1, "-999.9", "D:\PATRICIA\IG\QGIS\FWI\HR\ESTACOES_HR_1999_1_**9**_SF_Int.shp")
processing.runalg("qgis:saveselectedfeatures", "D:\PATRICIA\IG\QGIS\FWI\HR\ESTACOES_HR_1999_1_**9**_SF_Int.shp", "D:\PATRICIA\IG\QGIS\FWI\HR\ESTACOES_HR_1999_1_**9**_SF.shp")
processing.runalg("saga:inversedistanceweighted", "D:\PATRICIA\IG\QGIS\FWI\HR\ESTACOES_HR_1999_1_**9**_SF.shp", "H", 0, 2, 0, 1, 100, 0, 0, 8, "-152444.0, 180000.0, -302911.0, 280000.0", 100, "D:\PATRICIA\IG\QGIS\FWI\HR\Python_HR_Viz8_Cell100_**9**")


texts: ESRI mapservice layer features not loaded entirely when it loaded with L.esri.featureLayer. Features which are visible at a particular zoom level gets loaded and rest all not available for further processing. Only when zoomed out, the map extent expands and all features are loaded.


texts:
I am trying to display my KML file with OpenLayers and I cannot get it to work...

I just want to simply display my KML layer on the basic map.

Here is the code I came up with:

<!doctype html>

    <link rel="stylesheet" href="https://openlayers.org/en/v4.6.4/css/ol.css" type="text/css">

    <title>OpenLayers example</title>

    Mountains