texts: ArcObjects Class Extension - core events not being fired by an editing tool

texts:
I think I've just hit a major limitation with how ArcMap (10) deals with class extensions on a Feature Class but I would first like to make sure I'm not missing something or seeing a bug.

I have a class extension registered with a feature class and the extension creates a unique identifier for every new feature that is created - it listens to the IObjectClassEvents.OnCreate event. This event is fired and handled every time a feature is created within an edit session using the 'Create Features' template. Similiarly, if I select one of more features, then Ctrl+c Ctrl+v the OnCreate event is fired for each feature and a new ID is assigned, rather than a copy of the old one - Great!

However, if I use the Advanced Editing - Copy Features tool no events are fired at all, even though new features are created. Perhaps this Copy Features tool uses a python script or something and therefore isn't managed in the same way? I don't know, but I thought it was the geodatabase which threw the OnCreate event so it shouldn't matter how the feature is created.

Can anyone tell me why none of the IObjectClassEvents events are fired in this case? I am considering looking into nasty workarounds (like a command add-in which listens for edit events when enabled) but 1) I'd really rather not and 2) I might end up with exactly the same problem.

Finally, I know there are other options than a class extension for what I'm doing but in order to fulfil all of the tool's requirements I can't use an editor extension.

Any help very much appreciated.


texts: Having more than 10 letter on header while exporting SHP to Excel using ModelBuilder ArcGIS

texts: When I export a shapefile to Excel from ArcGIS using ModelBuilder  the header maximum length is 10. I would like to know how can I have more.


texts: CSV file replacement in a Map Tour- Story Map

texts: On the Map Tour story app, I imported a CSV file. Worked great! However, I want to put a different one up there. There seems to be no way to delete that without deleting each individual picture. If I try to import a different CSV, it says "CSV file empty" which they aren't. What should I do?


texts:
I created a geometric network for every town in the state of Rhode Island with manholes & pipes. I want to be able to trace downstream/upstream from anywhere in the system for the entire state.
Is there any way I can merge 40 separate geometric networks?


texts:
I'm trying to make a little utility to generate encrypted passwords for MSD files (change the XML inside the zip). I found this example online, but I'm not familiar with esri's API, so I'm not sure how to use IWorkspaceName2::ConnectionString as suggested in the following documentation link -

http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriGeodatabase/IWorkspaceFactory2_Example.htm

OpenFromString actually makes a connection, which is not ideal for my purposes, so if that can be ommited entirely and get the ConnectionString property value from the IWorkspaceName2 that would do it. I wasn't able to find out how to create a IWorkspaceName2 object so that's what I'm looking for, either c# or vb.net.

string connectionString = "SERVER=myServer;DATABASE=sde;INSTANCE=5151;USER=Editor;PASSWORD=Editor;VERSION=SDE.DEFAULT"
IWorkspaceFactory2 workspaceFactory = (IWorkspaceFactory2)new ESRI.ArcGIS.DataSourcesGDB.SdeWorkspaceFactoryClass();
return workspaceFactory.OpenFromString(connectionString, 0);

