texts:
Occasionally experimenting in arcmap with openstreetmaps basemap and in google maps i noticed something strange. I measure the distance of 2 locations in google maps (screenshot 1)  and on another website which uses osm service http://www.pifpafpuf.de/cycleroute.html (screenshot 2) and the distance appears to be correct nearly the same. When i measure the same distance in arcmap 10.3 (screenshot 3)  with the measure tool Line measurement (Planar) it changes a lot , exactly there is a difference of nearly 50 km. I know this maps use the same projection method WGS_1984_Web_Mercator_Auxiliary_Sphere
EPSG 3857. I do not understand why does this big difference occur.


texts: Batch tool to identify coordinate system in dwg files

texts:
I am trying to ingest 1000's of DWG files into ArcGis.  Some of them are clearly georeferenced (that is, if I view them in ArcMap I can see that there are in the right place relative to my other GIS data).  Many of them are not geo referenced.

I don't know own a copy of AutoCad but I have the free TrueView DWG viewer installed.

Is there a tool that I can use to scan all of the DWG files and list which of them have a coordinate system assigned (and hopefully tell me what CS is defined).

Thanks,


texts:
I have a raster (seg) whose values I want to substitute, and am getting an error from function subs from the raster package that I don't understand at all.

I get the following error

Error in .local(x, y, ...) : duplicate "by" values not allowed

Even though I have no duplicates in my data frame.

The error show up with both of the following commands, which makes no sense to me.

seg <- subs(seg, tabulated, by="seg", which="class")
seg <- subs(seg, tabulated[which(!duplicated(tabulated$seg)),], by="seg", which="class")

From what i could find out from subs, it checks duplicates through the following commands

tt <- table(tabulated$seg)
tt <- tt[ which(tt > 1) ]
if (length(tt) > 0) {
  stop('duplicate "by" values not allowed')
}

When I run those commands myself I find that tt has a length of 0...

I am not sure how to share the specifics, so I copied the structure of the two objects. The dataframe has 5784018 rows, which corresponds to the number of unique values of the raster seg.

I am not sure what I am missing.

The structure of my raster is the following

Formal class 'RasterLayer' [package "raster"] with 12 slots
  ..@ file    :Formal class '.RasterFile' [package "raster"] with 13 slots
  .. .. ..@ name        : chr "/media/olivier/olivier_ext/gedata_current/jde_coffee/data/ES/Classifs/test/es3_seg2.tif"
  .. .. ..@ datanotation: chr "INT4S"
  .. .. ..@ byteorder   : chr "little"
  .. .. ..@ nodatavalue : num -Inf
  .. .. ..@ NAchanged   : logi FALSE
  .. .. ..@ nbands      : int 1
  .. .. ..@ bandorder   : chr "BIL"
  .. .. ..@ offset      : int 0
  .. .. ..@ toptobottom : logi TRUE
  .. .. ..@ blockrows   : int 1
  .. .. ..@ blockcols   : int 11497
  .. .. ..@ driver      : chr "gdal"
  .. .. ..@ open        : logi FALSE
  ..@ data    :Formal class '.SingleLayerData' [package "raster"] with 13 slots
  .. .. ..@ values    : logi(0)
  .. .. ..@ offset    : num 0
  .. .. ..@ gain      : num 1
  .. .. ..@ inmemory  : logi FALSE
  .. .. ..@ fromdisk  : logi TRUE
  .. .. ..@ isfactor  : logi FALSE
  .. .. ..@ attributes: list()
  .. .. ..@ haveminmax: logi TRUE
  .. .. ..@ min       : num -2.15e+09
  .. .. ..@ max       : num 2.15e+09
  .. .. ..@ band      : int 1
  .. .. ..@ unit      : chr ""
  .. .. ..@ names     : chr "es3_seg2"
  ..@ legend  :Formal class '.RasterLegend' [package "raster"] with 5 slots
  .. .. ..@ type      : chr(0)
  .. .. ..@ values    : logi(0)
  .. .. ..@ color     : logi(0)
  .. .. ..@ names     : logi(0)
  .. .. ..@ colortable: logi(0)
  ..@ title   : chr(0)
  ..@ extent  :Formal class 'Extent' [package "raster"] with 4 slots
  .. .. ..@ xmin: num 268734
  .. .. ..@ xmax: num 337716
  .. .. ..@ ymin: num 7714422
  .. .. ..@ ymax: num 7828590
  ..@ rotated : logi FALSE
  ..@ rotation:Formal class '.Rotation' [package "raster"] with 2 slots
  .. .. ..@ geotrans: num(0)
  .. .. ..@ transfun:function ()
  ..@ ncols   : int 11497
  ..@ nrows   : int 19028
  ..@ crs     :Formal class 'CRS' [package "sp"] with 1 slot
  .. .. ..@ projargs: chr "+proj=utm +zone=24 +south +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0"
  ..@ history : list()
  ..@ z       : list()

And the structure of the data frame is

'data.frame':   5784018 obs. of  3 variables:
 $ class: int  2 6 6 2 2 6 11 7 7 7 ...
 $ seg  : int  1 3 6 8 10 15 18 21 22 24 ...
 $ freq : int  2504 375 31 4 102 109 3 6 7 7 ...


texts: Working with GB SRTM Digital Elevation Model (DEM) 90m

texts:
I have downloaded the freely available DEM file from sharegeo open.

I would like to know for a set of points at what elevation they lie. I have imported the DEM file into ArcGIS but it seems strange; the highest point is 63.

I was wondering if anyone else has experience with this dataset or similar and could shed some light.


texts: Statistic for test of significant difference between 3 spatial distributions

texts:
I have three spatial averages of Particulate matter over a certain area as seen below.

There clearly seems to be a difference between average PM concentrations for each of these months, but how can I statistically say that there exists a significant difference between the three?


texts: How to hide other features that are not currently selected in leaflet?

texts:
If I load a JSON file I essentially get to do functions for each feature :

   var highlight = {
       'color': '#149c14',
       'weight': 4,
       'opacity': 1
   };

 ` $.getJSON("/data/geojson/gen.json", function(data){
           var genlayer = L.geoJson(data,{
           style:function(feature){
               return {color:"red"};
           },
           onEachFeature:function(feature, layer){
               layer.on('click', function(e){
                    //do functions to selected feature
                    selectedFeature = e.target;
                    layer.setStyle(highlight);
               });
           }
      });
    roads.addLayer(genLayer);
   });`

I'm trying to figure out a way though how to focus on the selected feature by additionally and temporarily hiding other features that are not selected at the moment.

How can I approach this problem in leaflet?


texts: Labeling places using local fonts like Singhala and Tamil fonts in ArcMap or QGIS?

texts:
I downloaded the Keyman desktop for the local keyboard/fonts. I would like to encode location names using Tamil/Singhala fonts in the attribute table and then use it to label the map. However, after saving the attribute table with the local fonts, it converts to question marks. Below are the images for before and after saving the table.

If the downloaded fonts are unrecognizable by ArcGIS/QGIS, how do we know which ones can be recognized?


texts: Converting Feature coordinates to text (same as output from UNGENERATE command in ArcInfo Workstation)?

texts:
I am trying to convert stream segments to text. This is function for the script

#function to convert feature to text as ungenerate command in ArcGIS workstation

def featureTotext(path,feature,TextFileName):

import string, os, sys, locale, arcgisscripting
gp = arcgisscripting.create()
gp.overwriteoutput = 1
msgNotEnoughParams = "Incorrect number of input parameters."
msgUseValidDecimalPointSep = "Please use one of the valid decimal point separators."
try:
    os.chdir(path)
    inputFC = feature
    outFile = open(TextFileName, "w")
    sepchar=""
    inDesc = gp.describe(inputFC)
    inRows = gp.searchcursor(inputFC)
    inRow = inRows.next()
   # outFile.write(inDesc.ShapeType + "\n")

    while inRow:
        feat = inRow.GetValue(inDesc.ShapeFieldName)

        partnum = 0
        partcount = feat.partcount

        while partnum < partcount:
            outFile.write("\t"+str(inRow.GetValue('GRID_CODE')) + "\n")
            print inRow.GetValue('GRID_CODE')
            part = feat.getpart(partnum)
            part.reset()
            pnt = part.next()
            pnt_count = 0
            while pnt:
                outLine = "\t" + str(pnt.x) + "\t" + str(pnt.y) + "\n"
                if sepchar == "": outFile.write(outLine)
                else: outFile.write(outLine.replace(".", sepchar))
                pnt = part.next()
                pnt_count += 1
                if not pnt:
                    pnt = part.next()
                    if pnt:
                        outFile.write("InteriorRing\n")

            partnum += 1
            outFile.write("END\n")
        inRow = inRows.next()
    outFile.write("END")
    outFile.flush()
    outFile.close()
    print outFile

except Exception, ErrorDesc:
    gp.AddError(ErrorDesc[0])
    if outFile: outFile.close()
    gp.AddError(gp.getmessages(2))

This script gives output similar as the "ungenerate" command in ArcGIS workstation. When used, this function gives the fewer output points than using the ungenerate command.

Output from this function look like :

    1354
    391367.254831      9456327.37568
    389617.254831      9458077.37568
    389617.254831      9459077.37568
    388117.254831      9460577.37568
    387117.254831      9460577.37568
    380117.254831      9467577.37568
 END

I want to have more points (smaller interval) while extracting X and Y coordinates from a feature. How can I do this ?


texts: Calculating average of values in raster in QGIS?

texts:
I want to get the average of values in a raster. How do I get this using Raster Calculator?

I was looking for this kind of function: AVE("yourraster@1") in the raster calculator.


texts: Couldn't load plugin MAPIR_Processing due to error when calling classFactory() method?

texts:
How to fix "Couldn't load plugin MAPIR_Processing due to an error when calling its classFactory() method"?

ImportError: No module named hid

Traceback (most recent call last):
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\qgis\utils.py", line 333, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:/Users/admins/.qgis2/python/plugins\MAPIR_Processing\__init__.py", line 34, in classFactory
    from .MAPIR_Processing import MAPIR_Processing
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\qgis\utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/admins/.qgis2/python/plugins\MAPIR_Processing\MAPIR_Processing.py", line 29, in
    from MAPIR_Processing_dockwidget import MAPIR_ProcessingDockWidget
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\qgis\utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/admins/.qgis2/python/plugins\MAPIR_Processing\MAPIR_Processing_dockwidget.py", line 39, in
    import hid
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\qgis\utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: No module named hid

Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]
QGIS version: 2.18.4 Las Palmas, 59c1d21

Python Path:
C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing
C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python
C:/Users/admins/.qgis2/python
C:/Users/admins/.qgis2/python/plugins
C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\matplotlib-1.3.1-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\nose-1.3.3-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\tornado-4.0.1-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\backports.ssl_match_hostname-3.4.0.2-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\certifi-14.05.14-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\bin\python27.zip
C:\PROGRA~1\QGIS2~1.18\apps\Python27\DLLs
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\plat-win
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\lib-tk
C:\PROGRA~1\QGIS2~1.18\bin
C:\PROGRA~1\QGIS2~1.18\apps\Python27
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\PIL
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\pytz-2012j-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Pythonwin
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\wx-2.8-msw-unicode
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg
C:/Users/admins/.qgis2//python