//A better solution is to use IWorkspaceName2::ConnectionString which returns an encrypted password:
ENCRYPTED_PASSWORD=0001d2756fc3e1b91529;SERVER=myServer;INSTANCE=5151;USER=Editor;VERSION=SDE.DEFAULT`


texts: Changing symbol size using the "Size assistant" in QGIS?

texts:
I need to change symbol size of a categorised shapefile.

For this I tried using the Size Assistant
(in the style menu: right click > change size > Data defined override > Size assistant)

However my 30.000 attributes have a very broad range in the column used to define size. Consider this an example of my dataset:

Each "Type" was categorized to have its own symbol. Now I want to change the size of that symbol by the column "number"using the Size Assistant. The problem is I can't figure out how to manually set my categories. Since there are a few outliers with a "number" value which is many times larger than the average, Size assistant automatically attributes the categories to be between 5.000 and 23.000. Since the majority of my data ranges between 1 and 100 I would rather have categories like: 1, 25, 100, 1000, 10.000+

Is there any way to do this in the size assistant or any other way? Important is that the categories keep their symbols and only the size changes. Preferrably without having to write 1000 rules since I have about 30 categories.

Edit:
I ended up adding an extra column to my attribute table dividing the large values in categories in order to deal with the huge outliers. After that, keeping the scale tot scale_exp and changing the one but last value to 0.3, as Hugo suggested did the trick.


texts: I have a leaflet map of the US and I would like to toggle between zip codes and county shapes. There seems to be no tutorials on how to achieve this in the documentation or an other forums I have looked at.


texts: C# Where to create GP service output files

texts:
How to get path of default scratch workspace(folder) using c#?

I'm making REST GP tool, where you pass some input parameters, tool collects data, create csv files, and archive them. Then tool return path to archive file.

Tool logic is done, but i'm stuck on where to write files(and how to return path), and thought, that scratch folder would be good choice for that. In python I would do something like:

%scratchFolder%\....

or

arcpy.env.scratchFolder

But that doesn't work in C#. Any suggestions?

EDIT:

Thanks, it was really that simple in the end

IScratchWorkspaceFactory scratchWsF = new ScratchWorkspaceFactory();
IWorkspace sWS = scratchWsF.DefaultScratchWorkspace;
string scratchWS = System.IO.Path.GetDirectoryName(sWS.PathName)+"\\";

EDIT 2:
The previous solution works fine for GP tool and returns smth like "C:\Users\Admin\AppData\Local\Temp\arc161B...", but for GP REST service that does not work:

IScratchWorkspaceFactory2 scratchWsF = new ScratchWorkspaceFactory()
    as IScratchWorkspaceFactory2;
//and
IScratchWorkspaceFactory scratchWsF = new ScratchWorkspaceFactory();

stops the execute method, without any error if used in published GP service(but works in GP tool). Recently found out, that every instance of GP service have its own scrach, but i am unable to find a way to get to that.


texts:
I wish to ask for some advice when it comes to building nested spatial expressions in PostgreSQL.  I end up with the same kind of problem many times when it comes to select more than one type of geometry.

The case I am working with now is related to it, is this:

I need to find parcels that lay within a buffer zone around a numbers of waters and streams selected by their ID.
Waters are polygons, Rivers are lines.

I try to find a way how to write a ST_DWithin the polygons and the lines in one query to find parcels within the buffer.

Is this a reasonable way to approach the problem or should I work with this kind of queries in a different way?


texts: How to convert zip codes to latitude and longitude?

texts: I have a data set that includes a list of zip codes. Is there a way in R to convert these zip codes to latitude and longitude coordinates?


texts: How to prevent openlayers and geoserver to cache tiles?

texts:
I try to prevent my tiles for being cached but everything I tried wasn't a success.

I tried to :

Uncheck tiles cache option in GeoServer
Add a time param in the source.tileWMS :  params: {'LAYERS': 'mylayer','TILED': true,'time': new Date().getTime()}
Add a random value in the source.tileWMS : params: {'LAYERS': 'mylayer','TILED': true,'myData': Math.random()}
Specify cacheSize to 0 in the source.tileWMS : cacheSize:0
Check 'disable cache' on Google Chrome debugger

Every time I zoom and unzoom, I get the tile in cache.

Do you have any solution?


texts: Uploading shapefile to PostGIS database using PHP

texts:
I want to insert a shapefile into a PostGIS database using PHP.  I go through the examples and I tried the following:

$command = 'shp2pgsql -s 2100 -d /D:\CHECK DATA-group\2016\Ayomi\JULY\12FCP151Sup88Sh99\121800151s00088s0099\CM121800151s00088s0099Poly.shp | psql -h localhost -p 5432 -d ssh -U postgres';

But it is not working. Then in the forum, I saw an instruction to add the exec($command,$out,$ret); to the above code.  Can any one explain me what is meant by $out,$ret variables?


texts: Detecting if a point is inside a polygon with Python 3 and OGR

texts:
I am working in Python 3.7 using ogr to check if a point is inside a polygon. Here I put the code. The result in geom is not compatible with the tuple list data type used by the point_inside function.
How can this information be made compatible?
from osgeo import ogr

def point_inside_polygon(x,y,poly):

    n = len(poly)
    inside =False

    p1x,p1y = poly[0]
    for i in range(n+1):
        p2x,p2y = poly[i % n]
        if y > min(p1y,p2y):
            if y <= max(p1y,p2y):
                if x <= max(p1x,p2x):
                    if p1y != p2y:
                        xinters = (y-p1y)*(p2x-p1x)/(p2y-p1y)+p1x
                    if p1x == p2x or x <= xinters:
                        inside = not inside
        p1x,p1y = p2x,p2y

    return inside

file = ogr.Open("C:/Programas/Python/salida.shp/MSK_CLOUDS_B00.shp")
shape = file.GetLayer()
feature = shape.GetFeature(0)

for feature in shape:

 #geom  = feature.GetGeometryRef()
 geom = feature.geometry()

 print (geom)

 print(point_inside_polygon(-90.2,14.3,geom) )


texts:
I want to extract values across an imageCollection for a specific location. I can do that (using an R and the package rgee, but I think that same could be done in python etc.) looping through the images or using lapply. However, is there a way to reduce the entire imageCollection to the specific location and extract everything at once?

#### Initialise GEE
library(rgee)
library(reticulate)

use_condaenv("gee-demo", conda = "auto",required = TRUE)

ee = import("ee")
ee$Initialize()

np = import("numpy")
pd = import("pandas")

roi <- ee$Geometry$Point(c(123.813785, 72.629130))

## MODIS collection
Mod09  = ee$ImageCollection("MODIS/006/MOD09GA")$
  filterDate(ee$Date('2016-05-01'), ee$Date('2016-05-31'))$
  filterBounds(roi)
dts <- as.POSIXct(sapply(Mod09$getInfo()[[6]], function(x) x$properties$`system:index`), format = "%Y_%m_%d")

outB1 <- unlist(sapply(seq_along(dts), function(x) {
  im  <- ee$Image(Mod09$toList(length(dts))$get(x-1))
  red <- im$reduceRegion(ee$Reducer$first(), roi, 1)
  red$select(list("sur_refl_b01"))$getInfo()
}))

I tried to reduce the imageCollection by mapping:

redColl = Mod09$map(function(image) {
  return(image$reduceRegion(ee$Reducer$first()$setOutputs(image$bandNames()), roi, 1))$
    map(function(feature) {
      return(feature.set({
        'imageID' = image$id()
        'B1'= image$get('sur_refl_b01')
      }))
    })
})$flatten()

But so far this does not work.


texts: Copy selected attributes from one field to another using PyQGIS

texts:
QGIS version 3.4

I need to copy all selected attributes from the field 'HomePostcode' into the field 'Postcode' through PyQGIS.
Using the field calculator I would simply use the expression "HomePostcode", ensuring I'm updating field 'Postcode's selected features only.

I've searched high and low for relatable code and the following is the best I can come up with:

#adds layer to map
uri = 'C:/Users/xxxx/Cleaned.csv'
join_layer = iface.addVectorLayer(uri, 'Cleaned', 'ogr')
target_field = 'Postcode'

def calculate_attributes():
    """Calculates values for 'Postcode' by copying attributes from HomePostcode column and adds them to 'Postcode' column"""

with edit(join_layer):
    for feature in join_layer.getFeatures():
        feature.setAttribute(feature.fieldNameIndex('Postcode'), feature['HomePostcode'])
        join_layer.updateFeature(feature)
print(f"Attribute calculated for {target_field} field")

calculate_attributes()

The Python console reads the script but I get a critical error "OGR error syncing to disk: Cannot rename files".

I know the above (if it worked) would just copy all values from HomePostcode to Postcode but I cannot find any clear documentation to target selected features only for QGIS 3.0.


texts: Bounding Box -- Understanding (setting) Unit of Measurement in QGIS

texts:
QGIS Version 3.4

My initial problem (width and depth of parcel polygons) was solved by this post:

However, when I run the process the Units of Measurement are unclear. (see below)

Moreover, I want to be able to set (or convert) the Units of Measurement to Feet.


texts:
I am making a plugin that calls a customised library which contains a list of functions.

I, first saved this library outside the plugins folder, then inside it to see if it changes something. The function is exceuted but getting the message "Global name 'qgis' is not defined".

Here is the sample code:

Code 1: the run of plugin

sys.path.append(r'C:/Users/Nekkini/.qgis2/python/plugins/lib')
import lib_ICT
self.dlg.show()
result = self.dlg.exec_()
        # See if OK was pressed
        if result:
            FCI = str(self.dlg.RefCMD.toPlainText())
            if FCI == qgis.core.NULL or FCI == "" :
                FCI = 'F99999jjmmaa'
            else :
                FCI = FCI.upper()
            lib_ICT.shpblo(FCI)

Code 2: my library called lib_ICT

# -*- coding: utf-8 -*-
from qgis.core import *
from qgis.gui import *
# import qgis.utils
def shpblo(FCI):
    print 'hello'
    canvas = qgis.utils.iface.mapCanvas()
    lay = dict((k.name(), i) for (i,k) in enumerate(canvas.layers()))
    folder = QgsProject.instance().readPath("./") + "/"

    Dossier_Principal = QgsProject.instance().readPath("./")
    layers = qgis.utils.iface.legendInterface().layers()

    ...

As you can see, I am calling qgis.utils.iface with no success. I am using QGIS 2.14.


texts: Make a legend of connected attributes in ArcGIS Pro

texts:
I am having some trouble with ArcGIS Pro to create a legend. I have some x-y data plotted, with colours according to "unique values" and the size of the symbol as a "connected" attribute to another value so my symbols are proportional to it (sample size in this case).

When I try to create a legend in the "Design view" through "Insert Legend" and then in the "Design" stript select only the layer that has this x-y features, what appears in the legend are the colours and the "unique values" they represent. However, what I want is to create a legend for the symbol sizes, something that would look similar to this:


texts: Exported shapefile from selected features via PyQGIS is blank

texts:
I'm doing Open Source Options' tutorial on the topic but my code doesn't work. I guess the selectByExpression() works but writeAsVectorFormat() doesn't.
This is my code
layers = QgsProject.instance().mapLayersByName('Municipalities')
layer = layers[0]
layer.selectByExpression('"NAME_1"=Camarines Sur')

fn = r'C:\Users\imper\Documents\new_GISfiles\pyQGIS_practice\camSur.shp'
writer = QgsVectorFileWriter.writeAsVectorFormat(layer, fn, 'utf-8', \
QgsCoordinateReferenceSystem(32651), driverName='ESRI Shapefile', onlySelected=True)

selected_layer = iface.addVectorLayer(fn, '', 'ogr')

del(writer)

It runs but the result is a blank shapefile. What is wrong with my code when it's just copied from the tutorial?


texts: Validate SDE features within ArcObjects (can't use sdeLayer)

texts:
I'm trying to sweep through a feature class checking for invalid features (and log the invalid features).

Would IValidation.Validate work or does that just check for rules?

If not I'm guessing I might be able to do something like (to force re-validation):

((IGeometryCollection)featureClass.GetFeature(oid).Shape).GeometriesChanged();

However I'm not clear on what would happen if the feature was invalid I would still need find the ids of the invalid feature. Any suggestions?


texts:
I'm trying to reclass the values of a sentinel 2 NDVI creating a function but I don't know  exactly  how do to it.
What I exactly want is:
When NDVI values are between -1 and 0, return (-1) ;
0 and 0.3 return (0);
0.4 and 1 return (1).

Here's my idea of script:

//Imagen Sentinel 2A
var IMGSentinel2A= ee.ImageCollection("COPERNICUS/S2")
.filterDate ('2016-10-01', '2017-03-31')
.filterBounds (geometry)
.filterMetadata ("CLOUDY_PIXEL_PERCENTAGE",'Less_Than', 5);
var filtropix = ee.Image(IMGSentinel2A.max());
var Sentinel2Clip = filtropix .clip (geometry);

//Bandas
var b4_1 = Sentinel2Clip.select('B4');
var b8_1 = Sentinel2Clip.select('B8');

// NDVI
var ndvi1 = b8_1.subtract(b4_1).divide((b8_1.add(b4_1)));

var recl = ndvi1.select('B8');
var repl1 = ee.Image(-1);
var repl2 = ee.Image(0);
var repl3 = ee.Image(1);

var zones = function (image) {
  return image.where(image.gt(-1).and(image.lt(0)), repl1)
  .add(image.where(image.gt(0).and(image.lt(0.3)), repl2))
  .add(image.where(image.gt(0.3)).and(image.lt(1))) };

var output = dndvi.map(zones);

//palette
var bdif_palette = ['00FF00','FF0000'];

Map.addLayer(output,
             {min: 0, max: 2, palette: bdif_palette},
             'reclass NDVI');


texts:
Is there any way I can automatically measure/calculate the area of a shapefile (a polygon for instance) without using the qgis default measure tool and avoid to manually have to draw the area to be measured/calculated?

As an option, perhaps a tool that allows me to enter coordinates and have the area information as a result.


texts: Generating world files for a set of non-georeferenced rasters using QGIS?

texts:
I have a set of topographic sheets in a form of non-georeferenced *.bmp rasters, and a shapefile representing footprints of those topographic sheets.

What I need to do is to  using corresponding footprint coordinates.

All rasters have fixed dimensions of 7323 * 7323 pixels, and the actual grid that footprint represents is offset by 700 pixels from the edges of the raster.

How do I generate a world file (*.wld) for each .bmp raster in a set given pixel coordinates (raster dimensions and 700px grid offset is given) and cartographic coordinates from a corresponding footprint?

The thing similar to this is implemented in QGIS Georeferencer, but it requires manual input of GCP and doesn't provide batch mode.


texts: How use height tag data in Project-OSRM?

texts:
I am using Project-OSRM in my project .
All is works . But I need use elevation data. Downloaded osmosis master . And SRTM plugin added to osmosis. Also this worked fine . SRTM plugin started and I get new .osm file .
In test_with_srtm.osm file have height tag data. But I cannot see sad height tag information  in founded path json output format.
Please, help me next steps.  How can I do it.  At least I want to see height tag data in retuned json result( https://github.com/Project-OSRM/osrm-ba … utput-json ).


texts: Seeking topics to be mentioned in beginners guide on QGIS?

texts:
Currently I am compiling a FAQ for my company on QGis, since some people feel the need to work more with QGis. I am the person to go to, when some specific problems appear, but I see a need to give people something to consult with instead of letting them blunder along.

Currently I have the following topics in my FAQ (either already fully explained or at least with some notes):

Limits of QGis
Terms & User Interface, e.g. layer & layer properties, vector vs. raster, CRS, tools, snapping,
Data types, as shape, dxf, kml/kmz, csv, images, qgis-style, project files, geopackage, wms
important, reoccurring tasks/workflows, as georeferencing, manipulating attribute tables, geometry validity, clip, dissolve, buffer, creating geometries

I also try to include all tricks I use regularly or built for others in my company, like automatically adding attributes to a newly created feature, or trying to determine if a polygon is about the desired size.


texts: What alternatives to Orfeo are out there and what are the pros and cons of each?

texts:
I'm interested in using a library for abstracting the common, repeatable tasks that entail the usage of GDAL (like registiring a driver, getting bands.. etc). In general, GDAL is "low-level" and most of the time there are a lot of copy-pasted code all over a project. I need something on-top of GDAL that hides all the "day-to-day" tasks. For example, for rasters I'd like to have a cube-based view of the it (kind-of what the python bindings do but for C++).

Orfeo seems to fit the bill (taken from Orfeo's homepage):

image access
filtering
feature extraction
image segmentation
classification
change detection

But I'd be using only its image-abstraction functionality, so it seems an overkill.

Before embracing the use of it I'd like to know if there are other alternatives and what are their pros and cons.


texts: Compare two shapefiles by location and attribute in QGIS

texts:
I am looking for a way to compare two shape layers automatically. We have two files that represent two different states of our project and thus contain similar data in the same format (e.g. both point data with similar attribute fields). We need to find out the geographic and attribute differences between both data sets. The data sets are quite big, so doing it by hand would be very timeconsuming.
To compare if the location we can simply use the "Select by Location"-Tool, however we still need to know if attributes were changed. To give an example: An extended solution would be a function similar to MS Word "compare two versions of a document".
I have an idea of how to do this with a script, but before I sit down for an afternoon programming it, I wanted to ask, if there is a Plugin or another tool, I don't know, that already does that.
I am using QGIS 3.16.0 and my colleague is using 3.14.X I assume.


texts:
I have a locality layer of neighborhoods and suburbs from a spatialite database. How do I label this single layer with the neighborhood name at a lower scales, but as I zoom out, I would like the town label instead?

Is this possible with a single layer or do I have to work on multiple layers to achieve this?

Perhaps a better question is what's the recommended way of achieving this: use local names as you zoom in, and super names as you zoom out.

Thanks.


texts: Doubt on contour map on top of an ortophoto

texts:
I created a contour map layer on top of an ortophoto map using QGIS, and noticed that the two layers do not overlap perfectly and wonder if this is normal. What happens, is that the contour lines seem to be slighthly displaced to one side of the map with one side having the contour lines going off the map by some 4m.
I created the map using the command Raster->Extracting->contours

If the way this layer was created is not correct how can I make the two layers coincide/overlap exactly?

Below is how they look like
The first picture shows the side where the contours fall short of reaching the end of the ortophoto:

The second shows the opposite side where they fall outside:

Any help suggestion welcome.


texts: How to save several Layers in QGIS as shapefile in one step

texts:
I have a huge QGIS (using 2.12.3-Lyon) project with several layers stored in a SQL database. Now I need these layers as Esri shapefiles. It is possible to right click one of the layers, click on "Save as..." and save it to SHP. The resulting shapefile can be used in ArcMap without any issues.

How can I do that for all my layers without handling each one manually?

I already marked all my layers and right clicked them to use the "Save as..." option which leads to one big SHP file but I need the files separately.


texts:
I would like to know how to create an instance of a Multipoint from a PostGIS database..

I do the query , then got the ResultSet named "area" , the column with MultiPolygon attributes is named "geom"
so i do the following:

MultiPolygon m = (MultiPolygon)area.getObject("geom");

xD forced cast
Doesn't work though! :\

Anyone?
Thanks


texts:
I can reproject a GeoTiff file like this:

gdalwarp -s_srs EPSG:31467 -t_srs EPSG:4326 or11.tif or11_4326.tif

How can I reproject a WorldImage File, i.e a jpg with an attached .jgW file?


texts: ArcPy gives error Object: CreateObject cannot open map document?

texts:
This should be a really simple process but I am having issues. I want to search a workspace for all files with a certain string and then add them to the current workspace with a selected symbology.

Issues:

Error [[: Object: CreateObject cannot open map document]] I have to set the map doc to be the current workspace
When run in the python window the symbology is not updated.
It should only update the map frame/toc once everything is added

Code:

import os, arcpy, arcpy.mapping
from arcpy import env

GDB = arcpy.GetParameterAsText(0)
Text = arcpy.GetParameterAsText(1)
symbologyLayer = arcpy.GetParameterAsText(2)
#OutputGDB = arcpy.GetParameterAsText(3)

arcpy.env.workspace=GDB
mxd=arcpy.mapping.MapDocument("CURRENT")
list=arcpy.ListFeatureClasses('*'+Text+'*')

for layer in list:
    dataFrame = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
    addLayer = arcpy.mapping.Layer(layer)
    arcpy.mapping.AddLayer(dataFrame, addLayer, "BOTTOM")
    arcpy.ApplySymbologyFromLayer_management (addLayer, symbologyLayer)

# Clean up the MapDocument object by deleting it
#del mxd

arcpy.RefreshActiveView()
arcpy.RefreshTOC()

ERROR DETAILS

Messages

  Executing: ProcessDatasets22
  P:\2012\Job_044_DM_Radio_Propogation\Working\FinalPropogation\cb_BEL07\working\bel07.gdb _dow P:\2012\Job_044_DM_Radio_Propogation\Working\signal_strength_poly.lyr
  Start Time: Mon Mar 19 14:11:27 2012 Running script
  ProcessDatasets22... : Object:
  CreateObject cannot open map document Failed to execute
  (ProcessDatasets22). Failed at Mon Mar 19 14:11:27 2012 (Elapsed Time:
  0.00 seconds)


texts: How do I call external files in Python Geoprocessing Service?

texts:
I have created a Python script which calls an R script and then reads the output back into Python.  I can run this tool in ArcGIS Desktop (10.2.1) and it works fine.  When I publish as a geoprocessing service it fails once it reaches the R script.  I have checked the file paths and they are fine.  Is it even possible to call external scripts from a geoprocessing service?  Here is my code.

import sys, os, arcpy
arcpy.AddMessage("Loaded Python Imports...")

try:
#User Input
lat = arcpy.GetParameterAsText(0)
long = arcpy.GetParameterAsText(1)

arcpy.AddMessage("LAT: " + "".join(lat))
arcpy.AddMessage("LONG: " + "".join(long))

#Create R Command
rScript = "test.R"
args = " ".join([lat, long])
RCMD = "R --slave --vanilla --args "
cmd = RCMD + args + " < " + rScript

#Execute
os.system(cmd)

#Render the Results
output = open("FILE PATH")
finalNumber = output.read()
print("The output is: " + " ".join(finalNumber))
arcpy.AddMessage("The output is: " + " ".join(finalNumber))
output.close()

#Delete Text File
os.remove("FILE PATH")

except Exception as e:
    print e.message
    arcpy.AddError(e.message)


texts: Make "Nodata" transparent in raster - Mapfile/Mapserver

texts:
I have a raster and I'm trying to make it display in Openlayers2, using Mapserver 7.0 in backend. My problem is, I think, that because the online map is not the same projection as my data, Mapserver (or something in between) reprojects the data and ugly black portions now surrounds the actual data like this (See here, but I'm not sure if it is accessible outside the campus) :

What I want to do is simply remove those black areas, probably using some configuration in the mapfile.. I looked to some configurations such as :

PROCESSING "NODATA=-999"
CLASS
    EXPRESSION ([pixel] = -999)
    STYLE
        COLOR "#FFFFFF00"           # transparent black (RGBA)
    END
END

I also tried putting this : "wcs_rangeset_nullvalue"

Or tried using the OFFSITE 0 0 0, but this made anything that was black in the map to become transparent..

So far, all I was able to do is either make the whole map disapear, make anything that is black be transparent, or no difference at all!

Data projection :
NAD_1983_CSRS_Northwest_Territories_Lambert
WKID : 3581 Autorité : EPSG
Projection: Lambert_Conformal_Conic

The map is in EPSG:4269.

MAP
  NAME              "FRANKLIN"
  EXTENT            -180 -90 180 90
  INCLUDE           "../include/ec_map_default.map"
  WEB
   IMAGEPATH        "/data/ms_tmp/"     #chemin reel
   IMAGEURL         "/ms_tmp/"              #alias dans apache qui pointe sur IMAGEPATH
   METADATA
    "wms_name"                            "FRANKLIN"
    "wms_title"                           "FRANKLIN"
    "wms_abstract"                        "FRANKLIN"
    "wms_description"                     "FRANKLIN"
    "wms_keywordlist"                     ""
    "wms_onlineresource"                  "http://bul-geo-stock1.ulaval.ca/mapserv?map=franklin&service=WMS&"
    "wms_srs"                             "EPSG:3857 EPSG:2036 EPSG:2037 EPSG:2148 EPSG:2149 EPSG:2150 EPSG:3797 EPSG:4269 EPSG:4326 EPSG:26917 EPSG:26918 EPSG:26919 EPSG:26920 EPSG:32183 EPSG:32184 EPSG:32185 EPSG:32186 EPSG:32187 EPSG:32188 EPSG:32189 EPSG:32190 EPSG:32198 EPSG:42105 EPSG:42304 EPSG:900913"
    "wms_extent"                          "-180 -90 180 90"
    INCLUDE "../include/ec_web_metadata_getfeatureinfo.map"
  END
END
PROJECTION
 "init=epsg:4269"
END
LAYER
  NAME      "coppermine1823_york_factory"
  #OFFSITE     0 0 0 #255 255 255
  TYPE      RASTER
  #DATA    "../../../data1/matricielle/franklin/epsg3857/carte1.tif"
  DATA    "../../../data1/matricielle/franklin/carte1tif.tif"
  #DATA    "../../../data1/matricielle/franklin/contour_rouge/carte1tif1.tif"
  METADATA
    "wms_title"     "Route of the Expedition from York Factory to Cumberland House. and the Summer & Winter tracks from thence to Isle a La Crosse, in 1819 & 1820"
    "wms_abstract"  "Route of the Expedition from York Factory to Cumberland House. and the Summer & Winter tracks from thence to Isle a La Crosse, in 1819 & 1820"
  END
  PROJECTION
        "init=epsg:3581"
        #"init=epsg:3857"
  END
END

How can I achieve this?


texts:
I am looking for coordinates (longitude and latitude) of each state of Brazil.
Where can I find that?

I have found a file for the US states here: http://econym.org.uk/gmap/states.xml, I am now looking for something similar for Brazil.


texts: Needing ArcGIS Server to edit MS SQL Server database?

texts:
Here is what I have:

ArcGIS Desktop Advanced (10.2) & MS SQL Server 2008 R2

Here is my problem:

I need to be able to connect to the ms sql server and import, export, create, and edit spatial data. I can connect to my database and export features to it using the "Feature Class to Geodatabase" tool but can't edit the data once bringing it back into an ArcMap session. I have tried using the "Create Enterprise Geodatabase" tool available with the advanced desktop license but it asks for an Authorization File (for ArcGIS for Server I assume) that I don't have. I have looked at prices for ArcGIS for Server and it is not feasible option.

Are there alternatives to achieve what I need to using what I currently have licenses for?

Where does arcSDE fit into this?


texts: Quality assessment of monthly MODIS NDVI and LST data (MOD13C2, and MOD11C3)

texts:
I'm very inexperienced at using MODIS data.
I'm using MODIS monthly 0.05-degree NDVI and LST data. I'm stuck in the quality analysis of these datasets.  MODIStsp I used this package for downloading and projecting the data, also find another R package bfast for downloading and processing.
Is the data quality assessment required, and if required how can I use it MODIStsp tool?


texts: How to join attributes of points with several overlapping polygons?

texts:
I am making a road atlas using QGIS, where the pages overlap:

I would like the intersection of the roads and the edge of each atlas page (for example, Point A and Point B) to tell which pages you should turn to to continue following that road:

That is, each intersection point needs to have a field telling which page(s) it is contained in, like this:

          contained_in
-----------------------
Point A   Page and 3
-----------------------
Point B   Page 2

Doing a "join attributes by location" with the pages creates several versions of the same point:

          contained_in
-----------------------
Point A   Page 2
-----------------------
Point A   Page 3
-----------------------
Point B   Page 2
-----------------------
Point B   Page 2

This leaves me with many duplicates, and I can't figure out how to combine them. How can I make a point tell all of the polygons which contain it?


texts: Override default ArcMap editing error dialog

texts:
Is there a way to override this dialog easily?

The custom message is already there, but I'm guessing that my client will be more annoying and will want a translated message.

Can I replace that dialog? This dialog is the one that appear if you thrown an exception from inside a class extension.


texts: Is it possible to create a PostGIS sequence to populate Area column of a polygon

texts: I've created Postgres/PostGIS sequences before to assign unique gid values when a feature is created in QGIS but is it possible to create a sequence that will automatically populate an area column? Equally would it be possible for a sequence to be created to calculate the length of a line and even better the X Y values of a point?


texts: Reverse legend histogram palette in tmap

texts:
I'm trying to plot the histogram values with the same order as the color palette of a raster legend, passing the parameter legend.col.reverse = TRUE reverses the legend but not the histogram, since I'm trying to plot elevation values, it's desirable to put highest on top of the legend.
EDIT
I can achieve it by plotting the layer twice and passing alternately the legend and histogram, but that's hacky.
library(tmap)
data("land")
tm_shape(land, ylim = c(14,30), xlim = c(-105, -90)) +
  tm_raster("trees", palette = "Greens", title = "Percent Tree Cover", legend.reverse = T,
            legend.hist = T) +
  tm_layout(legend.bg.color = "white")


texts: Upgrade Python from 2.6 to higher version

texts:
I am using ArcGIS 10 desktop version. With this, the installed Python is 2.6. For some raster functionality (GDAL) I have to install the wheel file, to install wheel file I have to pip before to this. Now I am getting error as pip is not supporting Python 2.6 version.
Is there any way I can upgrade this Python version to install pip?


texts:
I have a set of vector tile layers I'm hosting (mbtiles) on Mapbox.

Currently, I'm using Leaflet to overlay these on a 2D satellite view and works.

However I'm wanting to add in some features to my site that Leaflet doesn't support (namely rotate and tilting for 3D terrain). I'd love to be able to use Google maps satellite view with its rotation and 3D views of mountains, etc.

Is there a way to add vector tile layers using the Google Maps API?

Maybe the best solution is to switch to Mapbox-GL-JS for the rotate/tilt and give up on the 3D terrain?


texts: How long should it take to generate a Hydro Network?

texts:
How long should the geoprocessing take to generate a geometric Hydro Network for a fairly large watershed, using ArcHydro?

I have ~ 53,000 DrainageLine segments in the stream layer.  I'm using ArcGIS Desktop 10.5 on a laptop with a 2.4 GHz processor and 4 GB of RAM.

The Hydro Network Generation tool ran for a few hours, I stopped it, and it looked like about 20% of the network was generated, so I went ahead and tried again. I'm just wondering what to expect time-wise.

Finally finished after 24 hours.


texts:
I was able to run Geoserver. Unfortunately, I doing my projects in the QGIS and styles are encoded in the SLD 1.1. (not supported by GeoServer v. 1.1 only in v. 1.0).

In view of the above I would like to install on OpenShift QGIS Server. But I can not find anywhere instruction "for dummies".


texts:
I am displaying a gamemap using Leaflet. The map is nonwrapping.

I use L.CRS.Simple which is recommended for this (and makes sense).

I add multiple tilelayers, each created using gdal2tiles. The source images can differ in size (2048², 4096² or 8192², always square).

Displaying all that works fine with a bit of unproject magic, but now I wanted to add measurement tools and a scalebar. As the tiles have a size of 256px, the Leaflet internal scalebar always assumes the tilelayers to have an extent of 256 "meters".

Gdal2tiles already provides this information in the accompanying tilemapresource.xml as

An example fiddle of a map that actually should have an extent of 2048x2048 meters, where the source image (used to create the tiles) was 4096x4096 (giving tilesets).
Gdal2tiles helpfully creates a tilemapresource.xml that provides this information:

<BoundingBox minx="-4096.00000000000000" miny="0.00000000000000" maxx="0.00000000000000" maxy="4096.00000000000000"/>
<Origin x="-4096.00000000000000" y="0.00000000000000"/>
<TileFormat width="256" height="256" mime-type="image/png" extension="png"/>
<TileSets profile="raster">
    <TileSet href="0" units-per-pixel="16.00000000000000" order="0"/>
    <TileSet href="1" units-per-pixel="8.00000000000000" order="1"/>
    <TileSet href="2" units-per-pixel="4.00000000000000" order="2"/>
    <TileSet href="3" units-per-pixel="2.00000000000000" order="3"/>
    <TileSet href="4" units-per-pixel="1.00000000000000" order="4"/>
    <TileSet href="5" units-per-pixel="0.50000000000000" order="5"/>
</TileSets>

See this JSFiddle for an illustration of the nonadjusted scaleba (showing 256m width of the entire map instead of 2048 I want):

https://jsfiddle.net/qLkwLbg8/3/

However, I cannot see a way to tell Leaflet what scale a provided tilelayer actually has (something like setunitsperpixel(x, zoomlevel))"

Is there an option or setting I can use to tell Leaflet that a provided tilelayer actually has a specific "units-per-pixel" at a given zoom level? Or is this simply not supported by Leaflet and I have to manually hack around this?

This project is using Leaflet 1.0 .


texts: How to show Python console at QGIS program start

texts: I wonder if there is a way to open the Python console directly at program launch. There is a possibility to set a shortcut for the Python console, but I can't find such an option for the QGIS program launch.


texts:
Can I select a layer, by code, in the TOC/legend of a map in a WPF ArcGIS Runtime application?

I develope in ArcGIS Runtime SDK 10.2.2 for .Net in C#.


texts: Length of longest street using Spatial SQL

texts:
I have a table with the geometry of streets and I`d like to find out, which is the longest and which length (in kilometers) it is.

How can I summarize the individual street segments?


texts: Hyperlinking images to geotagged photos in QGIS

texts: How can I set up a geotagged photo on QGIS 3.4 to display the image? Currently it is just a geotagged point on the map without showing the photo.


texts: Drone that generates a point cloud from photography

texts:
I read this in a trade magazine today,

  “Esri has just released the Drone2Map for ArcGIS app, which
  transforms high-resolution drone imagery into ready-to-use aerial data
  in the GIS platform. Users can bring point-clouds, mosaic datasets, 3D
  meshes and orthomosaics directly into the platform in near real time
  without any third-party application. … Simple photographic data
  obtained from a miniature camera mounted on a drone can be used for
  point-cloud collection, rather than rely on airborne lidar.”

How does it generate a point-cloud from the photographic data without some sort of laser or other active sensor? The part in bold above.

Is it merely stereo imagery?
https://doc.arcgis.com/en/drone2map/process-and-share/processing-options.htm


texts: Alternatives to Windows Explorer and ArcCatalog when copying a file gdb

texts:
I need to copy a file gdb from my local machine to a server using a remote desktop connection. I have been doing this using a simple copy/paste operation in Windows Explorer. I know that it is best practice to do this using ArcCatalog, but in this situation I can't.

What I would like to know is how risky this procedure is. I know there is a chance that there may still be locks on the datasets, or other processes accessing it, which could cause the data to be copied partially/incorrectly. I have indeed noticed this where just having ArcCatalog open on my local machine (and not inside the folder the containing the gdb) could cause the paste to fail/complete incorrectly.