Anyone know how to fix this?


texts:
I'm trying to generate an histogram of the y coordinates where raster values are 1. Mysteriously the following, different rasters, give me the same histogram. What could I be doing wrong?

here are the rasters:
https://www.dropbox.com/sh/8d47f7869kcrfvo/AACpgCfe1-Bt7xD6j1rAUebda?dl=0

require(raster)
raster1=raster("raster1.grd")
raster2=raster("raster2.grd")
plot(raster1)
plot(raster2)

one=xyFromCell(raster1,which(values(raster1)==1))[,2]
two=xyFromCell(raster2,which(values(raster2)==1))[,2]

hist(one, xlim=c(0,100),ylim=c(0,.3),col="red",freq=F,main="",xlab="Latitude")
hist(two,freq=F,col="green",add=T)


texts:
Everytime I click on the map I create a draggable marker with a drag function. It works great, however everytime I release the mouse after I dragged some marker, the click event of the map is triggered. How can I stop that ?

map.on('click',
    function (e) {
        var pos = e.latlng;
        console.log('map click event');

        var marker = L.marker(
            pos,
            {
                draggable: true
            }
        );
        marker.on('drag', function (e) {
            console.log('marker drag event');
        });
        marker.on('click', L.DomEvent.stopPropagation);
        marker.addTo(map);
    }
);

Edit: marker.on('click', L.DomEvent.stopPropagation); This partially fixes the bug. Now if I drag the marker VERY quickly and release it, the bug still occurs, because the marker "follows" the mouse cursor in a speed slower than the speed with which I move my cursor, and so when the mouse is released, the mouse is not on the marker anymore, so the map click event is triggered.


texts: Calculating shannon diversity index from multiple rasters in ArcGIS raster calculator?

texts:
I'm a basic ArcGIS user with no experience in Python coding (but some experience in R). I have several rasters, each representing the density of a given variable. My goal is to apply the shannon diversity index to the rasters and produce a new raster showing the diversity of these variables.

The diversity formula is as such:

Is there a tool or plugin for this? I am familiar with raster calculator, but this equation seems a bit to complicated... eg, how to enter sigma and calculate the proportions?

I also found some Python code, but I have a feeling that it will be a substantial endeavour to open up a new type of code and to get this running. https://gist.github.com/audy/783125

Is Python code the only way to do this, or would this be easier in R?


texts: Editing Symbology based off two qualitative attributes using ArcGIS Pro?

texts:
I have a map that shows the location of businesses. The underlying table also includes number of employees per company as well as industry. I know how to tweak the symbology to make my points use unique colors per type in the industry column. I also know how to vary the size of my points using graduated symbols. I cannot seem to figure out how to do both.

As a note: I know that I can take my unique colors by industry and then use "Vary symbology by attributes" to change the point sizes. However, this seems to use a continuous scale on the sizing and I want to be able to define the bin boundaries, (for instance: 0-100 employees, 100-250 employees, etc.)

I do not believe there is a way to do this in the GUI, though if there is, great! I know python and could write the conditionals to do this, but I am new to using python with Esri, so I am not sure how to apply things to the map with code - or even if it's possible.

Any guidance?


texts: Seeking open source ArcGIS REST API compatible server?

texts:
Are there any open source tools out there that can provide an ArcGIS REST API compatible interface or similar functionality?

Many of our clients are running ArcGIS software and are asking us for REST API endpoints, but we are trying to stick to free software.

Is there a way to satisfy our ArcGIS clients but at the same time avoid going down a road filled with proprietary software?

We serve biodiversity data in a mix of polygons and point data with attributes.


texts: Change of data type after exporting from PostgreSQL to shapefile

texts:
I had loaded shapefile created in QGIS 2.8.9 with following data type in PostgreSQL as shown in image.

After import the shapefile in PostgreSQL the data type shown as below.

When I export the data from PostgreSQL to shapefile its data type changes as shown below.

Is there any way to preserve the data type while exporting data to shapefile. I am using "PostGIS 2.0 Shapefile and DBF Loader Exporter" GUI.


texts: Is it possible to do raster calculations with ST_Union (PostGIS)?

texts:
I would like to perform raster calculations in PostGIS. (A change detection should be performed, for this purpose every pixel of different raster is accessed and it is checked if the pixel values have changed over the time period).
Which PostGIS function should be used best for this? I thought ST_MapAlgebra would be the best choice, but in this post it was written that ST_Union is better suited for this purpose, even if simple calculations are to be performed.
So what function should be used and how would you implement the change detection. (The Analysis will be similar to this GDAL Calculation, where A,B,C,D,E are five different bands.  (logical_and(A-B, B-A) != 0) * 1 + (logical_and(B-C, C-B) != 0) * 1 + (logical_and(C-D,D-C) != 0 )* 1 + (logical_and(D-E,E-D) != 0) * 1
Edit: Furthermore can you do calculations with ST_MapAlgebra with more than two bands?


texts: How to import Osmosis DB schemas into PostGIS DB

texts:
I'm trying to import Osmosis schema into into a PostGIS DB. I followed this article.

I created a DB:

createdb osm_schema

Then I executed the following command:

osmosis --write-pgsql host="localhost" database="osm_schema" pgsimple_schema_0.6.sql

pgsimple_schema_0.6.sql  is the basic schema I found in Osmosis tarball inside Script directory.
The command above fails to execute. I got the following error:

  Nov 16, 2012 6:51:39 PM org.openstreetmap.osmosis.core.Osmosis run
  INFO: Osmosis Version 0.40.1 Nov 16, 2012 6:51:41 PM
  org.openstreetmap.osmosis.core.Osmosis run INFO: Preparing pipeline.
  Nov 16, 2012 6:51:41 PM org.openstreetmap.osmosis.core.Osmosis main
  SEVERE: Execution aborted.
  org.openstreetmap.osmosis.core.OsmosisRuntimeException: No default
  pipes are available as input for task 1-write-pgsql.  at
  org.openstreetmap.osmosis.core.pipeline.common.PipeTasks.retrieveTask(PipeTasks.java:150)
    at
  org.openstreetmap.osmosis.core.pipeline.common.TaskManager.getInputTask(TaskManager.java:165)
    at
  org.openstreetmap.osmosis.core.pipeline.v0_6.SinkManager.connect(SinkManager.java:50)
    at
  org.openstreetmap.osmosis.core.pipeline.common.Pipeline.connectTasks(Pipeline.java:74)
    at
  org.openstreetmap.osmosis.core.pipeline.common.Pipeline.prepare(Pipeline.java:116)
    at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:86)  at
  org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)  at
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)     at
  org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:328)
    at
  org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
    at
  org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
    at
  org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:31)

What am I doing wrong?


texts: How do I change the pixel size in GDAL without changing the extent?

texts:
I need to change the pixel size of a GTiff in Gdal without changing the extent.

When I use gdal_translate -tr xres yres src_dataset dst_dataset

It changes the extent. I do not need a rescaling or interpolation. I just need to change the pixel size value from .041 to 4.6 for both x and y and not change anything else including the extent. Think of it as changing a value in the header.

OR

the inverse.

Just overwrite the extent but not change the pixel size would work. Open to Arc solutions as well.


texts:
I have recently become aware of a number of tile-server map sources and I would like to use these as overlays in Google Earth.  Is there a way to do this directly that does not involve pre-downloading the tile data and converting it into a Super Overlay?

For example here is a tile server URL for a resource I wish to overlay:

https://gis1.usgs.gov/arcgis/rest/services/gap/PADUS_Owner/MapServer/tile/{$z}/{$y}/{$x}

I know there is already a KML overlay for this resource; I am using it as a generic example.
I am using the now-free Google Earth Pro if this makes a difference.

(This seems like a question that would have been asked before but I could not find a duplicate.)


texts: transforming 0 to 1 coordinates to other measurement

texts:
I am not experienced with ArcGIS and trying to perform some analysis on using the Statistics toolbox.

The dataset I'm using is the redwood dataset used by Diggle 1983. An example can be found here. The data I received is in coordinates from 0 to 1 but the area is actually 23 sqm.

I know how to display XY event in ArcMap for the 0...1 coordinates, but want all the calculations to be in meters and relevant to the scale.

Do I just multiply it in 23?


texts: Editing Individual Tiles From ArcGIS Online Tiled Map Service

texts:
Is there a way to edit or replace tiles individually?

For example, if I have published a tiled layer and need to update small details of that layer I currently have to overwrite the entire tiled layer resulting in a large use of credits for a small change.

By accessing the Admin section of the tile layer, the following supported operations are available:

Edit
Refresh
Swap
Cancel
UpdateTiles
ImportTiles
DeleteTiles

I am not sure if any of these operations would help in achieving what I am trying to do, or if there is another workflow or tool that may be helpful.


texts: Interpreting ArcGIS flow accumulation tool results in urban areas

texts:
Using ArcGIS 10.8 I successfully ran through the following geoprocessing tools to complete a flow accumulation analysis of a USGS 1/3 arc second DEM of a portion of Houston, TX:
Fill --> Flow direction --> Flow accumulation
However, the results appear way more granular than I anticipated...
Black lines are flow accumulations and red lines are neighborhood boundaries (see below screenshot).
I have no background in hydrology but given the geography/terrain of Houston I had anticipated seeing "ponds" or pools of accumulation rather than lines that follow only certain streets and the very centerlines of streams.  How should these accumulation flows be interpreted considering the widespread flooding that happened after Hurricane Harvey and other major storms?  What might be a target resolution that would allow me to derive larger "pools" of accumulation in this urban context?


texts:
I am getting NMEA output (WGS84) from my GPS and would like to put that into Postgis table.

Format of the coordinate is 3267.56N 02575.92W.

Is there way to insert that coord in db ?


texts: Field Calculator convert text to integer then populate new field with sum


texts: How to avoid Pink tiles when DB view/Table is empty?

texts:
I have views that are spatial in a sense that they select some spatial column from other table. This table is published using geoserver. This table is live and sometime has no data at all. When the table has no data the wms displayed is all red and error in firebug console is:

The WMS returned:

>  <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE
> ServiceExceptionReport SYSTEM
> "http://192.168.70.65:80/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1" >   <ServiceException>
>           java.lang.NullPointerException
>     null
>     </ServiceException></ServiceExceptionReport>

The Code:

function init(){
            OpenLayers.IMAGE_RELOAD_ATTEMPTS = 1;
                OpenLayers.Util.onImageLoadErrorColor = "transparent";

                map = new OpenLayers.Map('map', {
                    projection: new OpenLayers.Projection("EPSG:900913"),
                    displayProjection: new OpenLayers.Projection("EPSG:4326"),
                    numZoomLevels: 21,
                    maxExtent: new OpenLayers.Bounds(-20037508, -20037508,20037508, 20037508.34),
                    controls: [
                        new OpenLayers.Control.Navigation(),
                        new OpenLayers.Control.PanZoomBar(),
                        new OpenLayers.Control.LayerSwitcher({'ascending':false}),
                        new OpenLayers.Control.ScaleLine(),
                        new OpenLayers.Control.MousePosition(),
                        new OpenLayers.Control.OverviewMap(),
                        new OpenLayers.Control.KeyboardDefaults()
                    ]

                });

Using GeoExt:

<script src="http://localhost/geoserver/www/ext/adapter/ext/ext-base.js" type="text/javascript"></script>
        <script src="http://localhost/geoserver/www/ext/ext-all.js"  type="text/javascript"></script>
        <link rel="stylesheet" type="text/css" href="http://localhost/geoserver/www/ext/resources/css/ext-all.css"/>

        <link rel="stylesheet" href="http://localhost/geoserver/www/openLayers/theme/default/style.css" type="text/css" />
        <script src="http://localhost/geoserver/www/openLayers/OpenLayers.js" type="text/javascript"></script>

        <script src="http://localhost/geoserver/www/geoext/lib/GeoExt.js" type="text/javascript"></script>
        <link rel="stylesheet" type="text/css" href="http://localhost/geoserver/www/geoext/resources/css/geoext-all.css"/>

        <script>

            OpenLayers.Util.onImageLoadErrorColor = 1;
            OpenLayers.Util.onImageLoadErrorColor = "transparent";

            Ext.BLANK_IMAGE_URL = "http://localhost/geoserver/www/ext/resources/images/default/s.gif";
            var app, items = [], controls = [];
            var lon = 85.344;
            var lat = 27.7;
            var zoom = 12;
            var url = "http://localhost/geoserver/wms";

            Ext.onReady(function() {
                app = new Ext.Viewport({
                    layout: "border",
                    items: items
                });


texts: How to effectively write METADATA to GeoTIFF with GDAL utils other than gdal_translate

texts:
I can write some metadata to GeoTIFF with gdal_translate using -mo, example:

gdal_translate in.tif out.tif -mo TIFFTAG_ARTIST="It was me" -mo TIFFTAG_IMAGEDESCRIPTION="This data my layer"

I suppose that it should be possible to do the same job with other GDAL v2.x utils (gdalwarp, gdal_calc.py, etc.), but I could not find, how. Is there such option?

OR

Should I always use gdal_translate for this job?

The problem with gdal_translate is that it always creates a NEW file. I work with large GeoTIFFs. So just to add some lines of metadata takes o lot of time. Is there a way just to add Metadata to GeoTIFF without re-creating it again?


texts: Exporting an ImageCollection in Google Earth that is viewable

texts:
I have tried a handful of things ( different export settings ) but every time I download the tiff and try to view it in various applications, I see it is either corrupt, empty, or black.  The layers added to the map are all rendering well so I am thinking I have to something with the bands to make the export viewable?  Here is my code:

var bexar = ee.Geometry.Polygon({ coords: ...some long geojson polygon... })
var recent = ee.ImageCollection('COPERNICUS/S5P/OFFL/L3_NO2')
.select('tropospheric_NO2_column_number_density')
.filterDate('2020-03-15', '2020-04-24')
.map(function(image){return image.clip(bexar)}) ;

var febmar = ee.ImageCollection('COPERNICUS/S5P/OFFL/L3_NO2')
.select('tropospheric_NO2_column_number_density')
.filterDate('2020-02-04', '2020-03-14')
.map(function(image){return image.clip(bexar)});

var janmar = ee.ImageCollection('COPERNICUS/S5P/OFFL/L3_NO2')
.select('tropospheric_NO2_column_number_density')
.filterDate('2019-12-26', '2020-02-04')
.map(function(image){return image.clip(bexar)});

var band_viz = {
min: 0,
max: 0.00005,
palette: ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red']
};

Map.addLayer(recent.mean(), band_viz, 'recent N02');
Map.addLayer(febmar.mean(), band_viz, 'febmar N02');
Map.addLayer(janmar.mean(), band_viz, 'janmar N02');

Map.setCenter(-98.949287,29.771605, 7);

var recentBands = recent.toBands()
var febmarbands = febmar.toBands()
var janmarbands = janmar.toBands()

Export.image.toDrive(recentBands, 'lockdown_emissions')
Export.image.toDrive(febmarbands, 'febmar2019')
Export.image.toDrive(janmarbands, 'janmar2019')


texts: Installing QGIS 2.18 fails on Ubuntu Xenial (16.04)

texts:
I recently upgraded Ubuntu from 14.04 to 16.04. I had previously been using QGIS 2.14 which I had built from source against GDAL 2.10.

After the upgrade QGIS no longer worked so I attempted to install QGIS today and it fails at qgis-providers as follows:

error while loading shared libraries: libhdf5.so.7: cannot open shared object file: No such file or directory

Any idea what I may be missing? I've attempted to remove all traces of my old QGIS install/libraries/dependencies.

I'm installing against the debian sources:

deb     http://qgis.org/debian xenial main
deb-src http://qgis.org/debian xenial main


texts: Using Snap tool with iterator in ModelBuilder?

texts:
I have a folder containing large number of shapefiles that I would like to snap to a surrounding buffer.

I need to snap UK district boundaries to 500m buffer around coastline. I have produced 200m buffer inside UK coastline to reduce number of features and their vertices that I try to snap. I also simplified polygons a bit. I've been running Snap Tool for 24h and it is still running.

I was thinking to split my feature class with districts into separate shapefiles for each polygon (total (753 polygons) and then snap them (to edges, distance 1000m) one by one as the Snap Tool work just fine with single polygons.
I wanted to use iterator and the Snap tool in ModelBuilder, however it does not work.
I am splitting my feature class in separate shapefiles and saving them in Shapefile folder (and that works fine). Next I would like to take each shapefile snap it to Buffer and then merge all snapped files back together.

I do not have much experience with iterators and I am having trouble to get correct output

Is there any other way to have coastal districts snapped to 500m buffer?


texts: Unable to open datasource 'MySQL' using ogr2ogr

texts:
I am trying to dump shapefile data into MySQL using GDAL ogr2ogr command

ogr2ogr –f MySQL MySQL:SHP_DB,host=localhost,user=root,password=root feature_object.shp  -nln phil_custom -update -overwrite -lco engine=MYISAM

I am getting this error:

 -

FAILURE:
Unable to open datasource `MySQL' with the following drivers.
  -> PCIDSK
  -> netCDF
  -> JP2OpenJPEG
  -> PDF
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> OGR_SDTS
  -> S57
  -> DGN
  -> OGR_VRT
  -> REC
  -> Memory
  -> BNA
  -> CSV
  -> NAS
  -> GML
  -> GPX
  -> LIBKML
  -> KML
  -> GeoJSON
  -> Interlis 1
  -> Interlis 2
  -> OGR_GMT
  -> GPKG
  -> SQLite
  -> OGR_DODS
  -> ODBC
  -> WAsP
  -> PGeo
  -> MSSQLSpatial
  -> OGR_OGDI
  -> PostgreSQL
  -> MySQL
  -> OpenFileGDB
  -> XPlane
  -> DXF
  -> Geoconcept
  -> GeoRSS
  -> GPSTrackMaker
  -> VFK
  -> PGDUMP
  -> OSM
  -> GPSBabel
  -> SUA
  -> OpenAir
  -> OGR_PDS
  -> WFS
  -> HTF
  -> AeronavFAA
  -> Geomedia
  -> EDIGEO
  -> GFT
  -> SVG
  -> CouchDB
  -> Cloudant
  -> Idrisi
  -> ARCGEN
  -> SEGUKOOA
  -> SEGY
  -> XLS
  -> ODS
  -> XLSX
  -> ElasticSearch
  -> Walk
  -> CartoDB
  -> AmigoCloud
  -> SXF
  -> Selafin
  -> JML
  -> PLSCENES
  -> CSW
  -> VDV
  -> TIGER
  -> AVCBin
  -> AVCE00
  -> HTTP

I could not find any solution to this error.
What could be the possible cause of this error as I have dump shapefiles data successfully with the same command?

GDAL version is-
GDAL 2.1.0, released 2016/04/25

OS- ubuntu 14.04


texts: Italicizing scientific names in a legend

texts: I am trying to Italicize a scientific name in my legend (ArcMap 10.2). I can not figure out how to Italicize one word only without having the rest of the description being italicized as well. Is it possible to italicize only one word in a legend description?


texts:
I am working for the first time with gvSIG and SQL SERVER, I want to connect gvsig with spatial database SQL SERVER.

I don't know how to, Is it by using a protocol and which one ? plz help me


texts: Dealing with data which are not normally distributed when kriging?

texts:
I'm a novice with advanced spatial interpolation, and I'm trying to use the Geostatistical Analyst to interpolate a surface based on borehole data, using Ordinary Kriging.
The help file explains how to explore the data using the Normal Quantile-Quantile plot:

Points on the Normal QQ plot provide an indication of univariate
normality of the dataset. If the data is normally distributed, the
points will fall on the 45-degree reference line. If the data is not
normally distributed, the points will deviate from the reference line.
The Normal QQ plot provides a visual comparison of your dataset to a
standard normal distribution, and you can investigate points that
cause departures from a normal distribution by selecting them in the
plot and examining their locations on a map

I've selected the outliers in the Normal QQ plot for my dataset - what should I do next?

The help file mentions using a Log transformation to improve the distribution, but I don't have this option, only Arcsine. This makes no appreciable difference to the Normal QQ plot.
The blog entry Dealing with extreme values in kriging suggests excluding these points from the model - is this approach warranted here? My semivariogram is nowhere near as flat as the blog post example:

I've identified that the data are not perfectly normally distributed.
How can I quantify whether or not this is a problem?


texts: is it possible to project a shapefile to a raster's custom projection with command line gdal/ogr?

texts:
I have a raster with a user defined sinusoidal projection and a shapefile in lat/lng coordinates (I believe this is called 'unprojected'?).  I'd like to use ogr/gdal's command line utilities to project the shapefile into the raster's custom projection.

I see that ogr2ogr has a t_srs flag that if I had an EPSG code, I could use to project the shapefile into that local projection.  However, I am unsure what to do with my custom raster projection.

Per a comment below, this is the projection info from gdalinfo

Coordinate System is:
LOCAL_CS["SINUSOIDAL",
    UNIT["METERS",1]]
Origin = (-8895140.844619400799274,1111950.484813591465354)
Pixel Size = (463.312713623046989,-463.312713623046989)
Corner Coordinates:
Upper Left  (-8895140.845, 1111950.485)
Lower Left  (-8895140.845,-4448265.391)
Upper Right (-2222974.456, 1111950.485)
Lower Right (-2222974.456,-4448265.391)
Center      (-5559057.650,-1668157.453)


texts: Using R with Leaflet and Shiny to produce WMS?

texts:
I've have been using R with Leaflet and Shiny to produce a web map that is accessible to the public online. It is a real-time air temperature map of Tasmania, Australia based on current Bureau or meteorology weather station observations. You can view a prototype here: http://144.6.226.103/shiny/

Is it possible to make this map available for use as a Web Map Service (WMS) using Shiny and Leaflet packages in R?


texts: Rotation of polygon fill symbol using ArcGIS for Desktop?

texts:
In ArcMap (ArcGis 10.1) I'm trying to find a way to fill a polygon with a symbol in different orientations. Is it possible?

Example: look at the red semicircles, I would like to do something like that.

In case it's not: is it possible to associate the rotation of a polygon feature's fill to value in Attribute Table like I can do for points?

Example: rotation of a point feature depending on a column in Attribute Table. Is it possibile to do the same for polygons?


texts: Drawing maps from OSM data, with arbitrary rotation, & custom placename text

texts:
I would like to use OSM physical geography data, rotated by an arbitrary amount, and with custom placenames.
In an ideal world, I would do this in a web browser.
What would be a good process and set of tools to use for this?


texts: Fields' layer listed into a QListWidget in PyQGIS

texts:
I use a QgsMapLayerComboBox nested with a QgsFieldComboBox in Qt.
The problem is that I can select only one field with the field combobox and I need to select several fields.

self.dlg.mMapLayerComboBox_2.layerChanged['QgsMapLayer*'].connect(self.dlg.mFieldComboBox_2.setLayer)

That's why instead of using a Combobox I would like to replace the FieldComboBox by a QListWidget.

How can I fill a QListWidget by the list of field of the Layer selected by MapLayerCombobox?


texts: Building Custom Programs with ArcObjects

texts:
I found another thread at ArcObjects Resources that asked for general ArcObjects resources but most of the resources in that thread are obviously about building add-ins for ArcMap.

I need help getting started with building a completely custom application. In other words, if an ESRI logo or ArcGIS button shows up on my program, something's gone really wrong.

Where can I look for resources on this topic? So far, http://www.amazon.com/dp/1118442547/?tag=stackoverfl08-20#reader_1118442547 looks possibly relevant but it's hard to tell because I can't see if the book talks about custom development from the first few pages that Amazon.com provides.

To be super specific, I'm trying to write a program that takes coordinates and a layer that's in an Enterprise Geodatabase (aka ArcSDE) and figures out whether or not each point is inside the layer. I've already found a helpful function in the ArcObjects SDK.


texts: Uploading m/analysing raster vector data in PostGIS

texts:
I am trying to build a web-GIS platform where user can upload their data (raster & vector) and do some kind of analysis, like calculate zonal statistics. I read lots of articles and blogs about storing raster in PostGIS. I tried to upload raster using raster2pgsql command line. For the 10 MB raster, it takes 30+ second to upload in Postgres. I don't think it is the problem of my PC. In case for large raster (around 1 GB), It will take more than 5 min. I think it is not a good case what user wants.
For uploading the raster, I found lots of methods, like some developer prefer to upload as a tile (100*100), some of them upload without tile, some makes pyramids.
Can anyone suggest a way to upload the raster?
Some of the developers also prefer to store raster outside the database. But it will be slower.
Also If I tried to run some of the rasters analysis, It takes lots of time to get the output.
For example, I tried to calculate the zonal statists based on the district name with agri as the name of the raster. But it takes around 1 minute to run. In the case of web-platform, I know user can't stay waiting for a long time.
SELECT
    (ST_SummaryStats(ST_Clip(agri.rast, district.geom, TRUE))).*,
    district.name AS districtName
    district.geom AS geom
FROM agri, district;

How can I speed up the upload and analysis of raster with this method to achieve speed like in ArcGIS and QGIS?


texts: Seeking software to perform basic editing of GPX files?

texts:
I'd like to do some basic editing to my GPX files which I record from my mobile. Features I'm looking for are:

open GPX file
display data of GPX overlayed on a map (google, bing, whatever)
select and delete points
select and move points
export back to GPX

What I've found so far:

JOSM with the EditGpx plugin which doesn't do #4 (move points).
http://sourceforge.net/projects/gpxeditor/ which doesn't do #4 (move points).
GPS TracMaker which has a very poor points selection system.

The reason I want this is to offset part of the recorded path to fix possible GPS errors.

Is there a software which will allow me to do this?


texts: Error message using sDNA Integral Analysis

texts:
I'm analyzing a road network using the sDNA integral tool, and am getting the following error message. I'm using arcMAP 10.5.

ERR:   File "C:\Program Files (x86)\sDNA\bin\\sdnaintegral.py", line 4, in <module>
ERR:     commandline_integral_prepare("sdnaintegral")
ERR:   File "C:\Program Files (x86)\sDNA\commandline_integral_prepare.py", line 103, in commandline_integral_prepare
ERR:     dll = options.dll)
ERR:   File "C:\Program Files (x86)\sDNA\runcalculation.py", line 115, in runcalculation
ERR:     for fid,points,fielddata in env.ReadFeatures(input_handle,names_to_load+text_names_to_load):
ERR:   File "C:\Program Files (x86)\sDNA\sdna_environment.py", line 524, in ReadFeatures
ERR:     if(shape.partCount != 1):
ERR: AttributeError: 'NoneType' object has no attribute 'partCount'
External command completed
Process did not complete successfully
Completed script sDNAIntegral...
Failed to execute (sDNAIntegral).
Failed at Tue Jul 25 00:50:40 2017 (Elapsed Time: 1 minutes 15 seconds)


texts:
I have a basemap layer of a country and I want to create a PDF where I can zoom in and see the basemap in more detail. The same way as when I zoom in ArcGIS.

Is it possible to export such PDF from ArcGIS?

I tried to higher the resolution, but it's not working.


texts:
I have a table containing info about countries and years, such as:
* Country
* Lon/lat (point)
* Year
* Value

For example

| Country | Year | Value
| UK | 2002 | 344
| UK | 2003 | 200
| UK | 2004 | 199
| Denmark | 2002 | 28
| Denmark | 2003 | 4044
| Denmark | 2004 | 388

I want to make a nice torque so I can visualize - year by year - it with bubbles. Big values=big bubbles.

I can't find how to do it. Have you any ideas?


texts: qgis print composer: more then one "overviews" to show overlap of more then two maps

texts:
I have a map composition with 3 pages (maps). I would like to draw the overlapping on every map. So the first map is overlapping the second, and the second is overlapped by the first an the third.

To show the overlap, you can use the overview-feature but there you can just choose ONE map - the first OR the third. I need do choos both. Is that possible? Or is there a other way to draw the overlap?


texts: gdal2tiles -e giving error about Processing of several input files is not supported received?

texts:
I'm using gdal2tiles for tile huge geoTIFF image. The problem is that only 1 core cpu was being used so I stopped the process for use the -np_processes param to try use paralellism beacuse there have spent 3 days and still running... Now when I'm trying to run again the comand line for continue the tiling process, I'm using the "-e" param to resume and don't remake the tiles already created, but I'm receiving the error:

  gdal2tiles.py: error: Processing of several input files is not
  supported. Please first use a tool like gdal_vrtmerge.py or
  gdal_merge.py on the files: gdal_vrtmerge.py -o merged.vrt 4

Can anybody help me?


texts: Showing a polygon on map, and zooming until it fits with OpenLayers 3

texts: If I dynamically render a polygon (for example the border of a district in the UK) on a map, with OpenLayers 3, is it possible somehow to zoom in on the polygon, until it exactly fits the view?


texts: IDW with QGIS from a vector points file within a mask

texts:
Given two inputs:

A shapefile: points
A raster: mask

I want to interpolate the points within the extent of the raster except the NoData pixels that i want to use as a mask. NoData pixels are the sea and i want my IDW only for the land.

This would be easy in ArcGIS but i would like to it with QGIS to make easy to use for anyone.

I came with the idea to use r.mask but it turned out to be not available in QGIS...

Any idea about what would be the process to make it possible later in graphic modeler ?


texts:
I am having an issue with the style properties of my map.  I imported the US Zip Code Tabulation Area map from a government website, and in a separate excel file I have a list of people connected to various zip codes.  My original problem was QGIS was removing the leading zeros from my CSV file, which caused a lot of zip codes to appear blank.  I created a .csvt file to declare the zip code column as a string, and this worked and allowed me to keep the leading zeros.  However, now when I join this data to the zip code map, and then try to style based off of the 'name' category, the map disappears.  I checked the attribute table, and all the names are correctly assigned to the various zip codes, but the map disappears anyway.  The map previously worked before I added the .csvt file but obviously with the missing areas due to leading zero issues.

I am not sure why the map is disappearing after adding the .csvt file.  I've included images to show how everything appears to be correct in the properties and attribute table, but the map just won't show up.

Here is the album where I show my process and the error.


texts: Generating new ID for column if ROW - PREVIOUS_ROW >= 45 seconds?

texts: I don't want this code to be distributed


texts: Distributed versioning of geospatial data?

texts:
I'm getting started on the design of a new system that would reconcile, merge, and synchronize changes made across numerous geospatial databases of common ancestry, on an ongoing basis. These databases are distributed across numerous different organizations that have an interest in eliminating duplication of effort.

I read that OpenGeo is working on a project called GeoGit, which is interesting but seems very much a work in progress.

Are there any other tools, projects, or research that would be worth looking into?

I do not want to reinvent the wheel, but cannot seem to find much out there on this topic.


texts: Finding nearest POIs by travel time(not distance) given current location and travel method

texts:
A user can choose between walking, bicycling, public transit, or driving for X minutes. Their current location is a latitude and longitude pair given by the HTML5 Geolocation API(wgs84). The (roughly 10000) points of interests' location(latitude and longitude pair from Google Geococding API(wgs84)) spread across North America is stored in Postgresql as a PostGIS geography data type.

I want a list of POIs, travel time, and the length of the route sorted by travel time ascending that the user can reach given the travel criteria. I don't need the route itself. Is using pgRouting the correct choice? If it is the right choice, how can I import a routable Open Street Map for the different travel methods? If not, I'm open to changing the software stack to accommodate for this, so long as the result is accurate and fast(< 100ms on zen2 and 64gb of RAM)

I initially thought of generating an isochrone map using OSRM or GraphHopper, and then using ST_Within to find all POIs within the generated isochrone. However, I don't want to deal with projections and it seems like redundant work. From my understanding, generating an isochrone map uses Dijkstra's algorithm and then ending a route when a certain cost has been reached. Why not instead end the route when it's at a certain proximity to a POI and duplicate and continue routing if the cost has not been reached?


texts: Implementing field validation rules in ArcGIS?

texts:
I've found that ArcGIS offers validation of 2 basic constraints: field data type and if the value is required or not.

Is  there any way or AddIn to attach more complex validation rules?

I mean Min-Max values for numbers and dates, RegEx for text input, expression based validation for dependent fields.


texts: gdal_retile.py and gdal_translate Requirements

texts: I basically need to use two GDAL utilities: gdal_retile.py and gdal_translate, on a Solaris 9 machine. I have tried compiling GDAL from sources, but this seems not to be working. So, since I have python on my server machine, can I just use the utilities without compiling gdal or these utilities depend on GDAL?


texts:
I've used Geometry Checker Plugin to find some errors in my work. I have points that are connected to each other by lines.
Among the parameters entered in the plugin there is "point covered by line".
Unfortunately the result that gives me QGIS is that all the points are not covered by lines ...
but most of the points I have are actually covered.

Why does Geometry Checker return these errors to me?

Here is an image of Geometry Checker Plugin window


texts:
I am trying to interpolate points and then clip the interpolation with a Raster> Extraction> Clipper. I receive an error code after trying to mask over the region I am interested in. Would you possibly know what the error code means?

It says Ring Self Intersection at or near point. I tried to break it down to smaller chunks, but I get the same error code.

Warning 1: Ring Self-intersection at or near point -53.756366999999955 48.50326200000012
ERROR 1: Cutline polygon is invalid.

Fixed the geometry with a the polygon validator. The interpolation is still a little funny (image on the right is what I have. Image on the left is what I want to achieve)

Additional Images and link to tutorial: https://www.qgistutorials.com/en/docs/interpolating_point_data.html

Update after follow Kanban's recommendation to make the resolution smaller. Resolution was set to .2 in the interpolation process.


texts: Writing code to create MapDocument object gives ValueError: MapDocObject: Unexpected error?

texts:
I am trying to write the code but it gave me the error within the Python window:

>>> mxd = arcpy.mapping.MapDocument("CURRENT")

      path = "C:\Student\MapScripting10_0"
      mxd.replaceWorkspaces(path + r"\City_Westerville.mdb","ACCESS_WORKSPACE",path + r"\Westerville.gdb","FILEGDB_WORKSPACE")
      Runtime error
      Traceback (most recent call last):
        File "", line 1, in
        File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\utils.py", line 181, in fn_
          return fn(*args, **kw)
        File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy_mapping.py", line 915, in replaceWorkspaces
          return convertArcObjectToPythonObject(self._arc_object.replaceWorkspaces(*gp_fixargs((old_workspace_path, old_workspace_type, new_workspace_path, new_workspace_type, validate), True)))
      ValueError: MapDocObject: Unexpected error

I am using ArcGIS 10.1 SP 1 Build 3143 using Python 2.7.2.


texts:
I add new SAN Disk to windows server for build cache.
but ArcGIS Server can't add directory.

drive C = local disk
drive D = SAN disk

I login with ArcGIS Server Account , I can create directory in drive D.

How to solve this problem.


texts: How to create temporal heat map in CartoDB?

texts:
I'd like to create an animated heat map, showing the changing temperatures at same locations through time.

It looks like you would create this using a combination of either the choropleth or categorical map and the torque map... but I can't figure out how to link everything together.


texts: How do I batch input alias names from a table for a large dataset in ArcMap or ArcCatalog?

texts: I would like to populate the alias names for the fields in the ACS 2014 5 year estimates file geodatabase (all 11439 of them).  The ACS fgdb comes with the short_name and long_name in the metadata table.  I have exported this into an excel spreadsheet, and think this would be best done using arcpy.AlterField_management() with openpyxl.


texts: Use downloaded global OSM data in Android offline app

texts:
I am about to develop my first Android app (so I am a newbie in mobile app development). For this I will need OSM data of the whole globe, but only data with tags highway, boundary, waterway and natural (here only water bodies). This data I will download (still need to figure out how I can download such a big data set, Overpass API??) and later style it in my own way in QGIS. The map I would like to use as a base map in my offline app.

Now I know that I can use map tiles to render the data faster in a map viewer. However, I still have some problems understanding why and how it is possible to use so much data in an app when the data storage restrictions of apps are a few MB's. The map tiles would still use the whole OSM data I downloaded, which is several GB's, isn't it?


texts: How to call default tool in QGIS inside plugin using python script?

texts: I want to create a plugin which can draw irregular polygons in QGIS. For that, I want to call the Select features by freehand default tool inside my plugin. How can I do this within a  python script?


texts: Snapping points to nearest points automatically in ArcMap?

texts:
In ArcMap, is it possible to automatically (through a tool) snap points in one point layer (A), to points in another point layer (B)?

I do not wish to snap the points to a line, nor do I wish to merge the points - I would like the end result to be a new layer (C) containing points from layer A that have been moved to match the nearest point in layer B.  If a separate layer cannot be created, but layer A is altered to match the locations of layer B, that is also fine.  I don't think a spatial join works for me, as far as I understand it, as I want the physical location of one of the point layers to move.

I also do not wish to merge the two sets of points, but keep them separate.


texts: Correct URL for Fulcrum photos in Carto Builder Pop-ups?

texts: Does anyone know what format the source URL needs to be in for Carto Builder so that pop-ups can display images from a Fulcrum dataset? This worked before Builder was enabled in my account:


texts: Using thread lock when implementing Enabled void in ArcGIS Command?

texts:
I've noticed that that ArcGis Commands are activated asynchronously.

So I supposed that there is a chance to corrupt memory without using thread locks when overriding Enabled void of custom ArcGIS command.

Am I right?


texts: Hyperspectral Imaging - Material spectral signature

texts:
I am reading about the working principles and applications of hyperspectral imaging (HSI). In this link, the uses of HSI over the range of the wavelength, from visible to longwave infrared have been summarized by the picture below.

My question is, is there an equation that relates the chemical composition / color / etc of a material to its hyperspectral signature ?

For example, I read that water is transparent to visible light, but it absorbs strongly at wavelengths of 1450 and 1900 nm so I know if I want to detect water in my project then i obviously should not use those wavelengths. Is there an equation that tells me the absorption strength of certain chemical compounds at different wavelengths ?


texts:
I'm building a GIS for a large-scale family farm.  We don't have a lot of resources to devote to this, as it's a new part of the farming operation and therefore viewed with some reserved skepticism.  I'd like to start building prescription maps for fertilizer, etc applications, which means I need to import some soils data.

My question relates to the USDA SSURGO database download.  To my understanding, in order to import this data into GIS I would need MS Access, which we do not have.  So is there another way to access this data while bypassing the Microsoft empire?

I've read a little bit from OSGeo about using PostgreSQL and/or PostGIS, but I don't quite understand how it works.  I know this alternative is not as easy as the Access route.  Would this be a good option for me?

As a side, I think I'd be interested in PostgreSQL for managing our spatial data.  We don't have a lot yet, so the file system I have set up locally works for now, but I think it could be useful later on.


texts: Min-max stretch using gdal_translate in a batch

texts:
I'm trying to do a min-max stretch on a raster and save it using gdal_translate. The syntax requires to enter source min and max raster values as arguments for a -scale option:

-scale [src_min src_max [dst_min dst_max]]

My goal is to populate those src_min and src_max automatically to do conversions in a batch.

The docs even state that they are computed if ommited:

Rescale the input pixels values from the range src_min to src_max to the range dst_min to dst_max. If omitted the input range is automatically computed from the source data.

But in reality gdal_translate -scale 0 65535 src_16b.tif dst_16b.tif does not produce correct results. What may be wrong?


texts:
I am having trouble finding a workflow for my roads layer in PostGIS.

I am using:
PostgreSQL 9.6;
PostGIS v. 2.3;
pgRouting v. 2.4;
pgAdmin 4

I've not used a spatial database before, and only know basic SQL, but I know my way around QGIS. I've been trying to follow Anita Graser's pgRouting blog - which is helpful, but a bit out of date.

So my question is, how do I use the pgr_drivingDistance function to create a catchment area, or a set of nodes based on a cost attribute (distance)?

Do I need to use the function pgr_createTopology function first? I did try out this function, but I was not really sure what it did to my data.

Secondly, when using the pgr_drivingDistance function, I couldn't find any results (again, I'm new to databases).

Here is the code I used:

SELECT * FROM pgr_drivingDistance('
  SELECT gid AS id,
      start_id::int4 AS source,
      end_id::int4 AS target,
      descript00::float8 as cost
  FROM network',
  2000,
  1000,
  false,
  false)

I tried doing a join, as per Anita's blog to visualise the results:

SELECT *
   FROM node
   JOIN
   (SELECT * FROM pgr_drivingDistance('
      SELECT gid AS id,
          start_id::int4 AS source,
          end_id::int4 AS target,
          descript00::float8 as cost
      FROM network',
      2000,
      1000,
      false,
      false)) AS route
   ON
   node.id = route.seq

But I still am not sure how to visualise this in QGIS v2.16, or even if these are the correct steps to take.


texts: Creating IDW-rasters from each field in large point feature set using ArcPy for ArcGIS Pro?

texts:
I am using ArcGIS Pro 2.3.2

I am trying to automate the process of making a raster (IDW tool) in model builder by iterating through fields as z-value. I saw some other question asking the same, and it seems that it couldn't be done that easy in ModelBuilder, and that Python was the way to go.

I have this point feature of 200+ points that all have around 70 fields of Z-values (elements). In the snip below, you can see fields with elements, and also fields with ID's and other that I don't want to make a IDW raster out of.

So for Lithium, it would produce this raster:

Now, how would I go about doing this process for all fields, except the ones without elements?

If it's easier, I wouldn't mind just deleting the non-element rasters afterwards, if I could maybe name the raster set after the field name perhaps.


texts: District heating expansion design with ArcGIS

texts:
I am quite new at GIS but I have some experience of the basic concepts involved in a workflow of them.

What I currently want to do is to calculate the cost of expanding an existing district heating network to the houses of a village. More specifically:

I have a village of 310 buildings. In the village there is already a network that some houses are connected to. So, basically I have 310 points in one shapefile and another shapefile that represents the existing district heating network.

What I want to achieve is that I want to expand the existing network so that all nodes are connected with the minimum distance to it. That can mean that they can either connect to the existing part or new pipes have to be drawn towards areas and houses can connect to those pipes via sub-pipes (i.e. smaller pipes).

I know that overall this is not a very realistic representation of such a design since no constraints are taken into account, but it would be a good starting point for my analysis.

Thanks a lot!

edit 1: I am capable of using both ArcGIS and QGIS and I do have some programming experience with both Matlab and Python.

edit 2: So far I have looked at Geometric Networks and the distance tools of the Spatial Analyst toolbox for ArcGIS. Could either of those be the solution?


texts: Mixing POINT and MULTIPOINT in PostGIS table

texts:
I'm trying to load a bunch of GeoJSON files into one PostGIS table. I get this kind of error:

Warning 1: Geometry to be inserted is of type Point, whereas the layer geometry type is Multi Point.
Insertion is likely to fail
ERROR 1: INSERT command for new feature failed.
ERROR:  Geometry type (Point) does not match column type (MultiPoint)

I've resolved this kind of issue previously with lines and polygons before using the -PROMOTE_TO_MULTI flag, but this doesn't seem to work for POINT/MULTIPOINT.

My first input looks like:

ogr2ogr -f "PostgreSQL" -lco GEOMETRY_NAME=the_geom -lco FID=gid PG:"dbname=trees" melbourne.vrt -nln trees1 -nlt MULTIPOINT

If I remove the -nlt MULTIPOINT, I get this error:

Loading wyndham.geojson
Warning 1: Geometry to be inserted is of type Multi Point, whereas the layer geometry type is Point.
Insertion is likely to fail
ERROR 1: INSERT command for new feature failed.
ERROR:  Geometry type (MultiPoint) does not match column type (Point)

Command: INSERT INTO "trees1" ("the_geom" , "latitude", "longitude") VALUES ('0104000020E61000000100000001010000001E55A5583FAF11416A1DE9D0E8255641'::GEOMETRY, '-37.86935', '144.60962') RETURNING "gid"
ERROR 1: Terminating translation prematurely after failed

Is there any workaround?

UPDATE

It looks like in this instance, the file containing "MultiPoint" geometry actually only contains single points, which are syntactically expressed as MultiPoint:

"geometry":{"type":"MultiPoint","coordinates": [[290431.89426198014,5803919.42858718]]}, ...

Just in case that makes any workarounds easier.


texts: Working with a map to only allow panning within a certain set bounds. In my case I want the application to allow the user to pan around just within the bounds of a specific Island. So far I can only achieve the initial loading to start at the specified island but not able to limit the panning ability. Using API 4.X


texts: data defined properties 2 different functions

texts:
I have values which are from 0 - 21000. Now i want to display only the values above 10 and the number 21000 should be displayed as 2,1%. I want to use the data defined properties. My first assumption was:

"values">10
CASE
WHEN "values"=21000 THEN 2,1%
ELSE "values"
END

This does not work though because i just can´t click OK in the data-defined properties. The Error says:

syntax error, unexpected CASE, expecting $end.

Is there anything else to consider?


texts: GeoWebCache pre-seed aerial imagery via WMTS as geo-referenced raster e.g. GeoTIFF/GeoJPEG2000

texts:
I have a large cache of JPEG files (700,000 tiles) that I've pre-seeded using a standalone GeoWebCache connected to a backing WMTS service.

I'd like to build a visual database with Terra Vista and it does not support OCG service endpoints, e.g. WMTS;  It does however support GeoTIFF.

Before I extend the pre-seed function that GeoWebCache provides:

  Are there any existing tools or methods that will help me convert each JPEG in GeoWebCache's layered EPSG 4326 file cache into a geo-referenced raster format like GeoTIFF?


texts: Total distance from point in roadnetwork. Then create a polygon from results

texts:
What I need to do is to use roads that are a fixed distance from the start point. Then somehow create a polygon from the distance layer and then do simple intersect on a different point layer.
The task is to find all that live within the fixed distance from the start point.
It's quite a hurry and hope I can get some tips here how to do this in QGIS. Does anyone know how to calculate how far you get from the start point? Lets say all roads that are within 1 km walking distance from the start point?
The next step will be to create the polygon from the outer boundary from the result.
I'm thankful for any tip how to finish this task.


texts: How can I project geojson borders on the google earth tiles in leaflet?

texts:
I started working with leaflet and google earth tiles. I want to add borders on my map so I tried to use the countries geoJson Data as a layer on the map.

The problem is that the json borders created does not meet my map borders exactly.

Note: that at the south part of my map (South Africa, South America, Australia,...) the json borders meet the map borders, while at north part of the map the borders are far away from where they should be exactly.

After googling about my problem, I found that it may be a projection problem.

So I tried proj4leaflet plugin. I think I should set the values for CRS in order to meet my map in some way but I don't know.

This is a snippet of code:

  var crs = new L.Proj.CRS('EPSG:3857',
    '+proj=sterea +lat_0=0+lon_0=0+k_0=1.0 +x_0=0 +y_0=0',
    {
        resolutions: [39062.5, 19531.25, 9765.625, 4882.8125, 2441.40625, 1220.703125],
        origin: [-6e6, 6e6]
    }
);
    var map = L.map('map',{
         crs:crs
    }).setView([30, 35], 3);
  L.tileLayer('http://localhost/maps/z{z}/x{x}/y{y}.jpg', {
      attribution: '.....',
      maxZoom: 22,
      minZoom: 0
  }).addTo(map);

  var jeoLayer = null;
  var geoOpt = {};
 geoOpt.style = {
     "color": "#ff7800",
     "weight": 1,
     "opacity": 0.65
  }

 $.getJSON("world-countries.json", function (data) {
 $(data.features).each(function (key, data) {

    jeoLayer = L.geoJson(data, geoOpt).addTo(map);

    });
  })

GeoJson snipet:

    {
"type": "FeatureCollection",
"features": [
    {
        "type": "Feature",
        "geometry": {
            "type": "Polygon",
            "coordinates": [[[-163.71289063, -78.59559631], [-163.1056366, -78.22330475], [-161.24511719, -78.38008118],.......,[180, -90], [180, -90]]]
               },
        "properties": {
            "name": "Antarctica"
        },
        "id": "AQ"
    },
  {
        "type": "Feature",
        "geometry": {
            "type": "MultiPolygon",
            "coordinates": [[[[74.92, 37.24], [74.57, 37.03],......,[73.31, 37.46], [74.92, 37.24]]]]
        },

This is the image:

Please any help?


texts: Loading data onto PostGIS using KML files with attibute data

texts:
So, I have a kml file which contains 317 data points (317 polygons and the respective 317 names). The kml file also contains attribute data which pops up in a bubble on Google earth with about 12 custom data points (Code, name, locality, no. of houses etc.) which could have been loaded onto the kml file using ArcGIS (I'm assuming this, cause I received just the kml file from my source) or could have been custom coded using a text editor.

Now, I'm trying to build a PostGIS db using this data along with the custom data points (attribute data) which is stored in the kml file. I tried converting the kml file to a shapefile to load it onto PostGIS using shp2pgsql, but this ignores all the attribute data. Only the geometry and name gets converted. I also tried converting the KML file to xml/csv/xls format to atleast try and merge the attribute data with the main db on postgresql, but I failed cause there is no converter out there which pulls out all the data from a KML file.

My question is, is there a way to load this kml file with attribute data onto PostGIS? Is there a simpler converter for KML to CSV, or similar spreadsheet formats? What's the best way to do this?


texts: Loading GeoTiff to QGIS - nothing displays

texts:
I have generated a GeoTIFF with CRS set to WGS 84:

geotransform=(xmin, xres, 0,ymax ,0, -yres)

output_raster = gdal.GetDriverByName('GTiff').Create(filename + ".tiff",ncols, nrows, 1 ,
                                                     gdal.GDT_CInt16)  # Open the file

output_raster.SetGeoTransform(geotransform)            # Specify its coordinates
srs = osr.SpatialReference()                           # Establish its coordinate encoding
srs.ImportFromEPSG(4326)                               # specifies WGS84 lat lon
output_raster.SetProjection(srs.ExportToWkt())         # Exports coordinate system
                                                       # to the file

The TIFF loads and displays in ArcGIS with no issues.

In QGIS, I load the TIFF and it does not appear. I set the CRS for layer to WGS 84 (as a similar question suggested) but the TIFF still doesn't show (I've tried zooming to layer).

In the 'properties' for the TIFF, I can see the histogram of my data has the correct pixel value - so the data is definetly present.

Any other suggestions as to what might be causing this?

gdalinfo -stats output:

Driver: GTiff/GeoTIFF
Files: LIIN50_202002201000.tiff
Size is 2688, 2016
Coordinate System is:
GEOGCRS["WGS 84",
    DATUM["World Geodetic System 1984",
        ELLIPSOID["WGS 84",6378137,298.257223563,
            LENGTHUNIT["metre",1]]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    USAGE[
        SCOPE["unknown"],
        AREA["World"],
        BBOX[-90,-180,90,180]],
    ID["EPSG",4326]]
Data axis to CRS axis mapping: 2,1
Origin = (90.000000000000000,30.000000000000000)
Pixel Size = (0.023809523809524,-0.023809523809524)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  90.0000000,  30.0000000) ( 90d 0' 0.00"E, 30d 0' 0.00"N)
Lower Left  (  90.0000000, -18.0000000) ( 90d 0' 0.00"E, 18d 0' 0.00"S)
Upper Right ( 154.0000000,  30.0000000) (154d 0' 0.00"E, 30d 0' 0.00"N)
Lower Right ( 154.0000000, -18.0000000) (154d 0' 0.00"E, 18d 0' 0.00"S)
Center      ( 122.0000000,   6.0000000) (122d 0' 0.00"E,  6d 0' 0.00"N)
Band 1 Block=2688x1 Type=CInt16, ColorInterp=Gray
  Min=184.000 Max=304.000
  Minimum=184.000, Maximum=304.000, Mean=208.768, StdDev=21.274
0...10...20...30...40...50...60...70...80...90...100 - done.
  256 buckets from 183.765 to 304.235:
  455 0 2182 0 4421 0 8486 0 0 16487 0 20685 0 28397 0 105770 0 326829 0 405545 0 427383 0 332574 0 0 306874 0 269193 0 200719 0 196494 0 153691 0 146656 0 138483 0 130108 0 0 117253 0 112207 0 102442 0 87773 0 71599 0 78687 0 69754 0 61557 0 0 64424 0 54482 0 53089 0 50249 0 47437 0 41910 0 47780 0 42190 0 0 33457 0 34942 0 29986 0 26662 0 26287 0 26062 0 25272 0 24437 0 0 25596 0 24941 0 21413 0 26002 0 21721 0 25991 0 22639 0 21271 0 0 21444 0 20687 0 20940 0 19942 0 19999 0 17019 0 19536 0 16725 0 0 19420 0 17058 0 19532 0 16952 0 16083 0 16798 0 15814 0 17008 0 0 13238 0 17411 0 16229 0 14148 0 17353 0 13058 0 17201 0 13022 0 0 13439 0 13200 0 12181 0 12950 0 11837 0 12646 0 9428 0 12006 0 0 12843 0 9270 0 11583 0 9220 0 9611 0 11309 0 8193 0 8330 0 0 7304 0 6332 0 6447 0 6063 0 5480 0 4145 0 5701 0 4860 0 2788 0 0 4517 0 2968 0 2971 0 3934 0 2677 0 2620 0 2364 0 3187 0 0 1709 0 1628 0 1356 0 609 0 1027 0 843 0 696 0 350 0 0 527 0 215 0 39 0 44
  Overviews: 1344x1008, 672x504, 336x252
  Metadata:
    STATISTICS_APPROXIMATE=YES
    STATISTICS_MAXIMUM=304
    STATISTICS_MEAN=208.7677154195
    STATISTICS_MINIMUM=184
    STATISTICS_STDDEV=21.274471655338
    STATISTICS_VALID_PERCENT=100


texts: Wind turbine placement optimization and loss on surrounding house value

texts:
I am doing a geostatistical placement optimization study on where would be the optimal placement of a wind turbine in a Danish region. One of the variables taken into account is the cost on the value of the surrounding houses, which of course decreases with increasing distance. I have here a conceptual problem, and I would like to ask if anyone who has done or knows of such type of study could help me:

Assumed the turbine will be dismantled and removed on the 20th year, how would the cost of the installation of the turbine on the house value be calculated, considering the loss of rent (therefore through computing a 20 years annuity) or calculating it substracting the loss of value at t20 (adjusted to inflation and discounted for the social discount rate) - the loss of value at t0?
How would you calculate the cost of never removing the wind turbine?


texts: Clipping ENVI files loses information in header (.hdr) file

texts:
I have created a command-line operated python-script to cut AVIRIS imagery with polygons. I do this by using rasterio to load the imagery and fiona to load the polygon.
The AVIRIS imagery comes in two parts, a file with no extension and a header (.hdr) file, the header file and data(?)-file share a file-name, so I assume when I open the image with rasterio it knows to look for the respective (.hdr) file and auto-fills the driver parameter.
So far, my script works as intended, I can clip the AVIRIS imagery. However, my problem is that I lose the wavelength each band belongs to in the (.hdr) file, along with other tags. I can call the full set of tags of the original image, and in fact, can print them out by calling src.tags(); held in 'src_tags' variable below. Where the tags are lost is on writing, meta_data on print shows full set of tags, but I can't figure out how to get rasterio to write a (.hdr) file with all tags.
Since the (.hdr) is just a text file, I have considered writing code that appends the missing flags, but I worry if that is a bad approach since it makes my code less rigid; what if new tags are included?
Below is my code:
import rasterio as rio
import rasterio.mask import mask
import fiona

image = "filepath/to/AVIRIS/image"
poly = "filepath/to/some/geometry"
outputname = "test"

def masker(image, poly, outputname):

    image_name = ("cropped_%s" % outputname)

    with fiona.open(poly, "r") as geometries:
        geometry = [feature["geometry"] for feature in geometries]

    with rio.open(image, driver="ENVI") as src:
        out_image, out_transform = rio.mask.mask(src, geometry, crop=True)
        out_meta = src.meta
        src_tags = src.tags(ns='ENVI')
        #print(src_tags) #<- prints out full content of (.hdr) file
        out_meta = {**out_meta, **src_tags}

    out_meta.update({
        "height" : out_image.shape[1],
        "width" : out_image.shape[2],
        "transform" : out_transform
    })

    with rio.open(image_name, 'w', **out_meta) as dest:
        dest.write(out_image)
         #dest.update_tags(**src_tags) #doesn't work

masker(image, poly, outputname)

I did notice that my full-tags get saved onto a 3rd file, a (.xml) file, but this is not useful.


texts:
It has been almost 2 weeks since I started getting familiar with netCDF files and operators (NCO) and climate data operators (cdo) and I am not an experienced programmer.

I have a folder which contains (monthly) nc files from January 1980 to December 2015 (in total 432 nc files). Each of these nc files contains hourly data of different compounds (such as PM2.5, O3, NO2, NO, etc) for one month in UTC and I need to have netCDF files which will contain daily averages in local time.

A colleague of mine gave me the following instructions: first I need to identify the zone (let's name it z0) with [long1,long2], then identify the time (UTC--> local time, where UTC= 0h and LT=+1 and so on) and simultaneously derive the daily averages. He also told me that the final result e.g for one month should be an nc file with daily averages where 1 day should contain the averaged data of the different compounds where z0= UTC[0:23], z1= UTC[1:24]....etc....(This doesn't make any sense to me).

As I am quite new at this, it is very difficult for me to understand what and how I need to do it.

Since the time is in this format:

int time(time) ;
                time:units = "seconds since 1979-12-02 00:00:00 UTC" ;
                time:long_name = "time" ;
                time:axis = "T" ;
                time:calendar = "standard" ;
                time:standard_name = "time" ;

I thought the change from UTC to local time could be done with the command ncatted, and then I could move on with the code in order to get the daily averages. Any hints?


texts: Looking for a well used opensource .net WMS server that can show raster layers

texts:
We covered a large area with a plane and have all the images with georeferences avalible also. I would like to provide the images taken as a WMS and not knowing much about gis still, there are alot of options out there. I hope someone here can direct me to a good candidate to start developing against.

I found something called MapArround and a .net example using it but that was only showing shape files. If anyone has an example in MapArround leveraging custom images that would be great.

Otherwise, then any example of leverage our custom taken photos. We already have software that sticth images together and having overlap so basicly for every request we have the images needed to be provided. I took the time to look at the WMS specification and know we could implement the requests our self but if we can save time but just providing an extension into some already opensource wms solution that is preferable.


texts: Same LiDAR data but different results in ArcMap and eCognition

texts:
I have generated raster layers based on LiDAR Number of Returns in both ArcMap and eCognition but the results are quite different.

I ArcMap I used LAS point to Statistics to Raster Tool, in the option Method I chose POINT_COUNT and the output was shown as below

However, when I did the same thing in eCognition I got a different output

I must have made some mistakes in ArcMap as the value of the generated raster layer varies from 1 to 1573

Which tool in ArcMap I should use so I can generate a raster layer based on LiDAR Number of Returns?


texts: QGIS i.landsat.toar not reading .txt file

texts:
I am having an issue with GRASS i.landsat.toar tool.  It will not let me choose my metadata .txt file.  I click on the three dots to the right of "Name of Landsat metadata file (.met or MTL.txt) [optional]" (image 1).  I browse to where my metadata is stored (image 2), but it is not there.  The only option for file selection is .met.  I look in my folder and the MTL.txt file is clearly there (image 3).  I do not understand why QGIS will not let me pick the .txt file type (image 2)?  I am using QGIS 3.6.3 with GRASS 7.6.1

Edits:

I installed QGIS 3.4.9 with GRASS 7.6.1 and was able to select all files to grab the MTL.txt file.  Though I recieve the error "Wrong or missing parameter value: Name of Landsat metadata file (.met or MTL.txt)".  So it seems that it is not reading my MTL.txt file correctly?


texts: Materialized view breaks when registered with the GDB

texts:
EGDB: Oracle 18c/10.7.1
External system: Oracle 12c

I have created a non-spatial materialized view in an EGDB that syncs data from an external system (on a 5 second schedule; via a dblink).

It is not possible to create an on-commit materialized view over a dblink. So I used a schedule instead.

create materialized view my_gis_schema.wo_mv --EGDB
build immediate
refresh force
on demand
start with sysdate next sysdate + (5/(60*60*24))
as
select
    cast(workorderid as number(38,0)) as objectid,
    wonum,
    status,
    --other fields
    longitudex,
    latitudey
from
    maximo.workorder@gistomax --dblink

create materialized view log on maximo.workorder with rowid;  --external system

The materialized view works as expected. Records that are new/modified/deleted in the external system are synced to the materialized view on a 5 second schedule.
Problem:
As an experiment, I registered the materialized view with the geodatabase (via ArcGIS Desktop).
The view was still useable in ArcMap as an XY layer, however, it failed to sync after that point. And any attempt to manually refresh, delete, or otherwise modify the view failed (the process would just hang, and the MV would keep reappearing in Catalog after deletion).

Why does registering an MV with the GDB break the MV?


texts: Convert GOCAD .ts file to a raster for ArcMap Analysis

texts:
I have a multi-layered (10 layers) GOCAD .ts file of data that I would like to convert into a series of rasters. The documentation says it requires a program capable of reading

  GOCAD * .ts (triangulated surface) files.

The data is elevation data of the surface and sub-surface geologic units in the Great Artesian Basin of Australia. I tried to drag it into ArcMap and tried to use the TIN to raster tool, but it wont recognize the .ts extension.

Any recommendations on how to convert this bad-boy to a raster for each layer? Here is a link to where the data can be downloaded from the official provider:

  https://ecat.ga.gov.au/geonetwork/srv/eng/catalog.search#/metadata/75990

I use R for some of my image processing if that helps. I appreciate any ideas with this. Thanks!


texts: Flow accumulation from r.watershed creates discontinuous stream network

texts:
I am interested in using r.watershed as integrated in QGIS for a course I teach, but am noticing discrepancies in the flow accumulation (facc) rasters and resulting stream networks that I get from QGIS-GRASS (r.watershed) compared with ArcGIS Desktop.  The r.watershed stream network is discontinuous (see blue-green cells below), compared with the continuous network of ArcGIS (red cells below; red layer plotted beneath the blue one).  The facc grids were generated using the same DEM filled with ArcGIS, and both use a threshold of 500 cells for streams.  The facc values from QGIS-GRASS also show high values surrounded by lower values at the discontinuities, indicating what should be a sink, but ArcGIS does not see them as sinks on this filled DEM, and filling the DEM again does not change the result.  I am using QGIS V 3.12.2 (see image below for full version information).
I have seen other answers to filling in a discontinuous stream network (e.g. Removing disconnected cells in a stream network raster using ArcGIS), but don't agree that you should have to paste over these gaps with any further raster-vector processing, since facc values should always decrease going downstream.
I also find that the r.water.outlet function on the same facc grid does not give a correct watershed boundary for some pour points (but does fine on others).
Is there an easy solution, and/or is this discontinuity in r.watershed a common issue?
The original DEM and the resulting facc rasters can be found here:
https://drive.google.com/open?id=17_RPXoyR7IVTo7K6UQ_92yWEAMny6a0i&authuser=tbiggs%40sdsu.edu&usp=drive_fs


texts: Do large vertex counts cause performance issues?

texts:
I have a table of several thousand tuples - each tuple has a geometry column. The problem is, these geometries have a large vertex count. The max vertex count is 400, while the average is 200. Obviously "large" is somewhat ambiguous. I "think" that's large, but maybe it's not. For some of these large geometries, I'm considering applying a smoothing algorithm to trim some of the points, IF a performance benefit can be gained.

I'm wondering how these high-vertex polygons affect performance? There is a GIS index on the geometry column. I would think performing an ST_Intersects or other similar functions that are exact would be MUCH slower, whereas a bounding box check, such as the && operator, would be negligibly slower.

In addition, would Postgres store these high-vertex polygons different? I have a basic understanding of the TOAST tables used for "extended" data - I wonder if Postgres would be utilizing this for the large polygons?

As for indexing, there probably isn't much gain, because the index already uses the bounding box for lookup, so whether you have 400 or 5 vertex points, your BB is going to be (roughly) the same, and the lookup will be roughly the same.

Any other considerations?


texts:
I work for a non-profit health organization and I am currently testing out some GIS software to basically see what usefulness it might serve.  My skill set with this software is pretty elementary, but I am starting to put it together.  I created a rather simple map in ArcGIS that used different layers for each of our 10 locations showing home zip codes of patients - each used a different color and the size of the "bubbles" was based on how many visits from each zip.  These layers could easily be turned on and off by anyone viewing the map.  I tried recreating this in CartoDB and fell short at the layers limit.  I am wondering if I am just thinking about this the wrong way.  I created a visualization of visits for all sites using different colors for each location, but the size of the bubbles is uniform.

If I can't make some sort of sub-layer happen, would it be possible to perhaps create a map with 3-4 locations in a county (for example) as separate layers, so I could alter size and color of the bubbles as I see fit, but then export them as one layer, so I could make some sort of composite for all sites?  I don't know much interaction is ultimately needed, but this could bridge the gap until I figure something else out, provided it could work.


texts: ArcGIS JSAPI selectFeatures on feature layer with "stacked" features only returns one feature

texts:
I am using the selectFeatures function to launch a popup when clicking on a feature. Because of the nature of my data, many of the features (street segments) have coincident geometry (they are stacked on top of each other). When I click on one of these segments that I know has multiple stacked features, the selectFeatures function only returns one feature (assuming the "top" one). If the features are adjacent (within my 10 pixel click buffer) but not coincident, it does return multiple features.

How can I have the selectFeatures return all features at that location, not just the one?

dojo.connect(map, "onClick", function (evt) {
    var query = new esri.tasks.Query();
    query.geometry = pointToExtent(map, evt.mapPoint, 10); //buffers click point by number of pixels(10)

    var deferred = featureLayerSeg.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW);
    deferred.addCallback(function (features) {
         console.log(features.length); //this returns 1 if the features are stacked on top of each other
    });
}

PS- I don't want to use IdentifyTask to a map service because these feature layers have already been filtered by the user based on search parameters.


texts: How to make Processing algorithms use default parameter values in QGIS 2.14?

texts:
I would like to know how to get processing algorithms in general, and warp (reproject) specifically, to run with default values. I am running a script in the QGIS Python console. In the QGIS 2.14 documentation it is stated that:

"Input parameters such as strings, booleans, or numerical values have default values. To use them, specify None in the corresponding parameter entry."

However, when I run the following code, I receive an error.

processing.runalg("gdalogr:warpreproject",
                   path+"land_use.tif", #input
                   "ESPG:3035", #source crs
                   "ESPG:4326", #destination crs
                   "0", #no data value
                   0, #target resolution: 0=unchanged
                   0, # method: 0=near
                   5, # output raster type: 5=Float32
                   0, #compression: 0=none
                   None, #jpeg compression: default
                   None, #zlevel: default
                   None, #predictor: default
                   None, #tiled: default
                   2, #bigtiff: 2=no
                   None, #TFW: default
                   None, #extra: default
                   path+"land_use_reprojected.tif")

The error is simply

Error: Wrong parameter value: None

I feel like QGIS is throwing an error instead of referring to default values, have I misunderstood the documentation?

I also find that the error message is uninformative.


texts:
I am writing a code that calculates the number of burned patches in a study area. The process is based on iterating over a list of numbers.

Code: Link

var country = ['ZA'];
var geometry = ee.FeatureCollection('USDOS/LSIB/2013')
                      .filter(ee.Filter.inList('cc', country));
Map.centerObject(geometry, 5);

var modisFire = ee.ImageCollection('MODIS/006/MCD64A1')
                  .map(function(image) { return image.clip(geometry);})
                  .filter(ee.Filter.date('2017-06-01', '2017-08-01'))
                  .select('BurnDate');

var myList = ee.List.sequence(2, 50, 5);

var computeNumPatches = myList.map(function (number){
  var image = ee.Image(modisFire.toList(2).get(0)).int16();
  var patches = image.connectedPixelCount(number, true);
  patches = patches.updateMask(patches.gte(number));
  var numPatches = patches.reduceRegion({
    reducer: ee.Reducer.count(),
    geometry: geometry,
    crs: 'EPSG:4326',
    scale: 500});
  return numPatches;
});

print(computeNumPatches);

Error Message

List (Error)
Image.gte, argument 'image2': Invalid type. Expected type: Image<unknown bands>. Actual type: Float. Actual value: 2.0


texts: Calculating grid_metrics() in a loop, using column name within variable

texts:
I want to calculate grid_metrics() for several fields of my point cloud, using several functions. I want to perform this in loops to make my code look cleaner.
Basically I want this:
# loop through fields
 for (name in c("field1", "field2", "field3")) {
    # loop through statistics
    for (type in list(c("mean", mean), c("sd", sd))) {
      # calculate gris metrics
      raster <- grid_metrics(point_cloud, ~type[[2]](name), res = 1)

However, this does not work. Using the statistic I specified works. However, whatever I tried, I did not manage to replace the field name with a variable containing the name. I always get the warning In mean.default(name) : argument is not numeric or logical: returning NA.
I found a workaround using rasterize(), but then these rasters have an offset to my other rasters created with grid_metrics() and I think it would be better to create all rasters consistently in the same way.
(Here the workaround:)
raster <- rasterize(data.frame(X=point_cloud@data$X, Y=point_cloud@data$Y),
                    raster_object, field=get(name, point_cloud@data), fun = type[[2]])

Can someone help me to replace the column name with a variable? Putting an eval() around the variable does not help either.


texts: Automating roof orientation detection from satellite imagery?

texts:
A while ago I did a neighbourhood roof orientation survey for solar panel deployment, by visually checking each roof and marking individually whether they were south or almost south-facing.

As this is very time-consuming, I would like to find a way to automate this, but don't know how this would be possible by merely analysing roof shadows.

I can script a little but have never written any plug-ins.

What other elements do I need to include?

We are on a very low budget, so seek any suggestions how to do this using open source tools.


texts: Error: Cutline feature without a geometry. > Raster Type

texts:
I've got an Error: Cutline feature without a geometry on QGIS 2.4.0 Chugiak.
I have 2 samples (A raster type and a vector type), they have the same coordinates (EPSG:4253 - Luzon 1911) Then I tried using Clip on my Raster type,
Raster > Extraction > Clipper
Then I masked my vector to my raster, and got that error, Any Help would do. Or if you want I could send you my files.


texts:
When i draw a polygon using the OpenLayers.Control.DrawFeature then i export that polygon to KML using OpenLayers.Format.KML. Though, when I open it in google earth there is a big difference between the areas the polygon crosses even though the vertices of that polygon are exactly the same.

WHY? How would i go about getting an accurate output to KML?


texts: When appending two shapefiles in ArcMap 10.2 values in attribute table become distorted

texts:
I have appended two point shapefiles using append tool in Arcmap saved in C:drive (I tried in geodatabase before and it did not work). After successfully obtaining new appended shapefile, which seems incomplete,  I then use 'feature to feature class' obtaining a complete attribute table but with all the string values (ID codes, coordinates, geographic references) moved/unordered in different columns with incorrect column title.

What can I do to correct this and obtain a complete/correct appended shapefile?


texts: ArcMap Geoprocessing Operation to create a layer with incorporated places and, separately, surrounding unincorporated portion of a county?

texts:
I am working with TIGER FILES, attempting to use the update (analysis) operation in ArcMap 10.1.  The files I'm using are counties, and the incorporated (non-CDP) segment of the places file.

I'm using the counties as the input feature and the places as the update feature.  My goal is a layer that has incorporated places, and the remaining (unincorporated) portions of counties.

Given that goal, is the update operation the right approach?

When I do use the update operation, I lose a bunch of the fields from the update features; union gives a more complete result from the perspective of field preservation, but non-contiguous segments of features are not preserved intact.


texts: Creating slope grid using Arc Hydro tools says dataset does not have spatial reference?

texts:
I am not able to create the slope grid using hydro tools. I am getting a error message saying that

  The dataset does not have spatial reference. Please specify a valid spatial reference

How do I resolve this?


texts: Correlating ONS LSOA boundaries w ONS Pop Data using CartoDB

texts:
I'm looking for a way to vector-map Birmingham population densities by Lower Level Super Output Area (LLSOA). I have two sets of relevant data: the ONS LLSOA boundary set, and ONS estimates of population density. The LSOA boundary set is georeferenced, and assigns each area an ID. The density data has no lat/lon info. Instead, it refers to the LSOA ID number.

Does CartoDB have a relatively simple way of correlating the LSOA ID of each table? Is this simple using an SQL query, or another method?

--- Update based on rethinking the question ---

Since my overall aim is to render a density map with a colour gradation, I realised that with CartoDB, it's a polygon rendering scheme I'd need, and that I'd need to assign a numeric banding within the data table. I've done that by editing a text file and uploading it.

Given that I've been text-editing the tables in KML format, I looked for KML tags that would be useful. Ultimately I'd want to use the POLYSTYLE tags. But in advance of studying those, I just did a simple ranking using the SNIPPET tag.

With that in mind I took the highest density number and divided it by 10, then filled the SNIPPET column with those numbers. Once that was uploaded, I edited the rendering settings to assign a colour band to each level.

https://dglp.cartodb.com/viz/e69b5048-a9f4-11e5-8b02-0ecfd53eb7d3/public_map

This gets me most of the way to my original aim, and is good enough to share with others. It's taken several hours of foooling around with text and spreadsheet editors; probably much longer than doing the merging online.

There are other boundaries I want to add in, so I'll continue with the JOIN or MERGE approach and report back with the outcome. Aside from that, other questions have come up - like how to do other sorts of renderings - which probably ought ot be set out as new queries.


texts: Open-source GIS implementation of the Huff model

texts:
This might be a stretch, but I was wondering if anyone implemented gravity modeling tools or scripts for Retail Market Analysis (like the Huff Model), to analyze spatial data for customer-store relationships?

There are a couple ESRI sources (including Business Analyst extension), but I have not seen any for the open-source world. It seems like a place where PostGIS could really be leveraged for its database qualities.

https://stackoverflow.com/questions/2837870/huff-model-in-gis
http://arcscripts.esri.com/details.asp?dbid=15999

Reference docs (outdated, but relevant articles explaining the concept):

Retail Trade Area Analysis Using the
Huff Model
Arc10 Help: Sales Potential
Modeling
Calibrating Huff Model White Paper
in ArcGIS Business Analyst
ICSC Article


texts: Using ArcPy to Raster clip extent to be same as display?

texts:
I've been trying to figure this out for almost a week now. I am creating a tool which first needs the raster to be clipped out to the current display. I have tried all sorts of things. Below is the current code I've been trying to get working. You can also see the previous code commented out.

import arcpy
view = arcpy.mapping.MapDocument.activeView
#view = arcpy.env.extent

# Local variables:
inputRaster = "D:\bt_gis\Contours\InstaContours\LA_OC_DEMs.img"
outputRaster = "C:\\Users\\JZimmer\\Documents\\ArcGIS\\Default.gdb\\LA_OC_DEMs_Clip2.img"

# Process: Clip
arcpy.Clip_management(inputRaster, view, outputRaster, "", "-3.402823e+038", "NONE")
#arcpy.MakeRasterLayer_management (inputRaster, outputRaster, "", view, "")


texts:
What is the correct plugin/function to calculate a Habitat Fragmentation Index in QGIS (I use the 2.18 version) or FRAGSTAT starting from a vector layer?
I suppose that, first, I must convert the vector layer into a raster layer?
At the beginning, I was thinking about to use the Shannon Diversity Index, but I don't think that it's appropriate as it calculates the diversity in terms of habitats, but not the degree of habitat fragmentation.