What I have found is that it is quite inconsistent. Yesterday I had an mxd open which was referencing the file gdb. I then copied it through Windows Explorer and pasted it on the server. I was able to work with the contents on the server without a problem.

Today, the first thing I did after logging in was to copy and paste the same file gdb onto the server again. When I tried to open it in ArcMap, it was identified as a normal folder test.gdb and not an actual geodatabase with the name test.

Would using something like TeraCopy help in this case, or do I just have to hope that all the data will get carried over each time? I see a similar question noted that ArcCatalog is the safest for moving the gdb (I agree, I would not dare to cut and paste the gdb through Windows).


texts: OGR error: Can't create field T4_3FTC in Shape DBF file after QGIS "Add geometry columns"

texts:
I have a shapefile with a relatively extensive attribute table. I extended it by adding geometry data ("Vector > Geometry tools > Export/Add geometry columns") and now I cannot save the layer in a new file. When I try to save it as an ESRI shapefile, I get a message:
Export to vector file failed.
Error: creation of field T4_3FTC failed (OGR error: Can't create field T4_3FTC in Shape DBF file, reason unknown.)

When I try to save it as a Geopackage file, I get a message:
Export to vector file failed.
Error: creation of field fid failed (OGR error: Wrong field type for fid)

When I try to save it as a CSV file, the program crashes and I lose my work (tried at least three times).

Apart from that, the file works perfectly, the attribute table isn't corrupted in any way. What should I do to fix the issue?

Edit: the program finally generated a CSV file after around 5 minutes of being unresponsive. Still no luck with other formats.


texts: how do I enter start point in shortest path algorithm in QGIS 3.0.1?

texts: Are the x and y values displayed by the Vertex Editor (bottom left of image) not the same as the x and y values in my TestNetwork layer required by the Shortest path algorithm?


texts: owslib - geonetwork - Failed to establish a new connection: Connection refused

texts:
i am tring to search for a specific record in geonetwork with owslib, according to documentation in https://geopython.github.io/OWSLib/. but it fails :

>>> geonetwork = 'http://geonetwork-mshe.univ-fcomte.fr:8080/geonetwork/srv/fre/csw'
>>>
>>> from owslib.csw import CatalogueServiceWeb
>>> csw = CatalogueServiceWeb(geonetwork)
>>>
>>> csw.getrecordbyid(id=['8174d16d-240f-4199-9c2f-af6976e376b3'])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/owslib/csw.py", line 293, in getrecordbyid
    self._invoke()
  File "/usr/lib/python2.7/dist-packages/owslib/csw.py", line 647, in _invoke
    self.response = openURL(self.request, None, 'Get', username=self.username, password=self.password, timeout=self.timeout).read()
  File "/usr/lib/python2.7/dist-packages/owslib/util.py", line 186, in openURL
    **rkwargs)
  File "/usr/lib/python2.7/dist-packages/requests/api.py", line 53, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 468, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 437, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError:  HTTPConnectionPool(host='localhost', port=8080):
Max retries exceeded with url: /geonetwork/srv/fre/csw?outputFormat=application%2Fxml&service=CSW&outputSchema=http%3A%2F%2Fwww.opengis.net%2Fcat%2Fcsw%2F2.0.2&request=GetRecordById&version=2.0.2&elementsetname=full&id=8174d16d-240f-4199-9c2f-af6976e376b3
(Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f8f1975f510>:
**Failed to establish a new connection: [Errno 111] Connection refused'**,))

any idea ?


texts: Adding a drawn layer to a layer group dynamically

texts:
I am trying to save a layer drawn using OpenLayers 3.9 and add it to the map and list it using ol3-layerswitcher. The layer is being saved and can be accessed through the GeoServer using WMS.

Currently I am generating a JS file using PHP every time the map page loads, which contains all the saved layers. These layers are displayed on map and are listed using ol3-layerswitcher. The problem with this method is the map page needs to be reloaded every time a new layer is saved for it to display on map. I want to save the layers and display them dynamically without reloading the page.

I was able to achieve it with this code.

var num = 0;
var tmp = "tmp"+num;
var s = "s"+num;

$('#savelayer').click(function() {
    var slyrname = $('#slyrname').val();
    var getdrawn = $('#getdrawn').val();

    //TO SAVE THE DRAWN LAYER

    $.ajax({
        type: 'POST',
        url: 'savelyr.php',
        data: 'slyrname='+slyrname+'&getdrawn='+getdrawn,
        success: function() {
            console.log("Success");

            //TO DEFINE THE SAVED LAYER

            var s = document.createElement("script");
            s.innerHTML =
                    "var "+tmp+" = new ol.layer.Tile({"+
                        "title: '"+slyrname+"',"+
                        "source: new ol.source.TileWMS({"+
                        "url: 'http://localhost:8080/geoserver/TEST/wms',"+
                        "params:{'Layers':'"+slyrname+"'}}),"+
                        "zIndex:'1'});";

            document.getElementById("scripts").appendChild(s);

            //TO ADD THE LAYER TO LAYER GROUP
            map.addLayer(tmp);
            //drawngroup.getLayers().getArray().push(tmp);

            num++;
            console.log("Success 2");
        }
    });
});

This adds the layer to the map and is displayed in the layer switcher without any issue but the problem is I need the saved layer to be listed under a layer group.

So I am trying to add the layer to the layer group using the method described in this answer

drawngroup.getLayers().getArray().push(tmp);

This part of code is supposed to make it happen but it gives the following error when I add it to the code.

ol.js:152 Uncaught TypeError: a.Yf is not a function
    at ol.js:152
    at Array.forEach (<anonymous>)
    at Yc.k.forEach (ol.js:48)
    at uh.k.Yf (ol.js:152)
    at ol.js:152
    at Array.forEach (<anonymous>)
    at Yc.k.forEach (ol.js:48)
    at uh.k.Yf (ol.js:152)
    at G.k.Sp (ol.js:292)
    at G.<anonymous> (ol.js:279)

The same piece of code works when I try it on the browser's developer console and adds the layer to the group.

Can someone point me what the issue might be or what is it that I am doing wrong?


texts: QGIS VERSION 3.0, Pie diagram showing same values for all districts

texts:
I wish to make a pie diagram for the districts, for total male and total female for each district however after following all the correct steps, the values of the pie charts are the same in all the districts.

enter image description here


texts: How do I obtain the coordinates of the points that define the polygons' shape in ArcMap (not the centroid)?

texts:
I'm starting at ArcMap.
I want to export the coordinates of the points that form the line that defines the shape of each polygon.
I can add a new field to the attribute table, but when I calculate the geometry, it only provides coordinates of centroid, area and perimeter.
What about the "external" points I mentioned? How do I obtain them?


texts: I have created a Vector tile server using TileserverGL/Tessera. I have exported a few MBTiles layers through Tippecanoe. I must have to use Multiple MBTiles. Then I have designed the map through a JSON file. Now I want to create a similar design Raster Tile Server. How can I get a Raster MBTiles with a similar design?


texts:
I am planning out the creation of a web service for DTM editing.
I can think of two ways of handling the DTM data on the backend, but are there better methods?

Have a base dataset of DTM tiles. Elevation queries would come from here and edits would directly affect these files. Problems: Tiles would need to be rendered on the fly in order to handle the changing data. This could be slow. A cache would overcome this, but then you would need to have a mechanism to update affected cached tiles when the underlying data changes..so their may be a significant lag between creating an edit and actually being able to see it! There is also the problem of supporting multiple resolutions. By tiling the base data, you could potentially have different resolutions (on a per tile basis), but you would then need to interpolate when rendering, slowing down the render more!
Store the data as points and serve it directly to the the browser as vector tiles. This would mean no round-tripping to see edits or query points, plus you could easily support variable resolution (since there is no 'resolution' in vector data). However I would be concerned about the potentially massive amounts of data that might need to be transmitted (depending on the zoom level).

Any thoughts of implementing data editing services like these?

Further info:
The idea is to allow manual editing (draw a line/polygon and increase/decrease elevation in it by some delta) over a 2D map (DTM displayed with colorscale and/or hillshading)

Most/all edits would typically take place over a small area - these would be fine edits of e.g. waterways to prepare the DTM as input to modelling procedures.


texts: Are there any mobile Android Apps where you can edit the Features served via a WFS-T?


texts: Editing processing toolbox algorithm "Vector Layer Histogram" output

texts:
I have a vector/shapefile layer with around 1500+ individual symbols. Each symbol has an attribute 'EVIMean' that I need to use for a histogram and it is a numeric value.

I first tried the default histogram option for the whole layer, but it applies the histogram to every single symbol so I have like 1500+ histograms which make no sense. Then, using the processing toolbox, I used the algorithm "Vector layer histogram" and passed it the layer. It did what I needed to do.

However, its all blue and need something like that but with color.

So is there a way to edit the output of the algorithm? Or is there a better way to do this? I know python and I could obviously just use the data file and create a script with a library like matplotlib or numpy, but is there a way to do this with QGIS? I know we can add style files but how do I style a histogram


texts: QGIS CPP multi-platform plugin deployment

texts:
We're starting to look at porting some of our plugins over from ArcMap to QGIS and we're pretty excited about it.

Currently everything we have is written in C++ so it would be nice to use that on QGIS too.

So far the resources that I've found: Writing C++ Plugins, QGIS Coding and Compilation Guide seem good but they didn't answer my specific questions.

Can C++ plugins be deployed in the plugin store? If so, how do you do this in a multi-platform environment? Is there a cookbook for deploying C++ plugins across platforms?


texts: Create a credentials file for ArcGis/Android

texts:
I am running the OAuth2Sample app from the arcgis-runtime-samples-android projects. In the code it looks for a credentials file:

if (fileExists(mCredentialsFileName)) {

How do I create a credentials file? I believe I have all the data for it (username, client id, portal url, password, license key).


texts: Displaying relative concentration (heatmap) of point features in ArcMap?

texts:
I'm pretty new to GIS.

I have a large dataset of point features, all within a arbitrary geographical area (in this case, the greater San Francisco Bay Area). The point features have no other information besides lat/long.

What I want to do is display them in such a way that I can easily see concentrations. I think what I'm looking for is called a heatmap, although I've also seen things like "kernel density", "point density" and other terms.

The base of my map is several layers I got from a large dataset. That means that I don't really have a polygon layer that is just the area I'm looking at - the main layer is a polygon feature class of counties in the Western United States.  I could extract just the counties I'm interested in if that would make this process easier.

I'm looking for something like the images in dkwiens' post in this thread.

What do I need to do? The simpler the explanation, the better - I've spent quite a while on Google looking for this, and while I've found a lot of stuff that seems like it's what I want to do, I haven't been able to translate it to my problem.

I should mention that I think the closest I've gotten is with the point density tool. I set the "input point features" to the layer containing my points, the "Population" field to NONE (the other options are X and Y), and a cell size of 50. I've tried several values of Radius, both in map units and in cell units (whatever that means!). After running the tool, I get a layer that looks like the attached screenshot. But nothing actually shows up on the map.
Here's the screenshot:

I noticed that when I look at the generated "File GeoDatabase Raster Dataset" in ArcCatalog, the preview tab has nothing in it - just a blank white screen. Not sure if it's supposed to be like that or not.


texts: Error using SAGA raster creation tools. Input layer error: points?

texts:
I have a shapefile containing x,y,z values as a point vector layer. I want to interpolate these points to create a DEM. For that I use SAGA natural neighbour algorithm. However, I am not successful and the log indicates that there is an error in the input layer, that I paste here:

C:\PROGRA~1\QGIS3~1.6\bin>saga_cmd grid_gridding "Natural Neighbour" -TARGET_DEFINITION 0 -SHAPES "F:/MarRisk/Entregable_UMinho/MRisK_Patos_Topo171108.shp|layername=MRisK_Patos_Topo171108" -FIELD "Z" -METHOD 0 -TARGET_USER_XMIN 514215.933 -TARGET_USER_XMAX 514681.748 -TARGET_USER_YMIN 4666855.922 -TARGET_USER_YMAX 4667258.189 -TARGET_USER_SIZE 5.0 -TARGET_USER_FITS 0 -WEIGHT 0.0 -TARGET_OUT_GRID "F:/MarRisk/Entregable_UMinho/MRisk_DEM_171108_5m_NN.sdat"
Error: input file [F:/MarRisk/Entregable_UMinho/MRisK_Patos_Topo171108.shp|layername=MRisK_Patos_Topo171108]
Error: Points

I don´t find any help documentation on the specifics of these algorithms to check if my data is wrong, but as I understand a point layer should be the requisite input.
Any advice?
My system is:
Win10, 64 bit
QGIS 3.6 64 bit
SAGA 2.32.2


texts: How to mention multiple projections in MapServer MAPFILE?

texts:
Is there a way to mention multiple projection systems / spatial reference systems in MapServer's (ms4w 3.0.3) MAPFILE? For example for Malaysia - GIS data could lie across three spatial references WGS 84 / UTM zone 47N, WGS 84 / UTM zone 48N and WGS 84 / UTM zone 49N. The GIS data stored in Oracle DB has no SRID mentioned and each layer may consist of data that may lie in any of the above mentioned 3 spatial references. Is there a way we can dynamically project GIS data through mapfile?

Regards,
Shiva


texts: Why would Update (Analysis) tool from ArcGIS Desktop 10.0 create duplicate features in file geodatabase?

texts:
I am attempting to use the Update (Analysis) tool to update a right of way (ROW) polygon feature class with a roads polygon feature class.  The ROW feature class completely contains the roads feature class and I want to 'etch' the roads into it so I have one feature class with different attributes in one field for the roads area vs. non-road area.

The feature classes have identical fields; for my field of interest, I've given different values to the features in the roads vs. ROW classes.

On my computer, this works as expected - the roads are 'etched' into the ROW with the appropriate attributes so I can distinguish roads from non-roads.

However, on my colleague's computer, the update does not 'etch' the roads in...instead, where the roads are, the update creates two polygons with identical geometry - one with the road attribute and one with the non-road attribute.

I haven't been able to find anyone else with this problem by googling.  Has anyone else encountered this?  Any idea of potential causes?

Thanks!


texts: How to smooth interior polygons of one shapefile

texts:
I have a shapefile that includes the boundary of a field plus many interior polygons that represent levels of NDVI - we'll say High, Medium, and Low. The larger areas have jagged, irregular edges. There are also many many small (tiny) polygons. I'd like to eliminate the small ones and smooth the larger ones.
I've tried v.generalize.smooth and v.generalize.simply as well as the Smooth Geometry tool but nothing changes in the shapefile no matter what I do. I THINK it's only trying to act on the boundary of the shapefile which actually consists of very straight lines (maybe 30 vertices total).


texts: arcgis silverlight - how to delete/cut a part of a multipart polygon

texts:
Say I cloned a single-part lake polygon that had a hole for an island. Then I used the Editor Reshape command to cut a piece off. That incidentally caused a second part to be created where the island was, as seen here.

Now I want to get rid of that bogus island.

I've tried drawing a circle around it with the Cut command, tried the Reshape command again, no joy.

Help a dummy out?

(yeah I know my links are to ArcGIS Desktop editing tools, the better descriptions of the apparently more or less equivalent Silverlight API Editor commands)  ;-)


texts: What libraries do I need to execute this GRASS tool (or any other) from an script in R ? Has anybody try to compare performance between using r.viewshed from QGIS and r.viewshed from R ?


texts: determine the catchment area from dem or hillshade

texts: I want to determine the  catchment area of river from hillside. Is there a plugin that I can use in qgis ?


texts: Checking if vertices of polygon are in clockwise or anti-clockwise direction in QGIS?

texts:
Is there a simple way to calculate a field in QGIS indicating if the vertices of each polygon feature in a layer are in clockwise or anti-clockwise direction?

For simplicity, lets assume the layer has multiple polygon features, with a single geometry per feature (no multifeatures/multipolygons), and without donuts or other complications.

I have found related questions, but none of them give an answer to my question.

These ones are ESRI specific:

Order of polygon vertices in general GIS: clockwise or counterclockwise
Polygon creation (Clockwise rotation or not)

This one resolves the problem from a math point of view, but not applied to QGIS

https://stackoverflow.com/questions/1165647/how-to-determine-if-a-list-of-polygon-points-are-in-clockwise-order

The same algorithm is implemented in a shapely function - see links provided by Andreas Muller:

http://toblerity.org/shapely/shapely.algorithms.html
https://web.archive.org/web/20080209143651/http://www.cgafaq.info/wiki/Polygon_Area


texts: ArcPy featureclasstoshapefile_conversion- Duplicating files

texts:
Working with ArcGIS Desktop 10.5.1

I have a simple Python script to export all feature classes in a specific feature data set to a shapefile. It works, but it appears to duplicate the feature classes while exporting.

For example for 1 FC it produces 27 shapefiles of the same data and appends "_XX" after the name (XX is the number of duplicates)

My code is below... No idea why this is occurring, and it's 27 duplicates every time.

import arcpy

arcpy.env.workspace = r"Database Connections\Database.sde\path_to_Feature_dataset"
arcpy.env.overwriteOutput = True
rawOut = r"Y:\output folder path"

inFeatures = arcpy.ListFeatureClasses()
for feature in inFeatures:
    print "Exporting " + str(feature)
    arcpy.FeatureClassToShapefile_conversion(inFeatures, rawOut)
    print str(feature) + " Export complete! \n"


texts: Which GIS (with GUI) produces good-looking maps for a reasonable price?

texts:
I would like to produce some good looking wall maps. I have an excellent data set, but it seems that most GIS packages are geared towards data analysis etc. as opposed to producing an aesthetically pleasing map, especially when it comes to printing.

What is the best solution for producing a good-looking map? I have tried Quantum GIS, but it refuses to print large maps thanks to a bug. I am looking for something A) with a half-decent GUI and B) that doesn't cost the Earth.


texts: How to use field calculator for area calculations in QGis?

texts:
Possible Duplicate:
  Calculate area between contour lines on a DEM with Qgis 1.8.0-Lisboa

Based on a DEM of a whole country I have reclassified altitudinal bands with steps of 100 metres (100-200, 200-300...). Then I polygonized the bands in order to get shapefiles and summarized them with the tool „Singleparts to Multiparts“

Now I have one entry in the attribute table for each altitudinal band.

I would like to calculate the area of each band but no matter what I write or select at the field calculator settings, the result is alwasy the same (Even if I change the CRS). And when I save it (finishing the edit mode) the number turns to 0. What am I doing wrong?

I am using qgis 1.8.0.


texts:
Road Graph plugin in QGIS does not find the shortest path except when the feature is a single line. This might be due to the fact that I've used different CRS for layer and project while I edited the roads layer. Is there any way to find the shortest path in such situation. I've used snapping, but the Road Graph documentation reads:

  It is required to use layer CRS as project CRS while editing roads layer. This is due to the fact that recalculation of the coordinates between different CRS introduce some errors that can result in discontinuities, even when the «snapping» is used.


texts: Simplest Way to Create a Custom Choropleth Map for a Website?

texts:
I am working on a choropleth map for a real estate site. My current workflow is:

Edit and save SHP file's DBF in Libre Office Calc.
Load SHP file into Quantum GIS. Set colored breakpoints based on data.
Load modified SHP file in TileMill (MapBox). Layer it over basic map.
Push the map to MapBox host.

This whole process is very tedious considering that the choropleth map requires frequent updating.

Now, I am trying to find a more efficient workflow to produce the same result. My intuition is that leveraging Google Maps and Google Spreadsheets may be a better way to go. However, I haven't found a good tutorial that accomplishes my specific needs.

Any advice is greatly appreciated.


texts: Expand raster extent and set expanded values using nearest neighbor sampling

texts:
I have run a hydrodynamic model which has given me a grid of surface elevations throughout a bay.

I am trying to process the results in ArcMap (or QGIS if needed). My goal is to take the current grid and buffer/expand (not sure of the correct terminology) the extent of the grid by 2 cells the whole way around, and have the new buffered cells inherit the value (water surface elevation value) from the neighboring cells from which they were expanded.

From what I have worked out so far there is an Expand tool in the Spatial Analyst toolbox, however, it only works on integer rasters, and I am dealing with a float raster.

I converted my grid to an esri raster grid (displayed in red below) and then used the expand tool to expand the raster by 2 cells (expanded area displayed in green below). I then used the raster calculator and a Con statement to recopy the float values back to the expanded raster. However, this does not copy any values over to the expanded cells.

So my question is, is there any way to somehow interpolate or use a nearest neighbor type tool to set the values of the expanded cells to the nearby cells from which they were expanded?

I have out together an example image to help me explain my problem:

Any ideas/help would be great!

Thanks,


texts: Python plugins not available, OS X 10.10.5, QGIS 2.8.4

texts:
I’m using OS X Yosemite 10.10.5 and QGIS 2.8.4 Wien.

My mainproblem is that python support is disabled and I can’t use python plugins. QGIS seems to act fine and I’ve done a lot of work with QGIS.

In the next step I’ll need several plugins, but there isn’t any python plugins avaible. When I open Plugin Manager and take a look at “Settings”, I get a note “The settings on this tab are only applicable for Python Plugins. No Python support detected, thus no settings available.”

I have installed QGIS for three times according to this instruction http://www.konstantingreger.net/setting-up-qgis-2-8-on-macos-x-10-10-yosemite/ .

I’ve tried to solve this issue by entering “sudo rm -rf .qgis2″ into my terminal solved the issue. This is not the solution for this issue.

When I start QGIS this window comes up:

[ERROR] Can not make qgis.db private copy.

After that this window comes up:

  Couldn’t load qgis.user.
  Python support will be disabled.
Traceback (most recent call last):
File "", line 1, in
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 478, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/user.py", line 41, in
    os.makedirs(expressionspath)
File"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
File"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/Users/MyUserName/.qgis2'
Python verson:
2.7.10 (default, Jul 14 2015, 19:46:27)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]

QGIS verson:
2.8.4-Wien 'Wien', exported

Python path:
['/Applications/QGIS.app/Contents/MacOS/../Resources/python', u'/Users/MyUserName/.qgis2/python', u'/Users/MyUserName/.qgis2/python/plugins', '/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins', '/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7', '/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/site-packages', '/Library/Python/2.7/site-packages/numpy-override', '/Library/Python/2.7/site-packages/matplotlib-override', '/Library/Frameworks/GDAL.framework/Versions/1.11/Python/2.7/site-packages', '/Library/Frameworks/cairo.framework/Versions/1/Python/2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages', '/Library/Python/2.7/site-packages/PIL', u'/Users/MyUserName/.qgis2//python']


texts: How do I open the National Land Cover data in QGIS 3.0? Attached is an image of the files. It looks like it's an .rrd file.


texts: How to bootstrap an MSI to Esri .NET Add-in

texts: I support an old COM extension to ArcMap built using ArcObjects, and I'm exploring the possibility of porting it to an Add-in.  The main benefit I'm seeking with the add-in is its ease of deployment: the ability to place the deployed addinx file in a networked folder. Consequently I'm trying to avoid an installer. This particular extension makes extensive use of SqlGeometry and other SQL CLR types, and the current installer bootstraps the MSI for those types.  Is there a way to perform something similar with an add-in, or are we stuck with the COM extension and associated installer?


texts: ConvertTableToCsvFile_roads Attribute Error 'module' object has no attribute

texts:
I am trying to convert shp to csv.  I found the documentation here for ArcMap 10.3:
http://desktop.arcgis.com/en/arcmap/10.3/tools/roads-and-highways-toolbox/convert-table-to-csv-file.htm
but I keep getting

AttributeError: 'module' object has no attribute 'ConvertTableToCsvFile_roads'

I am using ArcMap 10.5.  Is this module no longer supported?  What would be the alternative for ArcMap 10.5?

def write_csv(poly_count, map_location):
    in_table = poly_count
    out_table = map_location + "poly_count.csv"
    print('in_table: {}'.format(in_table))
    print('out_table: {}'.format(out_table))
    #Converts the polycount shapefile to a csv that get_count() will use
    print('Converting poly_count shapefile to csv')
    csv_file = arcpy.ConvertTableToCsvFile_roads(in_table, out_csv_file, 'COMMA')
    print('CSV Conversion worked like a charm')
    return csv_file


texts: Get XML from Oracle sde.st_geometry SHAPE column using SQL

texts:
How can I access the XML contents of the SHAPE column of a feature class in sde.st_geometry/Oracle? I want to access the XML using SQL so that I can ultimately directly query the vertices that make up the geometry.

This page says that the POINTS attribute of ST_GEOMETRY is stored as a BLOB, which "contains the byte stream of the point coordinates that define the geometry". But I haven't found much more info than that. And it doesn't tell me how the SHAPE column is stored as a whole.

The XML Schema of the Geodatabase white paper talks about the XML of the geometry/SHAPE column on pages 44-46, 49-50 and in Apendix A. But there's nothing related to accessing it in the database.


texts: Use Minimum Bounding geometry to define map extent in data driven pages

texts:
I am using Arc Map 10.4 and I have a layer containing municipalities. I need to print all of these municipalities on a separate sheet. I figured I could use data driven pages to accomplish this. However there are huge size and shape differences between the municipality polygons. I created a minimum bounding geometry for all the different municipalities. (Using geometry type = envelope)
Now I want to use data driven pages (or any other way) to print these municipalities so that the extent of each sheet is defined by the minimum bounding geometry. Is this possible?


texts: How to multiply raster DEM with a linear graph value

texts:
I would like to multiply my Raster DEM  with a linear graph value y = mx + C. The graph values look as follows:

I want to make a new raster where each cell will represent a damage factor from above graph and by taking into account corresponding cell DEM value. It means, if any particular cell in my DEM raster has a elevation value 10 m, then in my new computed raster this will be damage factor 1. Similarly, any cell of DEM raster has a value of 20 m, the computed new value will be 3 as shown in the graph.

I am familiar with the approach called 'Reclassify'. But reclassify requires a certain range of value, for example elevation 10 - 20 m will be damage factor 1.5.

I want to compute every pixel of DEM raster and redefine it in the form of damage factor by following the linear equation.

Can I write an equation such as y = m*x + c in raster calculator in Qgis /Grass /ArcGIS?


texts:
Does anyone know, if it is possible to make osm2po able to load extra road data into SQL file, such as the surface tag? [1] I know it is not much used, but when it is, it would be nice to know if the surface is solid or soft.

I am able to set a category by using tags, .e.g., wtr.tag.surface.gravel, but then I can only set it to another category. It would be nice if I could pass on both the category and the surface :)

Any good ideas?

[1] http://wiki.openstreetmap.org/wiki/Key:surface


texts: Multi client (QGIS.ArcGIS Desktop)/ multi-user editing environment

texts:
I'm using ArcGIS Desktop 10.6.1 with PostgreSQL 10.3/PostGIS 2.4 and would like to edit PostgreSQL polygon features regardless of client (QGIS/ArcGIS desktop) without having to create an ArcGIS Enterprise Geodatabase.

How can I create a PostGIS database where edits are possible in ArcGIS Desktop?

Note as a test with a different method - I've created a Postgres database (with PostGIS extension enabled), then created an ESRI Enterprise geodatabase on top of this, created a "data_manager" user/schema and proceeded to import a layer (with pg geometry keyword) where I can edit in ArcGIS and QGIS.  However if a QGIS user creates a spatially enabled table in the data_manager schema, it's not registered with the geodatabase in ArcGIS.

Old/related posts (no longer relevant) due to changes of read/write at ESRI Desktop 10.4 then again at 10.6:

Using ArcGIS and QGIS together in multi-user editing environment?
Using PostGIS geometry for ArcSDE database?
Using OpenStreetMap Data in PostGIS database from ArcMap?
Creating a postgis database for ArcGIS
Editing PostgreSQL/PostGIS layer from ArcGIS for Desktop without Geodatabase/ArcSDE?


texts:
I am analyzing a database in ArcMap 10.1 and I wanted to know whether it is possible to trace what tables are linked to a particular Coded Value Domain? I am attempting to find a particular table.

I know that you can do this the other way around and look at what Coded Value Domains are being assigned to a table but as the database is soo large this isn't particularly useful.

Any suggestions would be helpful, thanks for your time.


texts: Use sf::st_intersects for interiors of polygons, not boundary?

texts:
I need to run an error-check in R on polygons imported from shape files via sf::st_read. Polygons that share some boundary points are fine, but I need to throw an error if there are polygons that share interior points.

st_intersects tells me that polygons with common boundary points do intersect but I need to know only whether interiors intersect. Is there a fast, simple way to do this?

A simple example: Why would the following polygons' interiors overlap?

A1 <- st_polygon(list(rbind(
   c(-9724223, 4954258),
   c(-9724234, 4954063),
   c(-9724202, 4954049),
   c(-9724186, 4954169),
   c(-9724211, 4954252),
   c(-9724223, 4954258))))
tmp <- st_polygon(list(rbind(
   c(-9724224, 4954255),
   c(-9724268, 4954013),
   c(-9724146, 4954008),
   c(-9724148, 4954135),
   c(-9724208, 4954257),
   c(-9724224, 4954255))))

A2 <- st_difference(tmp, A1)
st_intersects(A2, A1)
st_overlaps(A2, A1)
st_relate(A2, A1)


texts:
There are several feature how to grouped into categories depending on the feature?

id : "1"
lat : 88.777
lon : 88.777
name : "Name company 1"
cat_id: "12"

id : "2"
lat : 77.777
lon : 77.777
name : "Name company 2"
cat_id: "30"

id : "3"
lat : 99.777
lon : 99.777
name : "Name company 3"
cat_id: "12"

cat_id = name category

There are several features how grouped by category?
Depending on the category feature.

the logic of something like that:

if(value['Category'] == '12'){
 //put feature in a group of 12
}
else if(value['Category'] == '30'){
 //put feature in a group of 30
}


texts: Standard deviation or standard error, which is right to present along with average as error bar?

texts:
I have monthly sea surface temperature data set for 1 year.

I need to present seasonal average as bar chart and error bar to show deviation in each season.

for example,
season 1 = nov+dec+jan+feb/4
season 2 = mar+apr+may+jun/4
season 3 = jul+aug+sep+oct/4

Now I have seasonal average.I should show the error bar.
To show the error bar, can I use standard error?
or should I use standard deviation?

Standard error looks good when add to the bar chart (error bar is smaller than the mean).

But the error bar of standard deviation is longer than the mean, when deviation is higher.

Which one is correct method?


texts: How to organise species inventory data by survey plot? Mapinfo

texts:
I am undertaking a flora species inventory at each of approximately 40 plots. The location of each plot will be recorded with GPS and mapped in a GIS layer. I would like to include the full species inventory (expected to be ~30-40 species per plot) in the attribute data for each plot. Ideally, I'd like to be able to query the plots for an individual species (not all species are expected to occur in all plots).

What is the best way to organise my data? Does each individual species require its own cell (in which case, how should I structure/name the column headings?), or is there an effective way of incorporating the entire list in a single cell (i.e. single column with title 'species list', or something similar)?

Or perhaps I should organise the species data as presence/absence, including species names (or codes) as column headings for all species recorded across all plots?

Help much appreciated.

dw


texts: arcpy fails to get spatial reference in hydro script

texts:
I have an ArcPy script that extracts a stream network from any chunk of terrain.  It takes the terrain and if it's in a GCS, it projects it to the correct UTM zone prior to further processing.  Though the projection is accomplished successfully, it's failing to successfully perform the fill sink operation.  Here is the code in question.

out_raster = r"in_memory\utm_{}".format(utm_grid_name)
utm_projected_terrain = arcpy.ProjectRaster_management(dted, out_raster, projection_string)
arcpy.AddMessage('Done reprojecting raster.')

arcpy.CheckOutExtension("Spatial")

#do the fill
outfill = Fill(utm_projected_terrain)
arcpy.AddMessage('Done with fill sinks')

I keep this in memory because this workstation has 128gb RAM, it's more efficient and quicker to perform the analysis here.  The terrain file size is anywhere from around 35-100mb.

Here is the error I'm getting; strangely it seems to do with Spatial Reference:

Traceback (most recent call last):
  File"C:\Temp\PyCharmProjects\Hydro\stream-network-extractor.py", line 81, in <module>
    outfill = Fill(utm_projected_terrain)
  File "c:\arcgis\pro\Resources\arcpy\arcpy\sa\Functions.py", line 2307, in Fill
    z_limit)
  File "c:\arcgis\pro\Resources\arcpy\arcpy\sa\Utils.py", line 53, in swapper
    result = wrapper(*args, **kwargs)
  File "c:\arcgis\pro\Resources\arcpy\arcpy\sa\Functions.py", line 2303 in Wrapper
    z_limit)
  File c:\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 496, in <lambda>
    return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: ERROR 999999: Something unexpected caused the tool to fail.  Please refer to the error help for potential solutions, or contact Esri Technical Support http://esriurl.com/support.
No spatial reference exists.
Failed to execute (Fill).
Failed to execute (StreamOrderExtractor).

So this mystifies me because when I run the reprojection script on its own, in the in_memory environment, I get a good result, there is a spatial reference, no errors in the output.  Why is Fill failing?


texts:
I got none type while trying to open those tiff data. What issue could it possibly be?

I tried this:

import glob

images_tiff = []
for im in glob.glob(os.path.join(data_path, "*.tiff")):
    im = gdal.Open(os.path.join(data_path, im))
    images_tiff.append(im)
print( images_tiff)

[<osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x000002DA79D68AB0> >, <osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x000002DA79D68CF0> >, <osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x000002DA79D68A20> >, <osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x000002DA79D68B70> >, <osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x000002DA79D68A80> >, <osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x000002DA79D68D20> >, <osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x000002DA79D68990> >, <osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x000002DA79D68C00> >, <osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x000002DA79D682D0> >, <osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x000002DA79D68D50> >, <osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x000002DA79D68C60> >]


texts: Determining if polygon lies completly in another polygon or only partly using QGIS?

texts:
I primarily use QGIS.

I have two Layers which both contain polygons.So one layer(A) contains only one polygon, the other contains a number of polygons(layer (B)).

I can run the Intersect-Tool and QGIS returns the polygons of layer (B) which completly or partly lie within the polygon of layer (A).

But is it possible that QGIS returns a classification of those intersecting polygons of layer (B) by "lying completly" inside the the polygon of layer (A) and "lying partly" inside the polygon of layer (A).

Maybe this could be done by calculating and comparing the area of the polygons of layer(B) before and after intersecting, but I would like to avoid that for reasons.

And how can I automate this with a script?


texts: Weather data in rotating grid without time dimension or vertical dimension or CRS

texts:
I am a beginner using QGIS 2.18.15. I am having some trouble to find the right coordinate reference system for   wind speed data of Europe from the German Weather forecast service (DWD). (ftp://ftp-cdc.dwd.de/pub/CDC/grids_europe/monthly/wind/MIKLIP_DECREG/v002/)

The data is projected in a regular rotating grid with a virtual North Pole at 39.25 N, 162.00 W (rotated coordinates). When I add the raster layer to QGIS it tells me that there is no “pre stetted” CRS so it automatically uses the CRS EPSG: 4326, WGS 84. As a result the layer of Europe is now half on Africa half on the Atlantic Ocean. So I looked for a possible CRS online but could not find any.

As the grid is rotating someone told me that the question “Manually transforming rotated lat/lon to regular lat/lon?” might solve my problem. But it does not. In this question we got two data sets. I just have one data set in a rotating grid and I don’t have the according regular coordinate system. Further on I would still need to know the CRS of the out-put coordinates which I could not find online.

Another user told me to have a look at the question "Transforming data from a rotated pole lat-lon grid into regular lat-lon coordinates in QGIS?". As I am a total beginner of Python too, I am lost with the presented code. Copying and modifying with my values did not work out. I even still don’t know which CRS I would be supposed to use.

As I am trying everything I also tried affine transformation but as I could not chose my data set as a layer it first did not work out ether. I guessed that’s because my data is a raster-layer and not a vector-layer. So I transformed my raster into a vector layer. That workef out but I recieved this warning.

The data set seems to have no time dimension or vertical dimension. Now I stack with the spreadsheet. I don’t know what I have to fill in.

Is this even a right  approach to solve the problem?


texts: Conversion of UAV DN values to reflectance

texts: My aim is to carry out fusion between Sentinel 2 and UAV images. Sentinel images are already converted to reflectance values but UAV images are in DN number format. How can I convert UAV DN values to reflectance for this purpose?


texts: Creating measure tool that can be used on 3D model on ArcGIS Online?

texts:
I have a 3D-Point cloud model of a rock formation that I want to upload onto ArcGIS Online.

Is there a way to create a tool for the web user to determine distance across the surface of the model, and also to determine volume of a layer that the user can draw?

I have separated the different geological layers into multipatches and would like the ability to determine the volumes of a section of the layer based on a user drawing input.


texts: Is there a way to take your QGIS project and save the grouping, styles, and layer names as is and turn them into a KML file to open in google earth?


texts: How to use the QGIS GDAL Toolbox Offset lines?

texts:
I try to create a single sided Offset line for a line.
I used the GDAL-Tool "Single sided buffer and offset lines for lines" but I fail.

The error message says "wrong number of arguments to function ST_OffsetCurve()" see the screen shot below.

What am I doing wrong except that I use QGIS 2.14 under Windows 10 64bit.


texts:
I am trying to accomplish some image stacking task in python. I am not proficient in Python and was hoping I can get some guidance to get started.

So I have large number of landsat  images. Landsat images for one particular year are stored in a folder and there are sub-directories for each scene. For each scene there are numerous tif images for different VIs and I need to stack them according to their dates.I can stack images in one single folder by reading each image. But I want to automate the process as different path_rows have different number of images(one path_row might have 5 image but other one might have 10 image).


texts: ArcObjects SpatialFilter not working well

texts:
What I'm trying to do is this:
I have a point that is snapped to an edge in ArcMap, and I'm using a SpatialFilter to find polyline and polygon features where the point intersects the interior of the geometry (polylines) or the boundary of the geometry (polygons). This strategy is not always working for the polygons.

I'm using a SpatialRelDescription of "*T*******" (i.e. where the interior of the point has a relationship with the boundary of the polygon) for the point-polygon comparison. Sometimes it finds the polygon feature sometimes it doesn't.

To get around this I'm buffering my point with a small radius and using that to execute the query which works, but is not ideal.

Does anyone have any idea why I'm finding my polygon features every time when using point geometry for comparison? Does this application of SpatialFilter just not work well? Am I setting it up wrong?


texts:
Is GeoTIFF with lzma compression commonly implemented?

I have geotifcp.exe from qgis but doesn't seems implement lzma.
Is there available sources for libgeotiff with lzma patch?


texts: How can I turn QGIS into a simple hiking planner?

texts:
I'd like to try and turn QGIS into a simple hiking planner. I have found and worked out how to import OS raster mapping at the correct scale and how to add freehand vector lines to the mapping, which is a start. I'd now like to take things a bit further and make QGIS do something more useful. I realise there are commercial products available that do a similar thing, but they cost money!

I have started to play around with extra attributes to the vector lines I am adding in my vector 'routes' layer, such as length in Km, length in miles etc. However, I'm not sure how to do this effectively.

The length of the line in Km is already encapsulated in each line in the (Derived) section of the id. I'd like to grab that and put it in its own, easier to view column. I'd also like to automatically have QGIS convert this to miles in another column.

Finally, if possible, I'd like QGIS to calculate and somehow display the length and bearing of each leg (ie the distance between each node), which I suspect might be trickier.

Is any of this possible?


texts: Value of a ComboBox within a QGroupBox (in a form) by using PyQt5

texts:
In QGIS3 I would like to get the current form-value of a ComboBox, that is within a QGroupBox (in the form).

I would like to get that value by using PyQt5.

Has anybody an idea?


texts: How to listen for ESRI drawing events using ESRI drawing tools in ArcObjects?

texts: I am trying to make use of the built-in ArcObjects drawing tools (ie ControlsNewCircleTool) - but I need to listen for the events so I can add the drawing graphics to the database in our application.  Is there an event or way to listen for when the user has drawn a new graphic and also modified it?


texts: Drop down list QGIS Plugin based on keyword search

texts:
I am developing a QGIS plugin, using python and Plugin Builder plugin of QGIS. I have created a textEdit text box on the plugin. I want to show a list of matching words from the database as user will type in the textEdit and words will be shown in drop down as google and any other search engine provides.

Basically I want to build a search engine. It's like I want to use 'LIKE' operator and based on that I want to show matching results in drop down in the plugin. How is it possible in QGIS plugin. What event I have to use with the textEdit to list down the search. If there is any other open source plugin with same functionality available that would also be helpful.


texts: clustering map (North, Centre, South) in R

texts:
I am looking for a method to partition map in 3 groups (North, Centre, South) like this:

how to do this in R please

stations.txt

Code :

Al <- shapefile("DZA_adm/DZA_adm0.shp")

# read in ascii file, and assign column names
x <- read.table('E:/cluster/stations.txt', sep=";")
names(x) <- c('long', 'lat')

# subset original object, return only x,y cols
y <- data.frame(x[,1:2])
#coordinates(y) <- ~long + lat
# simple plot of x,y data
plot(y, pch=4)
plot(Al,add=TRUE)

Partition the map above I done manually, looking for a way to do this automatically ,Which (modified) clustering algorithm will be appropriated for such task? (I work with R)?


texts: Converting Ordnance Survey raster maps to WGS84 webmap tiles

texts:
I would like to generate Google/Bing-like map tiles from Ordnance Survey's 1:25000 and 1:50000 raster maps, which are provided as 4000x4000 UK national grid tiles (GeoTIFF).

A sample tile can be found at http://www.ordnancesurvey.co.uk/docs/sample-data/25k-raster-sample-data.zip .

Thanks to this site and others (this is my first time using proper GIS tools), I have succeeded in using gdalwrap to reproject the tiles, and gdal_retile.py to cut the reprojected tile into smaller pieces.

I still have the following questions:

the source files use a color map, so based on my single-tile sample, I
converted that to 24bit color in order to be able to use a better
resampling algorithm than nearest neighbor, but I don't know how
scalable that will be to the whole of the UK. Is there a way to get a quality resampling without first converting to 24bit color?
how do I get gdalwrap or gdal_retile.py (or another utility) to align the generated tiles to the webmap grid (the world divided into 2^zoom tiles of equal lat-lon delta)? Right now my tiles are the right pixel size, but most likely not aligned to the lat-lon grid nor the zoom level
the tiles generated by gdal_retile.py are named according to each one's location in the source file, but I need to translate that to the global tile number for my zoom level. Do the tools support doing that on the fly, or do I need to post-process?
using gdal_retile.py with the -levels option generates sub-directories but the tiles therein are all black; I was expecting the zoomed out pyramid (and fewer tiles, not more, than the default level), should I be using a different option?
even for this smallish sample, each command seems to take an inordinately long time, and this is on an octo-core MacPro and SSD. Is there a performance guide for GDAL?

Here's what I have been doing, starting with the sx99.tif sample file:

pct2rgb.py sx99.tif sx99_24b.tif

gdalwarp -t_srs EPSG:3857 -r lanczos -wm 150 -multi -of GTiff sx99_24b.tif sx99_24b_warped.tif

gdal_retile.py -of png -levels 1 -targetDir tiles sx99_24b_warped.tif

Instead of gdal_retile.py, I've tried using gdal2tile.py on the pre-warped raster maps.

However, while the X coordinate for each of the generated tiles is correct, the Y coordinate seems to be at least double what I am expecting.

I've tried explicitly setting the source SRS and target profile, to no effect.

gdal2tiles.py sx99_24b_warped.tif

I can't understand what's going wrong. The warped intermediate image looks OK:

$ gdalinfo sx99_24b_warped.tif
Driver: GTiff/GeoTIFF
Files: sx99_24b_warped.tif
Size is 4074, 4085
Coordinate System is:
PROJCS["WGS 84 / Pseudo-Mercator",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs"],
    AUTHORITY["EPSG","3857"]]
Origin = (-396511.819462091429159,6584391.706861065700650)
Pixel Size = (3.948971656093984,-3.948971656093984)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( -396511.819, 6584391.707) (  3d33'42.93"W, 50d47'27.29"N)
Lower Left  ( -396511.819, 6568260.158) (  3d33'42.93"W, 50d41'57.18"N)
Upper Right ( -380423.709, 6584391.707) (  3d25' 2.66"W, 50d47'27.29"N)
Lower Right ( -380423.709, 6568260.158) (  3d25' 2.66"W, 50d41'57.18"N)
Center      ( -388467.764, 6576325.932) (  3d29'22.80"W, 50d44'42.32"N)

But the resulting files are in the range of (for zoom level 11): 1003 <= x <= 1004 and 1359 <= y <= 1360, where I was expecting y around 780...


texts: Download of very detailed DEM files for Portugal?

texts:
Operating system: Windows 10, 64 bit.
QGIS Version: 2.13.3 which I installed via the QGIS.org website.

I need contour lines for a small area in Portugal.

I saw a guide posted here: http://planet.qgis.org/planet/tag/contours/
which explains how to get some very detailed contour lines using a DEM raster image.

I have tried to search for DEM raster images but they all seem to not have the correct detail level and I end up with very straight contours.

Can any of you point me towards a place for downloading (if possible) free DEM raster images in a 1m x 1m grid?


texts:
Wondering how do I clip images to polygon outlines in a web map application based on OpenLayers or Leaflet? How can I limit web map users to see (visualize; qualitative) or query (quantitative) within the field polygons? E.g. user John has polys 1, 2 and 3 and user Mark has polys 7, 8 and 9. I want to limit John to just his polys and Mark to just his polys.
I guess I can clip the images for each user and his polys, but if there are multiple users wanting to access the same images and polys, its redundant to copy the images to multiple users... Is there a programmatic way to limit this? Open source tools are preferred.


texts: Finding position for named area or place in QGIS?

texts:
I am transitioning from ArcMap to QGIS.

In ArcMap the Find option and Location Tab, gives me the option to enter a Single Line Input to locate a map position for things like a River, Town or Lake.

In West Virgina I often am asked to find parcels of property of XX acres on "Buck Run" in Tyler County, or something similar.

How do I accomplish this in QGIS 3.x?

So far I have searched for Geocoding and Reverse Geocoding, but I may not be searching for the correct terms to accomplish a solution.


texts: Trying to merge 800+ shapefiles getting "Incorrect parameter value for LAYERS"

texts:
I have 800+ shapefiles and some of them have different type of attributes. When I use Merge Vector Layers and select all my shapefiles I get "Incorrect parameter value for LAYERS" error.

When I partially select the first 20-30 something shapefiles they merge together but if I select the next 20-30 shapefiles they won't merge. I was able to get the error "has different data type than in other layers (Integer instead of String)
Execution failed after 0.12 seconds" by trying to select the last 20-30 shapefiles at a time. So imagine this might be the cause of error when I try to merge them all together at once.

What can I do to merge all these shapefiles, without losing data? I just want to merge everything together, even if there will be duplicate fields in the attribute table. What can I try to merge these files? What could be the culprit here?