texts: Many to many relationship in a QGIS Geopackage - fail

texts:
The current user manual has been unsuccessful in directing me to establish a many to many db relationship in a geopackage in QGIS (3.10.2 on Ubuntu w gdal 2x).

After the airlines in the manual crashed and burned, (at the point of entering sql instructions in dbmanager, python errors and on subsequent tries a locked up gpkg file) I'll run my own example;

Say we have cats and fleas and good humans want to keep track of the instances where fleas occupy more than one cat and cats have more than one flea. We are not interested in the flea2flea interactions.

Please note my example and this use case has no spatial data, the tables are set up without geometry column. The fleas are blind and won't be enlightened about mobility until they get the results of the analysis which I haven't completed...

Table of cats with a primary key (text 50)(widget UUID)
Table of fleas with a primary key (text 50)(widget UUID)
Pivot table with two fields, foreign_key_cats foreign_key_fleas
(gpkg writes it's own fid for each of the above, I am leaving it alone)

Define 2 x  relations in project properties

Name: indx_cats Parentlayer:cats Parentfield:cats_pk Childlayer:pvt childfield:fk_cats
Name: indx_fleas Parentlayer:fleas Parentfield:fleas_pk Childlayer:pvt childfield:fk_fleas

In the layer properties for cats and fleas, set the attribute form to drag and drop designer. Move the indx_cats and indx_fleas across to the layout section (in each of their layers). Set the cardinality option to pk_cats for the fleas layer and vice versa.

In the form widget setting for the primary key fields, put the widget type to UUID Generator.

In the cat layer, enter a new record by using the pencil icon to enter edit mode and click on the icon to add record. The dialog will show the primary data entry and then a child entry below. Click the pencil in the child to turn it to edit mode. Click the Add child feature to achieve that. It appears that a record has also been generated for fleas. It is visible that the UUID generator has worked on the child. Save edits and click OK, twice. Dialogs are completed and closed.

On inspection, there is a new record in each of the three tables. However the important one, the pivot table, only captures one of the keys, for the cat. The field in the same row for the fk_fleas is empty. A subsequent join via the pivot table appears unachievable.

What have I done wrong?


texts: MapInfo Point Object Dialogue is different to Info Tool's Transformed XY

texts:
A MapInfo Professional 11.0.3 user has re-projected data from AGD84 Zone 50 to WGS 84. However when they select a point and look at the point objects's X and Y, they are different to what's reported in the Info Tools table. In all cases the Point Object is 360o by -90.0o. When I repeat the process in ArcGIS it works flawlessly: the data is defined, it transforms, and displays perfectly.

Why would a Point Object report incorrectly?


texts: Reclassify multiple raster files with GDAL

texts:
I have a directory containing multiple .tif files which I want to reclassify and save to a new directory. The following code already worked for a single raster. Unfortunately, I don't know how to use driver.CreateCopy to write multiple files.

 in_directory = 'D:/Python/Copied'
    file = glob.glob(os.path.join(in_directory, '*.tif'))
    for data_path in file:
        raster = gdal.Open(data_path, gdal.GA_ReadOnly)
        myarray = raster.GetRasterBand(1).ReadAsArray()
        # modify numpy array to mask values
        myarray[myarray == 0] = 1
        myarray[myarray > 1] = 0

        # open output dataset, which is a copy of original
        driver = gdal.GetDriverByName('GTiff')
        ds_out = driver.CreateCopy("D:/Python/Copied/reclass/neu.tif", raster)
        # write the modified array to the raster
        ds_out.GetRasterBand(1).WriteArray(myarray)
        # set the NoData metadata flag
        ds_out.GetRasterBand(1).SetNoDataValue(0)
        # clear the buffer, and ensure file is written
        ds_out.FlushCache()


texts: What are the advanced fusion techniques for fusing 3 band multispectral and 242 band hyperion hyperspectral dataset?

texts: I have used some of the image sharpening techniques such as Wavelet, Gram-schmidt, Principal component, Brovey. Other than this what are the new and advanced fusion techniques and in which software it can be implemented.


texts: How to change and display the plugins icon in the menu in QGIS

texts:
I want to add multiple icons in the same file to display the plugins icons in the menu.

def initGui(self):
    action = self.add_action(   ':/plugins/Example/icons\icon1.png',
                                    text=self.tr(u'Example'),
                                    callback=self.ExampleMethod,
                                    parent=self.iface.mainWindow(),
                                    checkable=True,
                                    toolbar=self.ExampleToolbar)

        self.ExampleMethod = QgsMapTool(self.iface.mapCanvas())
        self.ExampleMethod.setAction(action)

        action = self.add_action(   ':/plugins/Example/icons\icon2.png',
                                    text=self.tr(u'Example1'),
                                    callback=self.ExampleMethod1,
                                    parent=self.iface.mainWindow(),
                                    checkable=True,
                                    toolbar=self.ExampleToolbar)

        self.ExampleMethod1 = QgsMapTool(self.iface.mapCanvas())
        self.ExampleMethod1.setAction(action)

but the problem is that the icons are not displaying.

I have used make clean and make commands and I have also updated the resources.qrc file.

What I have to do to display the icons in the menu?


texts:
In a date field (TRTMT_DT) in a shapefile, how can I use ArcGIS Pro to replace all Null values with a filler date of '11/11/1111'?

For my workflow I can't have any entries in this date field being Null.
I see there is no .replace function for non-string fields..
For example, in the Calculate Field tool, the following code doesn't work:

!TRTMT_DT!.replace('', '11/11/1111')

I need this to work outside of an active ArcGIS Pro session, referring to feature classes stored on disk, not referring to layers in the Table Of Contents pane. My intention is to call the process as a model.


texts: Have Tool update info on Dockable Window

texts:
When this tool is active, and a user clicks within the main map window it's getting an IPoint using an IRubberPoint.  I would like to use that point to update information on a dockable window.

Example for simplicity:
For the point returned from the Tool, I would like to display the X and Y coordinates on a dockable window.

How do I call a (non-static) dockable window function from the 'OnMouseDown' method on Tool?

The Tool:

public class tlPoint : Tool
{
    public tlPoint ()
    {
    }

    protected override void OnMouseDown(MouseEventArgs arg)
    {
        base.OnMouseDown(arg);

        IActiveView pActiveView = ArcMap.Document.ActiveView;
        IScreenDisplay3 screenDisplay = activeView.ScreenDisplay as IScreenDisplay3;
        IRubberBand rubberBand = new RubberPoint();
        IPoint point;

        point = rubberBand.TrackNew((IScreenDisplay)screenDisplay, null) as IPoint;

        // TODO: Call function on dockable window
    }

    protected override void OnUpdate()
    {

    }
}


texts:
Documentation at http://tilestache.org/doc/#over-http says this is the format of requesting your tile /{layer name}/{zoom}/{column}/{row}.{extension}

Now, my question is what column and row stand for?


texts: GRASS r.inund.fluv example of input files

texts:
Does anyone have an example of input files for the GRASS r.inund.fluv add-on that can be shared?

I am asking because I am getting some errors when I am trying to run an the files that I created and I am looking for an example that I can follow.


texts: How to include a hyperlink in a PDF (when creating a PDF) in FME

texts:
I'd like to create a PDF file with FME, and within this PDF file (which will be used on the computer) I want to create a hyperlink which people can click and that will send them to a website.
So my end product will be a PDF file with a hyperlink which is clickable.
Is this possible within FME?


texts: Extraction of raster cell values based on 'rgeos' and 'raster' buffering approaches in R

texts:
I am trying to extract cell values from a raster that lie within a certain distance from a given location (i.e. buffering). Evaluating different approaches, I found out that applying gBuffer(..., width = 20000) from package rgeos generally includes fewer cells than extract(..., buffer = 2000) from package raster for one and the same buffer width. Does anybody know what's the difference between these two approaches?

Here's a reproducible example that comes close to my piece of code:

# Required packages
library(dismo)
library(raster)
library(rgeos)

# Sample raster data (and perform reclassification for clarity purposes)
germany <- gmap("Germany")
germany <- reclassify(germany, matrix(c(0, 200, 0,
                                        200, 255, 1), ncol = 3, byrow = TRUE))

# Sample point shape data
nuremberg <- data.frame("lat" = 49.452778, "lon" = 11.077778, "city" = "Nuremberg")
# Set current CRS and reproject to raster CRS
coordinates(nuremberg) <- c("lon", "lat")
projection(nuremberg) <- CRS("+proj=lonlat +ellps=WGS84")
nuremberg <- spTransform(nuremberg, CRS(projection(germany)))

# Extract cell values using extract() only
nbg.val <- unlist(extract(germany, nuremberg, buffer = 20000))

# Extract cell values using gBuffer() and extract()
nbg.bff <- gBuffer(nuremberg, width = 20000)
nbg.val2 <- unlist(extract(germany, nbg.bff))

So far, so good. Now let's compare the results.

# extract() only
table(nbg.val)
nbg.val
  0   1
118  91

# gBuffer() and extract()
table(nbg.val2)
nbg.val2
  0   1
116  90

Of course, these are minor differences. However, using larger buffers and/or higher resoluted raster images, these discrepancies become larger and larger.


texts:
I'd like to correctly parse the MOD13Q1 VI Quality layer (see Table 2 in "layers" here). For this, I'm trying to follow Example 1 from this tutorial (page 10).

I'll illustrate my problem with a pixel value of "VI Quality" from my real data set: 35038

First, I transform it to the binary value 1000100011011110.

Then, I separate this binary value into different bit words (from right to left) according to Table 2:

1 0 001 0 0 0 11 0111 10

Following Example 1 ("Please bear in mind that the binary bit-string is parsed from right to left, and the individual bits within a bit-word are read from left to right."), I would then assume that I'd get the following bit words for the different categories:

MODLAND_QA: 10
VI usefulness: 0111
Aerosol quantity: 11
... and so on

However, the problem is that the value 0111 doesn't exist in Table 2. I guess that there are two possible explanations for this:

I made a mistake trying to apply the tutorial. In that case I'd be very thankful if somebody could point me to the right direction.
I applied the tutorial correctly, but Table 2 is incorrect or incomplete. Could anybody confirm if this might really be the case, and if yes, where to find information about missing values?


texts:
I have been working on creating a web mapping application using ArcServer 10 and the JavaScript API. Recently I was told that queries need to be run using PHP due to prior work by another team. The person that worked on the initial PHP coding has been migrated to my team, but has little experience with geospatial work. In contrast, I have more experince with geospatial work, but I have a limited exposure to working with PHP.

Is it possible to have the PHP interact with ArcSDE and/or PostgreSQL databases through the JavaScript API?

Our end goal is to allow users to query (both through geospatially selecting data and typing queries) via our web mapping application. Users could then click on a "more info" button which retrieves more detailed information about that record in a format that resembles the form it was entered into the database.

Any hints and/or resources would be much appreciated.


texts:
I'm actually a graphic designer - the manufacturing company I work for wants to develop a map with layers for Regional Sales Managers territories, Internal Sales Associates territories, Local Rep territories - each with accompanying contact info. Our product is essentially specialized plumbing products, so we'd like a map layer displaying plumbing code territories, and another layer for Authorities Having Jurisdiction (the people responsible for determining plumbing codes, reviewing/planning projects). So there's going to be a several layers describing territories, likely a few layers with point locations, and a fair amount of related contact information, plumbing codes, etc. I'm also working on  setting up some interactive web pages which will feed information into a database for easy retrieval of select info for customers visiting our website and/or integration into the maps we develop. We're trying to figure out which mapping software and DBMS to use.

My supervisor started up a trial run using ArcGIS a few months ago, and I've been fooling around with MySQL for a database, which I have up and running (albeit a very simple test version). I've been looking at some other online mapping programs like Geometrx, eSpatial, build-a-map - not true GIS. I also fooled around with QGIS a bit, and while its definitely capable of everything we'd like to do, its seems like something geared more for a GIS expert - and doesn't have some of the basemaps readily accessible with ArcGIS like population density, vector based county and city boundary maps - I'm sure they exist, but I'd have to hunt them down/purchase them separately or create them from scratch.

So my real questions here are:

Are we on the right track if we go with ArcGIS and a MySQL database?
Is there a better mapping program to use for our particular needs?
Are we better off keeping our database and maps separate, and manually updating one when the other changes?


texts: How do I convert Garmin waypoint in decimal coordinates to ArcGIS viewpoints

texts:
I have a few waypoints of a South Dakota Trail from a Garmin device in the decimal format (43.42330, -103.48474). In ArcGIS Runtime Android SDK 100.x.x I am opening a basemap and trying to add a simple marker symbol of a red dot on it.

ArcGISMap map = new ArcGISMap(Basemap.Type.TOPOGRAPHIC, 43.42330, -103.48474, 16);
    // create an initial viewpoint with a point and scale

    Point point = new Point(44.96971, -103.77460, SpatialReferences.getWebMercator());
    Viewpoint vp = new Viewpoint(point, 7500);

Which is displayed while the app get loaded fine. Now I want to add a Simple Marker using this code on top of the map.

    SimpleMarkerSymbol symbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.CIRCLE, Color.RED, 12); //size 12, style of circle

    //add a new graphic with a new point geometry
    Point graphicPoint = new Point(43.42330, -103.48474, SpatialReferences.getWebMercator());
    Graphic graphic = new Graphic(graphicPoint, symbol);
    graphicsOverlay.getGraphics().add(graphic);

Currently the red dot is off the Gulf of Guinea in West Africa.
What am I doing wrong. I think my Map zoom and Point scale are out of proposition?  How would I fix this point to show up in the right place?


texts: Countries cutting off at the edges of Mollweide projection

texts:
I have a custom CRS centering on the Pacific ocean with the Mollweide projection:

+proj=moll +lon_0=-158 +datum=WGS84 +units=m +no_defs +lon_wrap=-158

My countries are split at the 22nd meridian, and look fine with a rectangular projection such as +proj=cea. Something about the curves at the edges is messing it up.

Also strange is the zooming behavior - as I zoom in on the edges, the curves of Africa & Antarctica at the edges are filled in. It only looks this way when I'm fully zoomed out to see the whole layer.


texts: I want to add data from an API (census.gov - https://api.census.gov/data/2016/acs/acs5/variables.json) to ArcMap. How do I do that? If I have to publish it on ArcGIS Online first, I can do that but I didn't see how to add data from an API url there either. Any suggestions? Note (my end goal is to inject the api into a custom widget script that pulls the data from a user defined area).


texts: Extract multiple bands from a raster layer with wps ras:BandSelect

texts:
I'm trying to use the WPS process ras:BandSelect tool to select multiple bands from a 10-band raster layer. Specifically, I want to select band indices "0, 1, 2" from the 10-band image.
The DescribeProcess abstract for ras:BandSelect is "Returns a raster generated by the selection of some bands from the input raster" which suggests selecting multiple bands is possible.
Below is the XML payload that I'm posting to the WPS service. However, this payload ONLY returns band index "0" and not the three bands I'm interested in.
Is selecting multiple bands possible and if so, what synatax can I try next?
Note, WPS server is Geosever 2.15.
<?xml version="1.0" encoding="UTF-8"?><wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
      <ows:Identifier>ras:BandSelect</ows:Identifier>
      <wps:DataInputs>
        <wps:Input>
          <ows:Identifier>coverage</ows:Identifier>
          <wps:Reference mimeType="image/tiff" xlink:href="http://geoserver/wcs" method="POST">
            <wps:Body>
              <wcs:GetCoverage service="WCS" version="1.1.1">
                <ows:Identifier>the_layer</ows:Identifier>
                <wcs:DomainSubset>
                  <ows:BoundingBox crs="http://www.opengis.net/gml/srs/epsg.xml#27700">
                    <ows:LowerCorner>bbox_ll</ows:LowerCorner>
                    <ows:UpperCorner>bbox_ur</ows:UpperCorner>
                  </ows:BoundingBox>
                </wcs:DomainSubset>
                <wcs:Output format="image/tiff"/>
              </wcs:GetCoverage>
            </wps:Body>
          </wps:Reference>
        </wps:Input>
        <wps:Input>
          <ows:Identifier>SampleDimensions</ows:Identifier>
          <wps:Data>
            <wps:LiteralData>0 1 2</wps:LiteralData>
          </wps:Data>
        </wps:Input>
        <wps:Input>
          <ows:Identifier>VisibleSampleDimension</ows:Identifier>
          <wps:Data>
            <wps:LiteralData>0 1 2</wps:LiteralData>
          </wps:Data>
        </wps:Input>
      </wps:DataInputs>
      <wps:ResponseForm>
        <wps:RawDataOutput mimeType="image/tiff">
          <ows:Identifier>result</ows:Identifier>
        </wps:RawDataOutput>
      </wps:ResponseForm>
    </wps:Execute>


texts:
I want to save my 'feat' - selected by criteria polygons in shp.file to save   in diferent shp.file on the disk     by using SyncToDisk() in osgeo      for vector.
Code gives me error:  AttributeError: SyncToDisk.

What can be wrong?

import osgeo, os
from osgeo import ogr, gdal

shpFile = r'C:\Users\ReBurns.shp'

driver = ogr.GetDriverByName('ESRI Shapefile')

ptsDS = driver.Open(shpFile)
ptsLayer = ptsDS.GetLayer()

#Passing criteria  to select polygons:
myQuery = 'Area_ha > 39000.00'
ptsLayer.SetAttributeFilter(myQuery)
print ptsLayer
ptsLayer.GetFeatureCount()

for i in range(0, ptsLayer.GetFeatureCount()):
    pt = ptsLayer.GetNextFeature()
    print pt.GetField('Area_ha')

for i in range( 0, ptsLayer.GetFeatureCount()):
    feat = ptsLayer.GetFeature( i )
    print feat
feat.SyncToDisk(r'C:\Users\ReBurns_Diss_Alb111.shp')
feat = None


texts: OpenLayers 2 / MapServer: Limited zoom levels

texts:
I want to display a MapServer raster image with OpenLayers 2. My problem is that I cannot zoom into the image although the resolution should allow it.

This is what I have so far:
http://geocre.net/mapservertest/

A detail of the original image:

HTML code:

<!DOCTYPE html>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<title>OpenLayers MapServer Test</title>
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/theme/default/style.css" media="all" />

MapServer map file:

MAP
  IMAGETYPE      JPEG
  EXTENT         -94018 1048833 -92362 1049470
  SIZE           1000 400

  WEB
    METADATA
      "wms_title" "mymap"
      "wms_srs" "epsg:900913"
    END
  END

  LAYER

    METADATA
      "wms_title" "mymap"
      "wms_srs" "epsg:900913"
      "wms_enable_request" "*"
    END

    NAME         myraster
    DATA         /mapserver/data/tamale_wet_season.tif
    STATUS       DEFAULT
    TYPE         RASTER
    PROCESSING   "BANDS=1,2,3"
    OFFSITE      0 0 0
  END
END


texts: What's the Semantic Web got to do with GIS?

texts:
A few years ago there was a lot of discussion about the Semantic Web.  Are any of the concepts underlying the Semantic Web coming into fruition with respect to GIS?  Or is it just another hippie dream?

  I have a dream for the Web [in which computers] become capable of
  analyzing all the data on the Web – the content, links, and
  transactions between people and computers. A ‘Semantic Web’, which
  should make this possible, has yet to emerge, but when it does, the
  day-to-day mechanisms of trade, bureaucracy and our daily lives will
  be handled by machines talking to machines. The ‘intelligent agents’
  people have touted for ages will finally materialize.
  - Tim Berners-Lee

Sounds like Tim may have been fishing the same streams as Richard Brautigan, whose poem published in 1963, All Watched Over by Machines of Loving Grace has everything but the cloud:

I'd like to think (and
the soner the better!)
of a cybernetic meadow
where mammals and computers
live together in mutually
programming harmony
like pure water
touching clear sky.


texts: Define if two polygon layers are overlapped completely in ArcGIS

texts:
I will try to be as detailed as I can.

I have created a Script tool. In this tool, I have two parameters: a) the Landuse and b) the Flight.

In the ToolValidator, I used the following code to check if the Landuse is completely covered by the Flight.

P = self.params
ds0 = arcpy.Describe(P[0].value).catalogPath
ds1 = arcpy.Describe(P[1].value).catalogPath
arcpy.Erase_analysis(ds0,ds1,'eraseOutput','0 Meters')
mc = int(arcpy.GetCount_management('eraseOutput')[0])
if mc > 0:
    P[1].setErrorMessage('The flight does not completely cover the landuse!')
else:
    P[1].clearMessage()
arcpy.Delete_management('eraseOutput')
del ds1
del ds0

and it works good.

On second thought, I wanted to make my tool to be used by users with Basic license, so I changed the code as follows:

P = self.params
ds0 = arcpy.Describe(P[0].value).catalogPath
arcpy.MakeFeatureLayer_management(ds0,'Start_lyr')
ds1 = arcpy.Describe(P[1].value).catalogPath
arcpy.Dissolve_management(ds1,'Flight_diss1',[],'','MULTI_PART','DISSOLVE_LINES')
arcpy.SelectLayerByLocation_management('Start_lyr','within','Flight_diss1','0 Meters','NEW_SELECTION','INVERT')
mc = int(arcpy.GetCount_management('Start_lyr')[0])
if mc > 0:
    P[1].setErrorMessage('The flight does not completely cover the landuse!')
else:
    P[1].clearMessage()
del ds1
arcpy.Delete_management('Flight_diss1')
arcpy.Delete_management('Start_lyr')
del ds0

and it works fine, as expected with the same results.

Due to the fact that it's not the better way to use Toolvalidator with GP processes like Erase, Dissolve, Union, etc and the data that are about to be used in the tool are relatively big (100.000 landuse polygons and 1.000 Flight polygons), I was wondering if there is a better (faster) way to have the same results as the above code without using GP processes or if there can be an optimization of it?


texts: Fetching the geometry and attributes from PostgreSQL Using FME Workbench

texts:
I have 2 fetching administrative areas one inside the other. For that, I am having servers to get the data.

When I am running anyone query in SQLCreator, it is working fine separately, but while using union the output is only from the first query. Any comment on this about where am I going wrong?

--admin area 0a
(select na.*,aa.geom, aa.name as A09, feat_type, a9_admin_id, a8_admin_id, a7_admin_id,a6_admin_id, a5_admin_id, a4_admin_id, a3_admin_id, a2_admin_id, a1_admin_id from x.mnr_admin_area aajoin x.mnr_admin_area2nameset an on aa.a9_admin_id = an.admin_area_idjoin x.mnr_nameset2name nm on an.nameset_id = nm.nameset_idjoin x.mnr_name na on nm.name_id = na.name_idwhere aa.country='IND' Â and Â na.iso_lang_code='ENG' and aa.feat_type = '112')
union

--admin area 0b
(select na.*,aa.geom, aa.name as A08, feat_type, a9_admin_id, a8_admin_id, a7_admin_id,a6_admin_id, a5_admin_id, a4_admin_id, a3_admin_id, a2_admin_id, a1_admin_id from x.mnr_admin_area aajoin x.mnr_admin_area2nameset an on aa.a8_admin_id = an.admin_area_idjoin x.mnr_nameset2name nm on an.nameset_id = nm.nameset_idjoin x.mnr_name na on nm.name_id = na.name_idwhere aa.country='IND' Â and Â na.iso_lang_code='ENG' and aa.feat_type = '111')


texts: Merge rasters with different origins in R

texts:
I have a list of rasters with the same projection and resolution but different origins and I need to merge them in a single raster file.

Here's my code

l <- list.files('path', full.names=TRUE)
lst <- lapply(l, raster)
r_merged <- do.call(raster::merge, lst)

Error in compareRaster(x, extent = FALSE, rowcol = FALSE, orig = TRUE,
 : different origin

Here's what I'd like to get. Blue squares are original rasters, I want to get a single raster as the red square.


texts: SHP, SHX and DBF files became empty (zero byte) overnight on QGIS

texts:
This literally happened overnight. I was working on a shapefile in QGIS 2.4 last  night but my files (SHP, SHX and DBF) all become zero byte this morning.

If this has happened to anyone before, how should I go about solving this problem?

QGIS was installed on Ubuntu 12.04 in VMWare Workstation. Host machine runs on Windows. The only thing special I did was running a apt-get update at the same time.


texts: .on("load") event for layer groups in Leaflet

texts:
I have used Leaflet's ImageOverlay to load various image layers onto a Leaflet map div (L.map).  The size of the layer files can vary greatly.  So some layers load very quickly while others can take a couple of seconds (and not every image layer file actually exists).
I would like to check whether all the layer files requested have been fully loaded before doing something else.  I can find out if each individual layer is fully loaded using .on("load", function() { ... }).
For example,
layer1 = L.imageOverlay(...);
layer2 = L.imageOverlay(...);
layer3 = L.imageOverlay(...);

layer1.on("load", function() {console.log("layer1 loaded")});
layer2.on("load", function() {console.log("layer2 loaded")});
layer3.on("load", function() {console.log("layer3 loaded")});

However, when I defined a LayerGroup,
var AllLayers = L.layerGroup([layer1, layer2, layer3]);

and then tried
AllLayers.on("load", function() {console.log("All layers loaded")});

I did not get "All layers loaded" in the console.
I came across a related question on the .on("click") event
.on(click) for layer groups in leaflet
I tried to define a layer group using L.featureGroup
var AllLayers = L.featureGroup([layer1, layer2, layer3]);

However, it did not show "All layers loaded" in the console either when all the layers were loaded.
I don't know how I would go about trying the first method answered in the above article.


texts:
I need my label callouts switching off.
Basically I know how to do it. I am clicking on the label info ("Change label properties" I the main toolbar, then just switching off "Show callout".

The problem is twofold.
1 - I have to do it one by one
2 - If I switch it off, I am losing all the amendments done before (switching off brings my label back to beginning view) and I have to redo my changes.
Is there any change to switch label callouts for a whole defined text rule?


texts: Adding text from one field to another in QGIS attribute table?

texts:
I would like to copy names from field 'Uch_1' to 'Uchastok' but not all. Names in 'Uch_1' should be copied and replace only  where in 'Uchastok' cells  are 'NULL'  but if not, it remains without changes.

Any ideas what code should I use in Field Calculator?


texts: Empty layer copied from existing SpatiaLite layer to another SpatiaLite file is invalid

texts:
I am very new to QGIS development, but not GIS. My goal is to create a copy of an existing layer (created within the QGIS GUI) from one SpatiaLite file to another, then add new attributes and populate records to the copy.
I have successfully used the QgsVectorFileWriter.writeAsVectorFormatV2() to create the copy, but checking the validity of the copy returns false and when adding to the map has a broken link in the TOC. The original layer is empty and in 4326 crs. I have done quite a bit of searching but can't track down what the issue is.
I have tried adding a transform in the map properties, I have digitized to a polygon in the copied layer and to see if creating an extent might help. I have checked the encoding. Just not sure where to go from here.
Here is the code:

uri = QgsDataSourceUri()
db_path = os.path.join(
    "C:\\",
    "Users",
    getpass.getuser(),
    "Documents",
    "temp_gis_data",
    "temp_gis_data.sqlite",
)

db_path2 = os.path.join(
    "C:\\",
    "Users",
    getpass.getuser(),
    "Documents",
    "temp_gis_data",
    "temp_gis_data2.sqlite",
)

uri.setDatabase(db_path)
schema = ""
table = "test_poly"
geom_column = "geom"
uri.setDataSource(schema, table, geom_column)
driverName = "SpatiaLite"
vlayer = QgsVectorLayer(uri.uri(), table, driverName)
print(vlayer.isValid()) --> True
QgsProject.instance().addMapLayer(vlayer)

options = QgsVectorFileWriter.SaveVectorOptions()
options.driverName = driverName
options.layerName = "test_poly"

if not os.path.exists(db_path2):
    print("exists false")
    options.actionOnExistingFile = QgsVectorFileWriter.CreateOrOverwriteFile
    options.EditionCapability = QgsVectorFileWriter.CanAddNewLayer
else:
    options.actionOnExistingFile = QgsVectorFileWriter.CreateOrOverwriteLayer

transform_context = QgsProject.instance().transformContext()

err = QgsVectorFileWriter.writeAsVectorFormatV2(
    vlayer, db_path2,transform_context, options
)
print(err)

#update layer with data from db
uri = QgsDataSourceUri()
uri.setDatabase(db_path2)
print(uri.uri())
schema = ""
table = "test_poly"
geom_column = "geom"
uri.setDataSource(schema, table, geom_column)
vlayer2 = QgsVectorLayer(uri.uri(), table, driverName)
QgsProject.instance().addMapLayer(vlayer2) --> broken link to source, but can confirm a layer was created
print(vlayer2.isValid()) -->False


texts: Identify projection and set Bursa wolf params

texts:
i have a shapefile with .prj :

PROJCS["NAD_1927_UTM_Zone_17N",
GEOGCS["GCS_North_American_1927",
DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",1640416.666666667],
PARAMETER["False_Northing",0.0],
PARAMETER["Central_Meridian",-81.0],
PARAMETER["Scale_Factor",0.9996]
PARAMETER["Latitude_Of_Origin",0.0],
UNIT["Foot_US",0.3048006096012192]]

and my goal is to project this to google maps. I can transform in to web mercator using geotools, but there is a slight shift. I have a few questions:

Is this some projection with a code registered under an authority?

I dont think its NAD27 UTM 17N, cos params like easting differ
Is there a .gsb to handle the shift, or how else can i handle it?
Does use in this case user need to provide the Bursa wolf params himself?

Ideally, the system i build should be able to automatically handle such shapefiles, is it too much to aks?


texts: Mapfile + OpenLayers: accessing the database by column names (hover, onclick functionality) without using MapServer templates?

texts:
What I'm trying to accomplish: take the functionality below (see picture) and do the same without using a MapServer template (if this is even possible).

I currently have a mapfile, and an openlayers file. All the data is being displayed correctly.

In my mapfile, I reference a database. I call out that database by a column name so what is what's used for the label on the map. Quite simple.

Now, the thing here is that I'm accessing just a standard php/html file. Not a mapserver template, like:

http://192.168.2.164/cgi-bin/mapserv.exemap=%2Ftmp%2Fnavhome%2Fnavcore%2Ftemplates3%2FAllAirports.map&mode=nquery&imgext=-180.000000+-107.943706+180.000000+107.943706&imgxy=640+384&zoom=0&qlayer=Cities&layers=world&searchmap=true&img.x=705&img.y=347

Example: 123.456.7.890/mymap.php in the browser is what I want. Not the above.

Now if I wanted to accomplish this using a MapServer template (correct me if I'm wrong on my terminology), this has proven to be quite easy, because you can reference

map_body.html
map_header.html
map_footer.html

in your Mapfile. In those files you can do some javascript and whatnot, reference the columns in the DB and it works. See below for an example of this (top left is the onClick functionality when you click on a point on the map, where the mouse is is just the mouseover).

See below: this is what I want to do without the cumbersome MapServer functionality, ie sluggish navigation buttons

So what I'm trying to wrap my head around is: how do you set up the database references in your .html/php file? Or, how do you reference the templates (map_body.html, map_header.html, map_footer.html) from your MapFile in your OpenLayers file?


texts:
I am struggling with one thing in the raster calculator in GRASS GIS 7:
I want to create a raster_b from raster_a, with raster_a values between >=-0.15 and <=0.15. The raster containing values <-0.15 I calculated with
if("raster_a"  >0.05 , raster_b, null()),

but how do If((raster_a >-0.15) and (raster_a <0.15), raster_b, null))?

Any help is appreciated!
Peter


texts: How to Remove Topographic Effects Like Shadows from Landsat Image

texts:
I am using QGIS 2.4.0 Chugiak on my windows 8.1, for classification of landsat 5-7 image that contains hilly mountains with dense forest and 60% area are plains. I am classifying through Semi-automatic Classification Plugin by Spectral Angle Mapping algorithm but I am not getting a properly classified image.

I have carefully collected the signatures and analysed those on a spectral signature plot. Before starting the classification algorithm, I converted the radiance to Top of Atmosphere reflectance through automated process and clipped my area of interest using "clip multiple raster" under preprocessing tab through shape file.

My question is this. Is there something wrong with whole process or first do I have to eliminate the terrain shadows after the conversion to TOA reflectance? I also have the SRTM DEM 30m resolution. If it is necessary to remove those areas that are under shadows then how; if not then how can I improve my classification through this automated plugin?


texts: Leaflet redraw() doesn't trigger bounds update like setLatLngs()

texts:
I'm the author of the geometry editing plugin leaflet.pm and I'm currently investigating a strange bug where editing a polygon sometimes won't update the bounds of the polygon even though the coordinates array changed.

I traced the issue down to two different functions I use to update the coordinates:

layer.setLatlngs().redraw();

and

layer._latlngs = [some new coords]
layer.redraw();

I guess the simple solution is to ALWAYS update a layers coords with setLatLng - and I'm currently changing my code to do that.

I still want to ask - shouldn't redraw() also update the bounds? Because it is visibly changing the layers appearance to the new coordinates too?


texts:
I wanted to use in_memory workspace, however I can't clear it. No matter if I use in Python window, in ArcMap this:

arcpy.Buffer_analysis("something", "in_memory/buffer", 399)
arcpy.Delete_management("in_memory")
arcpy.Buffer_analysis("something", "in_memory/buffer", 3345)

or this:

arcpy.Buffer_analysis("something", "in_memory/buffer", 399)
arcpy.Delete_management("in_memory/buffer")
arcpy.Buffer_analysis("something", "in_memory/buffer", 3345)

I get the following error:

ExecuteError: ERROR 000725: Output Feature Class: Dataset in_memory\buffer already exists.

In_memory gets normally cleared when I restart ArcMap.
How can I clear in_memory?

EDIT:

Output from answer proposed by KHibma:

>>> arcpy.CopyFeatures_management("linie", "in_memory/foo1")
<Result 'in_memory\\foo1'>
>>> arcpy.Exists("in_memory/foo1")
True
>>> arcpy.Delete_management("in_memory")
<Result 'true'>
>>> arcpy.Exists("in_memory/foo1")
True
>>> arcpy.Delete_management("in_memory/foo1")
<Result 'true'>
>>> arcpy.Exists("in_memory/foo1")
True

So it seems that neither of deleting from in_memory methods is working at all.


texts: Displaying geojson polygon in leaflet imported with ajax

texts:
I'm having difficulty displaying a simple polygon in leaflet. I'm unsure if my syntax is bad or if I'm importing the geojson incorrectly. I'm using the ajax plugin from calvinmetcalf and add the js script in the head

In the body I'm adding a base layer, specifying the polygon style, and then adding the polygon as the variable 'outline'

My poly.geojson file looks like this -- I've checked it through geojson.io and it plots fine there.

{"type":"FeatureCollection",
"crs":{"type":"name",
    "properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},
"features":[{"type":"Feature","id":0,"properties":{"Id":0},
    "geometry":{"type":"Polygon",
    "coordinates":[
        [[-112.8438,45.3956],
        [-112.4306,45.3956],
        [-112.4306,45.1617],
        [-112.8438,45.1617],
        [-112.8438,45.3956]]]
      }}]
}


texts: Get Attributes from 1:n relation in QGIS as Expression to use in Atlas

texts:
I need to set up way signs for something like a "hiking-GIS". In the first step I made a network analysis (using QNEAT3) to find the distance from the signs ("Way Signs") to the available destinations ("Destinations") along the trail network ("Ways"). The result is the "OD-Matrix". So far so good... to see all destination distances for every single sign, I was setting up a 1:n relation via project properties. You can see all relevant results in the screenshot:

I'm able to see all destinations with distances in the attribute form - great! But I need to get for every sign all it's destinations with distance. To get a real printable sign, I thought about to use the Atlas to switch trough every sign (layer 'Way Signs' as coverage layer) and use a expression text field to show the destinations with distances.

So the question is: How do I get the 1:n related attributes via expressions to use them in the Atlas (or anywhere else)?


texts: How to aggregate values multiple from multiple points along a route as an attribute of it?

texts:
I have a route network with a "Name" field that identify every route. On the other hand I have a shapefile of points. Each point corresponds to the number of people using a route at a time t. I would like to apply those counts to the routes but I do not know which tool to use, knowing that some routes have more than one count along them.

I have interpolated using the inverse distance weighing but it is giving values over the entire areas instead of just along the trails. I also tried to use calibrate routes but it does not seem to be working.

Anyone has an idea?


texts: Add empty layers to Feature Service with ArcGIS Python API

texts:
I would like to create a number of Feature Services. Each Feature Service should contain 15-20 layers. There is no data yet, as I would like to create these for data collection with ArcGIS Collector.  From an excel sheet, I know what attributes belong to each layer.

It is easy to create empty feature services with the ArcGIS Python API. But I cannot find a solution for adding layers (with specific attributes and geometry types etc.) to these empty feature services.

Where can I find an example? Or more documentation?


texts:
I downloaded the metatool plugin and copied C:\OSGeo4W64\apps\qgis\python\plugins\metatools but when I open QGIS 3.0 it gives error the plugin is not compatible

Where can I get metatool plugin for QGIS 3.0?


texts: NumPyArrayToFeatureClass output shapefile does not have field names

texts:
How do I retain the values and field names in the resulting shapefile's attribute table after using NumPyArrayToFeatureClass?

I'm starting out with a 2d array named npGrid and I'm making it into a structured array with column names in order to run NumPyArrayToFeatureClass. I read the following post to guide me this far: arcpy.NumPyArrayToFeatureClass exception: "TypeError: narray.fields require"

My Code:

import arcpy, os
import numpy as np

out_fc = os.path.join(os.getcwd(), "test.shp")
sr = arcpy.SpatialReference(4326)

npGrid = np.array([[40.10, 35.3, .001], [40.2, 35.25, .002], [40.8, 34.9, .003], [40.75, 35.75, .004]])

x = npGrid[:,0]
y = npGrid[:,1]
tprobs = npGrid[:,2]

struct = np.rec.fromarrays([x,y,tprobs], formats=['f8','f8','f8'], names=["X", "Y", "TPROBS"])

feature = arcpy.da.NumPyArrayToFeatureClass(struct, out_fc, ['X', 'Y', 'TPROBS'], sr)

print([f.name for f in arcpy.ListFields(out_fc)])

The resulting shapefile is missing all of the field names and values:

Output:
[u'FID', u'Shape', u'Id']

edit after changing the code to the following, the attribute table in the output shapefile was populated with the tprob value:

feature = arcpy.da.NumPyArrayToFeatureClass(struct, out_fc, ['X', 'Y'], sr)


texts: Adding multiple Additional options to QGIS Batch processing?

texts:
How to add multiple additional options on qgis batch processing?

result is : GDAL command:

gdal_translate -of GTiff -co "COMPRESS=JPEG JPEG_QUALITY=75 PHOTOMETRIC=YCBCR TILED=YES"

it should be

gdal_translate -of GTiff -co COMPRESS=JPEG -co JPEG_QUALITY=75 -co PHOTOMETRIC=YCBCR -co TILED=YES ....


texts: Calculate area of raster grid cells in an unprojected raster using ArcGIS

texts:
I have a raster dataset in a geographic coordinate system where the value of the grid cell is in tons per hectare. I want to be able to calculate the number of hectares in each grid cell so that I can calculate the number of tons per pixel and eventually perform zonal statistics on the raster. The raster covers much of the globe, so the cells near the equator have a different area value than those in northern latitudes. I am hesitant to project the raster as I'm worried it will distort the values.

Is there any way to calculate the area value of each raster cell using Raster Calculator in ArcMap?

I saw a GeoNet thread on how to do this in an earlier version of ArcMap using the $$YMap function, but it says it won't work in versions over 10.0. I'm open to suggestions on how to do this on other platforms, but I have very little scripting experience.


texts: How to add a Domain to a Feature Class in ArcGIS when the Subtype Field is Frozen?

texts:
I'm trying to add a Domain to a Field in a Feature Class in ArcGIS 10.2.
I'm Following the Instructions found in the Official Documentation for Associating default values and domains with tables and feature classes
and Creating subtypes. The issue I'm running into is that, after successfully creating a new Domain in the Enterprise GeoDatabase containing the Feature Class of Interest, I cannot Create a Subtype in that same Feature Class. Using the Catalog navigation tree, I right-click on the Feature Class, select Properties, locate the Subtypes tab, then Attempt to Add a Subtype, in the service of Adding a Domain. The Subtype Field and Default Subtype Fields are 'greyed out'

AND whenever I try and add text to the Subtypes files, the Domain box automatically opens.  This image indicates that I have properly created a Domain prior to Engaging with this Workflow.


texts: What is difference between Map event onExtentChange and Map.extent property?

texts:
I am a newbie and I am looking to persist the map extent across sessions so that it can be loaded instead of the default extent.

I believe what I need to do is to store the extent in a cookie after every map extent change. Then when the user reloads the page, set the map extent to the extent last saved.
I came across the 'onExtentChange' event as well as the read only property map.extent and map.SetExtent.

What is the difference between using the event or using the map.Extent method? Can someone please explain?


texts: QGIS python error for XY tools plug in, even after installing xlrd and xlw modules!

texts:
As I am a complete beginner, I had troubles getting the XY tools plug in running. Now that the xlrd and xlw module error has disappeared after installment of said modules, I can finally choose the X and Y axis. But after doing so I get the following error message after confirmation:

File "/Users/user/.qgis2/python/plugins/xytools/xytools.py", line 162, in excelOpen self.loadSheetAsLayer(provider)
File "/Users/metzi/.qgis2/python/plugins/xytools/xytools.py", line 211, in loadSheetAsLayer x=row[self.layerInfo[self.layer].xIdx] IndexError: list index out of range

The .xls file in use should be fine, since it's from a Prof in a geomatics class and already in use for 4 years. Can anybody help a total beginner?


texts: I am trying to join a .csv file with a .shp file in QGIS but QGIS is unable to read the data in my .csv file as it indicated that the variables are string of length and precision 0. As a result, I am unable to use the method of create a new column of numeric characters and the option to add a new column or to use the field calculator is disable in my attribute table.


texts: Calculating Distances Between Polygons: One to Many, ArcGIS 10

texts:
My Problem:

I have a set of sites (green), a 5 km buffer around them (purple) and a set of special areas (blue).

I need to calculate the distances between each site and each special area intersecting with the sites buffer.

However, a special area is not unique to a single buffer and where a special area crosses more than one buffer (i.e. central blue site), I need a separate row, with the distance between each site and that special area.

Desired output:

A layer where the attribute table as a row for each distance between the site and the special area within the buffer, with the area of each special area included (calculated before this analysis).

What would be the work flow to get to this desired result? 'Near' won't help as it will just tell me the distance to the nearest special area. I'm not sure a 'near table' would help where a special area is in the buffer of more than one buffer.


texts: What are the OSM 'class' cost settings for OSRM?

texts:
I'm looking to set up a routing system that will give distances based on network routes, rather than straight lines (ie. ST_Distance).

To do this, I'd like to set up a pgRouting database where the cost associated with the OSM 'classes' are similar to the OSRM project - which gives more realistic directions than the pgRouting example I've set up so far.

What I'm looking for is the class cost breakdown similar to what is in the pgRouting documentation:

UPDATE classes SET cost=1 ;
UPDATE classes SET cost=2.0 WHERE name IN ('pedestrian','steps','footway');
UPDATE classes SET cost=1.5 WHERE name IN ('cicleway','living_street','path');
UPDATE classes SET cost=0.8 WHERE name IN ('secondary','tertiary');
UPDATE classes SET cost=0.6 WHERE name IN ('primary','primary_link');
UPDATE classes SET cost=0.4 WHERE name IN ('trunk','trunk_link');
UPDATE classes SET cost=0.3 WHERE name IN ('motorway','motorway_junction','motorway_link');

Does OSRM use a similar cost scheme? And is it available in their documentation somewhere?

A basic example of the difference is directions from Boulder, CO to my house in Denver, CO: the two systems takes 2 different routes - the OSRM route follows major roads more closely until it needs to take minor roads, while the pgRouting method will take more minor roads, leaving major roads as soon as possible.


texts:
I want to reverse the color ramp in ArcMap 10.2. In the example below, I want the red colour to be associated with lower values and the green color with the higher values.

Any idea how to do this?


texts: I'm not seeing any support for the ECW format in Mac OS X 10.11. Nothing recent in searches here and the latest on kyngchaos is for 10.9 and doesn't do anything for QGIS 2.12.


texts: What is the most efficient way to publish different thematic versions of the same large feature class?

texts:
I have a large feature class containing many thousands of polygons. For several reasons, at least part of the time in our development/deployment process, it lives in a file GDB.

It is part of a map service that we publish where there are different layers based on multiple (4-6) thematic versions of this same feature class (rendered, filtered, and labeled based on different attribute values).

Basically, I've been adding the feature class to the map, renaming the layer, setting the display attributes, then adding it again and doing the same things.

This works just fine, but I have a nagging feeling that it's inefficient, particularly for a map service. The consumer of the map service has limited abilities to change rendering.


texts: How to turn WKBtype integer into text for memory layer creation in QGIS

texts:
I'm creating a memory layer in QGis python and I need to match the geometry of the memory layer that I am building to the geometry of another layer.

After some investigation it seems to me that, as per QGIS 2.2 Documentation and the QGIS 2.2 API Documentation, the URI defining the geometry type approximately matches the QGis::WkbType member enumeration text.

I know I can easily query the WKBType of my input layer with

myWkbType=mylayer.dataProvider().geometryType()

However, this returns an integer whereas the constructor requires text. Is there a simple built-in pyQGIS way to turn these constants into text or do I need to build a hacky little reverse mapping function for it?


texts: Change DEM to match spatial extent and pixel size of unprojected RADARSAT image (ENVI)

texts:
I have a raw "Path Image" RADARSAT image as a CEOS file, which is by default not georeferenced and in units of Digital Numbers (DN). I'm trying to convert it to a projected geotiff in units of backscatter intensity (sigma-nought), but I've hit a wall in terms of the workflow in ENVI.

Converting the raw image to backscatter intensity is simple enough using the "Sigma Nought Calibration" Tool in ENVI, but it requires a DEM to be the same spatial extent and pixel size as the CEOS file - but I'm not sure how to get the DEM to match the spatial extent and pixel size of an non-georeferenced RADARSAT CEOS file.

I tried to project the CEOS file first, so I could match it to an existing DEM geotiff, but once it is georeferenced it is no longer recognized as a RADARSAT file and cannot be used in the Sigma Nought Calibration tool in ENVI. Further, I manually tried to project the DEM to what coordinate system I believe the CEOS raw RADARSAT is in (WGS84), but they didn't get even close to matching spatial extents. After that, I matched the DEM to the spatial extent and pixel size of the projected (WGS84 UTM17N) RADARSAT - but of course since it was projected, it didn't match the spatial extent of the raw CEOS file, and couldn't be used.

Short of just manually geo-referencing the DEM to the unprojected RADARSAT CEOS file, I'm not sure how to proceed and would love some guidance. How can I get a DEM to match the spatial extent/pixel size of a non-georeferenced CEOS file?


texts: Getting capabilities from tomcat's Geoserver fails

texts:
I want to take capabilities from tomcat's geoserver, using this code:

wms = new OpenLayers.Format.WMSCapabilities();
OpenLayers.Request.GET({
    url:"http://localhost:8080/geoserver/wms/filedata?request=GetCapabilities",
    success: function(e){
        var response = wms.read(e.responseText);
var capability = response.capability;
for (var i=0, len=capability.layers.length; i<len; i+=1) {
    var layerObj = capability.layers[i];
    if (layerObj.name === 'filedata') {
        map.zoomToExtent(OpenLayers.Bounds.fromArray(layerObj.llbbox));
        break;
    }
}
    }
});

But firebug says that "capability is not defined" in this string:

for (var i=0, len=capability.layers.length; i<len; i+=1) {

If I write the url from capability request in a browser, I get the error:

XML Parsing Error: XML or text declaration not at start of entity
Adress: http://localhost:8080/geoserver/wms/filedata?request=GetCapabilities
Line number 5091, column 21:          <Abstract><?xml version="1.0" encoding="UTF- 8"?>
<ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogc http://localhost:8080/
geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd">   <ServiceException>
--------------------^

But if I look in firebug, I can see that application got the capabilities.

In standalone Geoserver all works fine.


texts: GDF -- Can anyone suggest some good reading?

texts:
Can anyone give me a nutshell explanation of the Geographic Data Files format, or post a few URLs I might find enlightening?

I get the sense (although I'm not sure) that GDF implies building certain topological relationships, frictions, rules, etc into the spatial database.  I don't quite get certain facets of what I've been reading so far though.  It looks as though the format is mostly relevant to routing-typed applications like pipelines, hydro networks, fleet navigation routing, etc.  Is this not something best done with an extension like Network Analyst, or is this something that's done with scripting or programming languages.

Why the "stand alone" environment outside of GIS applications.  I can't find anything that's leading to the answers I'm after.  Can anyone give me the "for dummies" version?  Why would there be any reason to do this "outside" of a GIS environment.  From what I've read, it looks as though the final product is delivered in some sort of "textual" framework.


texts: Ext JS 4.2 and OpenLayers without GeoExt

texts: Is it possible to use only Ext JS 4.2 and OpenLayers 2.12 without GeoExt or anything else? (to make a basic map application) I couldn't find any example.


texts: How to render only those Leaflet layers which are in current map view?

texts:
Is it possible to render Leaflet layers which are in current map view so that other layers which are not in that map view doesn't render? I have many polgons (buildings) and it is really slow rendering if they all renders so I thought it would be ok to divide buildings into many shapefiles which will render only in that map view.

Thanks.


texts: Find object through search box with Cesium Js

texts:
I am using Cesium and I would like to do a very simple operation. I would like to find an object which I created by typing its name in the search bar on the top right corner.
Let's consider for example the Points tutorial present in Sandcastle:

function addPoint() {
   Sandcastle.declare(addPoint);

   viewer.entities.add({
       position : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
       name : 'POINT NAME'
       point : {
           pixelSize : 10,
           color : Cesium.Color.YELLOW
       }
   });
}

If I type POINT NAME in the search bar I do not get any result. How can I find the point using the search bar?


texts:
I've got a gpkg file with country borders and I'd like to draw a dashed line for those borders. However, when I set the style as a dashed line in QGIS I get this:

The problem is that the overlapping portions (the vertical section above where the dashed line looks almost solid) show up incorrectly. Is there an easy way to fix this with QGIS/GDAL/something else?


texts:
I've been looking over the PostGIS "API" of functions, and I notice that most of them take two elements to compare. For example, the ST_Distance function takes two geometry/geography elements to find the distance.

There is no function to do something like: "Given a geometry G, give me the closest geometry GClosest in Table T where G.id <> GClosest.id"

I realize I could write a PL/PgSQL function to iterate over the table and call ST_Distance on each element, but I'm hoping there's a better, more efficient, solution.


texts: Utility and Pipeline Data Model 2016 Valves Layer

texts:
In the UPDM2016 data model we have a single Valve layer.

Do I need to store both inline valves for mainlines and curb valves for services in the Valve layer together or is there another layer?

UPDM 2016 Edition


texts: shp2pgsql: how to know the schema.table?

texts:
I want to import a shapefile using shp2pgsql. I am using Mac with Postgis 2.2.

Based on this reference:  A conversion and upload can be done all in one step using a UNIX pipe:

  shp2pgsql -s <SRID> -c -D -I <put to shapefile> <schema.<table> | \
  psql -d <databasename> -h <hostname> -U <username>

An example provided in the postgis manual is:

# shp2pgsql shaperoads myschema.roadstable | psql -d roadsdb

Not sure how to find "schema.table". I am working on a shapefile folder which has:

l_2015_us_county yan$ ls
tl_2015_us_county.cpg           tl_2015_us_county.prj           tl_2015_us_county.shp.ea.iso.xml    tl_2015_us_county.shp.xml
tl_2015_us_county.dbf           tl_2015_us_county.shp           tl_2015_us_county.shp.iso.xml       tl_2015_us_county.shx

What is the schema and table in this shapefile?


texts: How to construct SQL (Spatialite) to search for matches from a list of codes in a field also containing a list?

texts:
I have a (.TAB / polyline) layer on QGIS. There's a field in this ('RCode') which contains unique codes (each very distinct from the others) - BUT note that it can contain more than one code or none at all. These are used for highlighting polylines where there's a code we're interested in.

I have no problems working on a single match at a time (using LIKE), but today I have a list of about 40 codes I'm interested in. I don't want to repeat the exercise 40 times but to match polylines which have any of the codes in the list. So in other words I have a list of matching items looking to match any items in this list with items in a field which itself contains a list of items.

I could write a long and complex SQL statement by hand, including writing in each code by hand. The potential for (non-detectable) error exists. I'd prefer something more graceful so that errors can be detected, or at least so that the exercise is relatively easy to reproduce another time.

I'm intending to do an SQL based query - setting up a virtual layer (so using the Spatialite dialect of SQL I believe) - to allow me to show matching polylines and distinguish them from non-matching polylines. Other solutions may be quite acceptable.

As I can't change the main polyline layer, its design, or its file format this may limit solutions a little. Obviously I can copy the data, but I'd like to use the original file so that future changes are included automatically. The codes to be matched are currently in a spreadsheet, but this is a flexible arrangement.


texts: Change the pop-up order of overlapped points in Portal for ArcGIS / ArcGIS Online

texts:
For maps on ArcGIS Online or ArcGIS Portal, is there any way to decide the pop-up display order of multiple completely overlapped points?

For example, two icons having the same Lat & Long in the same layer shown in the screenshots. It shows the point with UniqueID 684 is in the first pop-up window and the point with Unique ID 685 is in the second pop-up window, but the info in the second pop-up window is more useful for me.

Is there any way to change the point with 685 to the first window (1 of 2) instead of (2 of 2) so that I don't need to tab through to get what I want?

What elements decide the pop-up display order of overlapped points?

The order of the data imported into the attribute table?

The latest modified date of the data in the table?

Or is the pop-up order decided just by random and there is no way to make a adjustment?


texts:
I have this NetCDF file of the Greenland ice sheet velocities but the coordinate system is NSIDC Sea Ice Polar Stereographic North (y: -655750 to -3355750 and x: -639750 to 855750 meters). I wanted to project these data to WGS84 lat/lon degrees but got the following error:

gdalwarp -overwrite -s_srs "+proj=stere +lat_0=90 +lat_ts=70
+lon_0=-45 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" -t_srs EPSG:4326 lgreenland_vel_cci.nc greenland_latlon.nc

Warning: The target file has a 'nc' extension, which is normally used by the GMT, netCDF drivers, but the requested output driver is GTiff. Is it really what you want?
ERROR 1: Input file lgreenland_vel_cci.nc has no raster bands.

For the ones interested, here is some info about the netcdf (it can also be downloaded from the site of the CCI http://products.esa-icesheets-cci.org/products/downloadlist/IV/):

Variables:
    crs
           Size:       1x1
           Dimensions:
           Datatype:   int32
           Attributes:
                       grid_mapping_name                     = 'polar_stereographic'
                       standard_parallel                     = 70
                       straight_vertical_longitude_from_pole = -45
                       false_easting                         = 0
                       false_northing                        = 0
                       unit                                  = 'meter'
                       latitude_of_projection_origin         = 90
                       spatial_ref                           = 'PROJCS["WGS 84 / NSIDC Sea Ice Polar Stereographic North",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",70],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","3413"]]'
    y
           Size:       5401x1
           Dimensions: y
           Datatype:   double
           Attributes:
                       units         = 'm'
                       axis          = 'Y'
                       long_name     = 'y coordinate of projection'
                       standard_name = 'projection_y_coordinate'
    x
           Size:       2992x1
           Dimensions: x
           Datatype:   double
           Attributes:
                       units         = 'm'
                       axis          = 'X'
                       long_name     = 'x coordinate of projection'
                       standard_name = 'projection_x_coordinate'
land_ice_surface_velocity_magnitude
       Size:       2992x5401
       Dimensions: x,y
       Datatype:   single
       Attributes:
                   _FillValue   = 3.402823466385289e+38
                   units        = 'meter day-1'
                   description  = 'magnitude of horizontal ice velocity'
                   grid_mapping = 'crs'
                   coordinates  = 'y x'


texts: Create a line on a midpoint of another polyline at a certain angle

texts:
I have a polyline layer, for each feature I want to create a mid point of the polyline (which is easy enough to do) and then generate a polyline of a certain distance at a right angle of the feature. I have used the code from the following question which has generated a line but not what I was expecting.

What I would like to generate is something along these lines (in purple). The red is what the code generated.

How can I achieve this?


texts:
I need some help please.

OpenGeo 3.0.2 Suite not starting on Windows 8 Pro 64 bit. The opengeosuite log is empty.

I tried to launch opengeo-suite.bat, the command output is:

"Sorry, one argument is required.
Usage: opengeo-suite [start|stop] [debug]
C:\Windows\system32>"


texts:
I am trying to map the maximum water extent in a certain area. Therefore I thought to use the JRC dataset by using the 'max_extent' band. The code however gives me the following error: "max_extent" is not defined in this scope.
The 'max_extent' band is binary instead of for instance the 'occurrence' band.

Is there something wrong in my code?
How to visualize the binary 'max_extent' band?
Is the JRC datset suitable for this task, or should I use another method?

// ------MAXIMUM EXTENT------------------------------------------------------------------------------------------------------------

var gsw = ee.Image('JRC/GSW1_0/GlobalSurfaceWater');
print(gsw);

var occurrence = gsw.select('max_extent');

var VIS_OCCURRENCE = {
  min:0,
  max:100,
};

Map.addLayer({
  eeObject: occurrence.updateMask(max_extent.divide(100)),
  name: "Maximum Water Extent (1984-2015)",
  visParams: VIS_OCCURRENCE
});


texts: Proper Use of QGIS tool: "Frequency analysis"

texts:
Trying to use the "Frequency analysis" tool in a script but getting errors.

The Online documentations for this tool:

processing.runalg('qgis:frequencyanalysis', input, fields, output)

My Script:

path = "/Users/User/Desktop/"
PIDs = QgsMapLayerRegistry.instance().mapLayersByName('Properties')[0]
field = 'PropertyID'
processing.runalg('qgis:frequencyanalysis', PIDs, field, path+'output')

Have also tried:

processing.runalg('qgis:frequencyanalysis', PIDs, field, 'output')

AND...

processing.runalg('qgis:frequencyanalysis', PIDs, field, None)

My goal is to simply add a column to the "PIDs" table that for counts the number of times that each row's PID value is in the table.

e.g.

PID    FREQUENCY
3459   3
2309   2
0014   1
0187   1
NULL   NULL
3459   3
2309   2
3459   3

Any ideas why I'm getting the errors?  I notice that Q's online documentation (above) has the second parameter in plural form, while I only have one field assigned.

Perhaps I am misinterpreting the intention of this tool, and it requires more than one field?  Perhaps my above output example is not what the tool produces?


texts: Does qgis_mapserv.fcgi segfault because ECW data is used?

texts:
I've compiled qgis from source, and when I call qgis_mapserv.fcgi in my browser with REQUEST=GetProjectSettings (and my map file set via map=) is returns the XML correctly.

But if I then try to actually view a map, it seg faults

qgiswebclient.html?map=/var/www/html/testmap.qgs

mod_fcgid: error reading data, FastCGI server closed connection, referer: http://www.ground2control.com/test/site/qgiswebclient.html?map=/var/www/html/GIS/Stonelees.qgs
Premature end of script headers: qgis_mapserv.fcgi, referer: http://www.ground2control.com/test/site/qgiswebclient.html?map=/var/www/html/GIS/Stonelees.qgs
mod_fcgid: process /var/www/cgi-bin/qgis_mapserv.fcgi(27652) exit(communication error), get unexpected signal 11

kernel: qgis_mapserv.fc[27692]: segfault at 0 ip 000000000043dc02 sp 00007fffa9967bf0 error 4 in qgis_mapserv.fcgi[400000+104000]

Actually, it works fine with the helloworld.qgs file supplied with QGIS. The main difference I can see is that my qgs file uses some ECW files. I've made sure that qgis was compiled with ECW support, but I wonder if that's the problem.

Any ideas on how I can discover what is causing the seg fault?

UPDATE:

Running the mapserv CGI through GDB:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff59445a3 in qHash(QString const&) () from /usr/lib64/libQtCore.so.4

(gdb) bt
#0  0x00007ffff59445a3 in qHash(QString const&) () from /usr/lib64/libQtCore.so.4
#1  0x000000000044c2a3 in QHash<QString, QHashDummyValue>::findNode (this=0x87eac0, akey=..., ahp=0x0) at /usr/include/QtCore/qhash.h:875
#2  0x0000000000477b92 in QHash<QString, QHashDummyValue>::contains (this=0x87eac0, akey=...) at /usr/include/QtCore/qhash.h:867
#3  0x0000000000475797 in QSet<QString>::contains (this=0x87eac0, value=...) at /usr/include/QtCore/qset.h:86
#4  0x000000000045cc7e in QgsProjectParser::mapLayerFromStyle (this=0x87e9e0, lName=..., styleName=..., useCache=true) at /root/qgis/qgis-2.0.1/src/mapserver/qgsprojectparser.cpp:1365
#5  0x00000000004ae4a0 in QgsWMSServer::applyOpacities (this=0x82d4d0, layerList=..., vectorRenderers=..., rasterRenderers=..., labelTransparencies=..., labelBufferTransparencies=...)
at /root/qgis/qgis-2.0.1/src/mapserver/qgswmsserver.cpp:2045
#6  0x00000000004a2363 in QgsWMSServer::getMap (this=0x82d4d0) at /root/qgis/qgis-2.0.1/src/mapserver/qgswmsserver.cpp:674
#7  0x000000000043eb60 in main (argc=1, argv=0x7fffffffe5a8) at /root/qgis/qgis-2.0.1/src/mapserver/qgis_map_serv.cpp:533


texts: Adding rows together to populate new field in ArcGIS for Desktop?

texts: How do I add the values in columns 11_acciden, 12_acciden, 13_acciden, and 14_acciden in order to populate the total_acci column?


texts: Using topology to connect nodes <100m apart only

texts:
I have a bunch of line segments, most of which have gaps that are 100m or less.
What I'm trying to do is connect these gaps so I have a series of connected line segments BUT leave nodes that are over 100m distance. Reason for this is each series of lines are to be grouped separately.

Here's an example of one section....

I've been trying to do this through topology editing (must not have dangles) but can't seem to find where I can set a max distance of 100m between nodes before connecting. It keeps wanting to connect what all the nodes. Is this possible or is there some other way?
I'm using ArcMap10 with Advanced license


texts: QGIS make the appearance of selected feature the same as defined in symbology

texts:
I want to select my item one by one in order to capture them separately.
I defined their colour like blue and thickness as 1.
According the thread below:
Displaying only selected features on map in QGIS?
I could smoothly define the rule and show only selected elements on my map.
However, they appear still as per the default selection settings set in the QGIS options...

I can admittedly change them easily by following the thread here:
Is there anyway to modify thickness & color of a selected polygon?
QGIS 2.8 Change Colour of Selected features
but the problem is, that it's going to be applied for all other items/layers concerned in my project, or even the entire QGIS program.
I would like to keep this changed option only for the layer I am working on right now. Is it possible to change the selection options individually for the layer concerned, or shall I go with the general options as discussed in the threads above?


texts:
I have a raw binary raster without a file ending, and no header file. I would like to open this in either QGIS or R and then convert to geotiff, but opening it seems to be a challenge.

Here is a link to an extract or part of the original image.

https://dl.dropboxusercontent.com/u/17287323/test51by51_s1

The image has the following properties:

nrows: 51

ncolumns: 51

datatype: 16 bit integer

Number of bands: 1

pixel size is 231.656 x 231.656 m

For the original image, I have the coordinates for the UL pixel, but not for this extract.


texts: Creating line with specific length using ArcGIS Desktop?

texts:
How can I create a line in ArcGIS 9.3 to a specific length?

I click once to start the line where I want it, and then I want it to be, say 10 Meters in length ... Similar to AutoCAD.


texts: Selecting polygon feature classes with one record in Oracle geodatabase using SQL query?

texts:
I have an Oracle Enterprise geodatabase with many feature classes. I would like a SQL query to find all the polygon feature classes with only one record in its table. So far, I can only query all the feature classes.

  SELECT *
  FROM SDE.GDB_ITEMS items INNER JOIN SDE.GDB_ITEMTYPES itemtypes ON items.Type = itemtypes.UUID
  WHERE itemtypes.Name = 'Feature Class'


texts: Importing and rendering Esri dot-density data in QGIS

texts:
I'm not a professional digital cartographer. I'm a graphic designer who has had to familiarize myself with some processes to fill a real estate broker's needs. I only offer that as an apology for any ignorance you may read in my post. I'm fairly ignorant!

That being said... I'm having some issues rendering population in the form of dot-density in QGIS 3.12.

My process begins with generating the population data in ArcGIS Business Analyst Online. (The client relies on ArcGIS for the
entirety of their demographic and mapping data.)
I share the data out to ArcGIS Online, where I render it as a
shapefile for download.
After download and extraction, I drag the shapefile into my QGIS
project, where it successfully appears in the layers palette.

From here, I'm encountering some issues. I've researched online, and there only appear to be a couple of tutorials for processing the dot-density map that aren't ancient.

I select the appropriate layer (pop_density_greater_houston_2010)
and, under the "Vector/Research tools" menu, select "Random points
within polygons".
Select the appropriate input layer
Points strategy = point count

However, the tool does not give me the option of selecting from which
field to pull it's data.
I've tried changing symbology to "Categorized" and "Graduated", then
classifying based on the density field before running the "Random
points..." tool.

Results I've encountered:

"Invalid geometry" error messages
Endless processing (based on the processing animation at the bottom
of the window)
single points within each census tract

I cannot seem to accomplish a true dot-density.


texts: Removing layer symbology with no object using ArcPy?

texts:
I have a layer named 'Landuse' in TOC. Symbology type is 'Unique value" for the field 'Landuse', for example:

Residential
Commercial
Public
Recreational
Etc.

Is there any way to automatically remove Commercial (for example) since actually there is no 'Commercial' polygon in 'Landuse' layer by existing tool or by Arcpy coding?

Because there are many unique values in the 'Landuse' layer, and I have to do it many times, so that I dont want to do it manually.


texts: i am assessing the vegetated area. Is it in Metres or Sq meters?

texts:
I am calculating NDVI through GEE, and I read some papers on research gate which described 0.2 as threshold value for healthy vegetation.
I write a code to calculate the area of healthy vegetation for my area of Interest which runs perfectly. Does  the area which calculates is in  meters or sq meters?
I share my code here to get help from experts.
var l8 = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA')
             .filterDate('2013-01-01', '2013-12-31')
             .filterBounds(SA)
             .median();

//var visParams = {bands: ['B4', 'B3', 'B2'], max: 0.3};

var extract= l8.clip(SA);

var ndvi= extract.normalizedDifference(['B5','B4']).rename('NDVI');
var visParam = {
 min: -0.2,
 max: 0.8,
 palette: 'FFFFFF, CE7E45, DF923D, F1B555, FCD163, 99B718, 74A901, 66A000, 529400,' +
   '3E8601, 207401, 056201, 004C00, 023B01, 012E01, 011D01, 011301'
};

Map.addLayer(ndvi, visParam, 'NDVI image 2016');

//...........Histogram..l......
var histogram= ui.Chart.image.histogram(ndvi,SA,1000);
print(histogram,"Histogram");

//........threshold.....0.2 ......healthy vegetation......

var mask=ndvi.gt(0.2);
//Map.addLayer(mask, {}, 'mask');
var masked = ndvi.updateMask(mask);
Map.addLayer(masked,
  {min: -0.2,
 max: 0.8,
 palette: 'FFFFFF, CE7E45, DF923D, F1B555, FCD163, 99B718, 74A901, 66A000, 529400,' +
   '3E8601, 207401, 056201, 004C00, 023B01, 012E01, 011D01, 011301'
},'masked16');

var areaImage = masked.multiply(ee.Image.pixelArea())

// Calculate the area
var stats = areaImage.reduceRegion({
  reducer: ee.Reducer.sum(),
  geometry: SA.geometry(),
  scale: 30,
  maxPixels: 1e9
});

print('pixels representing ndvi: ', stats.get('NDVI'), 'meters');

//........export
Export.image.toDrive({
  image: ndvi,
  description: 'Vegetation-2016',
  scale: 1000,
  region: SA,
  maxPixels:11e9,
});


texts: Avoiding edges using GRASS generalization?

texts:
I'm trying to process the national wide land cover data into vector polygons.

In order to be quick I separate the data into several tiles and process them in parallel.

process flow is :
1. v.in.ogr
2. v.generalize douglas method
3. v.generalize chaiken method
4. v.out.ogr shapefile

But the result is the eages of each tile's topology isn't correct as before. it has holes in it. see the picture below

Is there any way to run chaiken generalize in parallel and avoid the edges being modified?


texts:
My ultimate goal is to know UTM and UTM Northing and Easting. The data can be anywhere in North america. I calculated UTM using arcpy tool (arcpy.CalculateUTMZone_cartography) and I tried to truncate the value (e.g.'17N') to Project_management as part of Output coordinate string but so far no luck. Please advise.

Thanks

The code is here:

arcpy.CalculateUTMZone_cartography(outPointSHP, "UTM")

pointUTM= arcpy.SearchCursor(outPointSHP)
for row in pointUTM:
    UTM_var= str(row.getValue('UTM'))[30:32]
del pointUTM

ok = UTM_var
arcpy.AddMessage(ok)

out_coordinate_system = os.path.join(connectionPath+'/', r"projections/NAD1983/NAD 1983 UTM Zone "+ok+"N.prj")

arcpy.Project_management(outPointSHP, projPointSHP, out_coordinate_system)


texts: How to Map Multiple Point to Destination Via Road Network and Represent Proportianally

texts:
So I've been searching a lot and have found bits of information but no way to doing it from start to finish.

I have the following info:
.csv data of all the locations (Name,ID,latitude and longitude) (800 locations)
.csv data for the journeys taken from each location to another location (Millions of journeys)
Integrated Transport Network Map which has all road networks on it.

I would like to map every journey from each different point to another point via the road network. The goal is to represent areas of high usage as many of these points would overlap on the road network. I would then like to represent it proportionally so the map isn't too chaotic and shows areas on the road network with high and low usage represented by thickness of lines/colour.

I have read something about SQL and there is a Network Analyst tool on ArcMap. However all of theses seem to be on a small scale.


texts: Performing spatial join on two rasters using ArcGIS for Desktop?

texts:
I have two rasters, one with nodata cells the other is complete.

I am seeking to combine the two rasters. Where there is a nodata cell I would like to use the cell value nearest to the nodata cell, (just like performing a spatial join to closest point only on a continuous surface).

Have looked at zonal, neighborhood statistics but they are not returning the result. The combine tool does, but does not look to the closest cell where there is nodata.

Have searched on this question but can't quite find the solution I seeking.

Using ArcGIS 10.2 for Desktop


texts: How to calculate the points in polygon without overlap?

texts:
How to rank the circles that contain the highest number of points below.

Problem is that I can't use the points in polygon tool because if a point is contained in multiple circle, then it shouldn't count. QGIS or Postgis.

Maybe the solution would require an iterative approach


texts: ERROR 00539: Error running expression:rcexec()

texts:
I'm trying to run a batch operation on raster calculator. The expression I use is this:

(Float("92011033_B2.tif") - Float("92011033_B5.tif")) / (Float("92011033_B2.tif") + Float("92011033_B5.tif"))

And at the moment of executing it throws me the following error:

ERROR 00539: Error running expression: rcexec ().


texts: ST_INTERSECT of each element of two tables (polygons, lines)

texts:
Im new to postgis and trying to solve the following problem:

I have two tables:
1. containing polygons
2. containing lines

I need to find out the id of all polygons on each line and fill them in new columns. So for each intersection there should be one new column in the table of lines with the id of the intersecting polygon. there wont be not more than three polygons on lines.

This is the code I already have, but it just gives just the first polygon that intersects with the line.

SELECT a.osm_id, b.osm_id
FROM lines a  LEFT JOIN
polygons b  ON ST_Intersects(b.way,a.way);


texts: Converted a USA Contiguous Lambert Conformal Conic vector shape to WGS 84 EPSG 4326 and dimensions changed ~20%

texts:
Needed geometric tools to draw lots of parallel lines representing flight paths for taking overlapping aerial pictures - Lambert Conformal Conic was ideal (I thought).  But saving to my project's Geographic CRS didn't preserve dimension accuracy so the lines are about 20% closer together.

I drew one line 15km long, pasted it and then dragged it vertically (y) to an approximate location, then used the node tool to change the final y position at each end of the new line so it was exactly 400m away from the first line, horizontal position is not that critical so I just eyeballed it.

I was using a fresh install of QGIS 2.14 Desktop on a Windows 7 PC.


texts: WFS from GeoServer on OpenLayers doesn't work

texts:
I'm trying to create participatory map but I can't basically insert a WFS into my OpenLayers frame. I searched for a lot of different solutions. My WFS does work into QGIS, I also can insert WMS into my OpenLayer.

Here's the relevant section of my code:

var vectorSource = new VectorSource({
  format: new GeoJSON(),
  url: function(extent) {
    return (
      "http://localhost:10081/geoserver/data_nl/ows?service=WFS&" +
      "version=1.0.0&request=GetFeature&typeName=data_nl:top10nl_funcgebied_camping_kampeerterrein&" +
      "maxFeatures=50&outputFormat=application/json&srsname=EPSG:4326&" +
      "bbox=" +
      extent.join(",") +
      ",EPSG:4326"
    );
  },
  strategy: new bboxStrategy()
});
var vector = new VectorLayer({
  source: vectorSource
});

https://codesandbox.io/s/getfeatureinfo-image-9gzxg?fontsize=14


texts:
I have multiple polygons aligned next to each other. They are colorfilled with "Graduated" style. I have changed "Stroke style" to "No Pen".
How can I get the hairline between the polygons to disappear, so it is only the color fill one see?


texts: How to set min and max value for stretchType: esriRasterStretch_PercentMinimumMaximum

texts:
How can I set the min and max values for the stretch type "Percent Clip" in arcobjects?

It's possible to set the Stretch type:

rasterStretch.StretchType = esriRasterStretchTypesEnum.esriRasterStretch_PercentMinimumMaximum;

But I have no idea how I can set the min and max values (like in the Properties Dialog of ArcMap).


texts: How to toggle selected features by clicking on them in OpenLayers?

texts:
This is my website for test: http://www.cv.nctu.edu.tw/shapefile-js-openlayers/ol_simple.html

This is my expected result:http://www.cv.nctu.edu.tw/shapefile-js-openlayers/test.html

I want to try this effect in OpenLayers.

If the feature is selected, I click again to unselect the feature. Additionally, clicking out should not unselect the feature.

I tried it whole day. Please help me to solve this problem.


texts: Survey123 not exporting Headers/Labels/Text

texts:
I have been having this issue all day and I have tried every work around I can think of.
I am creating a form for technicians to use in the field to avoid using a field notebook.
For this site, we know each Well that will be gauged and we know some data (Top of Casing, Depth to Bottom, etc. are unique to each well) associated with each well that is used to configure calculations.
So (having not used this software too much) I decided to put each Well into their own group so the field techs have very little to do (was avoiding them having to type in Well ID's on their own and therefore have them pre-determined already). The first time I tried it, I started a group and then made the label for the 'begin group' the "Well ID" (i.e. S-315), but when I published the survey and then exported it to Excel, the S-315 was nowhere to be found on the excel sheet (it was not a Label like the rest of the columns). I tried it again as a 'select_one well_ID' and again the Well ID was nowhere to be found when I exported to excel. I tried it again as a pre-determined note and again the Well ID (i.e. S-315) was nowhere to be found when I exported it to Excel. I really do not understand what is going on because everything else is working great with the form, other than the fact when I export it to Excel I do not know which section is for which well because the Well ID does not carry over.
Attached, I have a screenshot of the published survey data as it appears through AGOL and the bottom window (which is set-up like an excel sheet) does not contain Well ID's anywhere, but when you look on the window to the right after clicking on that submission, it comes up with the bolded Well ID title and label, similar to how I need the excel sheet to export.
I also attached the screenshot

excel sheet to show what it looks like when I export it from AGOL.
Also attached is a screenshot of my excel sheet from the specific Survey123 Form I am having issues with, so you can see all of the 'survey', 'choices' you may want to see.


texts: Clipping polygon layer to another polygon layer based on matching attributes using QGIS?

texts:
Working in QGIS, I have two polygon layers:

Building Footprint Polygon Layer
Parcel Polygon Layer

These two layers have a matching field in the attributes known as "Parcel Number". I would like to clip the building footprint features to be within the parcel polygon features based on matching parcel numbers. So if I have a building footprint feature that overlaps two parcel polygons, I would like to clip the building footprint to be within the parcel polygon that has the same parcel number as the building footprint.


texts: Georeferencing/Spatial Adjusting of vector river dataset to DEM in ArcGIS

texts:
I have a huge dataset of vector river data (over 10'000 rivers) which are saved in a shapefile and were initially derived from a topographic map.
However when comparing this vector to DEM data (SRTM 30 m data) there seems to be a irregular shift in data.
River and DEM data are in the same coordinate system and projection and I don't exactly know why these shifts occur in the data.

What I did in ArcGIS 10.2 to compare the data: I created a hillshade and also I've created a flow accumulation raster to visualise the location of the rivers (see map below with DEM in background)

I've tried to adjust the rivers to the DEM manually using the Spatial Adjustment Toolbar (setting displacement links at nodes), however this task is quite time consuming and not very accurate.

Can anyone think of an easier more exact way (maybe automated way?) to do this kind of task, considering the huge amount of river data (over 10000 rivers!)?


texts: Layer disappears from map after CRS changed in QGIS?

texts:
I have 3 layers and a basemap. 2 layers align nicely with the google basemap and accept it´s CRS which I have set as a project CRS and also enabled on the fly reprojection. I have also selected it as a default CRS and ticked the ´use project CRS´ in SETTINGS - OPTIONS - CRS. These are all options I have found reading people´s comments.

However when I add the third layer it does not appear on the map. It will only appear if I change the CRS back to it´s original one which is different to the one the other layers are in. I have also tried saving this layer with the desired CRS and re-opening it but still won´t appear.

The CRS I want to use for the project is ESPG 3857 or ESPG 4326 but the layer only accepts Krovlak.

Any tips on how else I could proceed?


texts:
I have a road centerline that I have used to create buffers that represent road area. Now I need to fix the intersections. As you can see on the picture, if the road end is touching the non-end of the other road, I need to trim it's road area. If road end is touching another road end, I should trim the smaller one (shorter one).

Any way to do this, preferably in QGIS?

EDIT:

Road areas that belong to the different centerlines must not be
merged.
All roads in this case have the same classification.


texts: Openlayers 2: [In Touch] Pinch zoom action triggers click event at the end. How to prevent click on pinch zoom

texts: Openlayers 2: [In Touch] Pinch zoom action triggers click event at the end. How to prevent click event registered on map getting triggered when pinch is done


texts:
I have two spatial tables and I am mirroring the data between the two table with a postgres rule:

    CREATE OR REPLACE RULE create_centroid AS ON INSERT TO csg.client_area_request DO INSERT INTO csg.stats (date_needed, date_requested, notice_period, project_name, project_reference, the_geom_webmercator) VALUES (new.date_needed, new.date_requested, new.notice_period, new.project_name, new.project_reference, st_centroid(new.the_geom_webmercator));

Is there any way to do the same process with trigger?


texts: Batch processing of geodatabases - join raster with table

texts:
I am unsure how to go about doing this using Python in ArcMap, though I know how to do it by hand.  I have geodatabases containing gSSURGO data, one for each state, in their own folders.  I have a table that has national datasets of weighted average attributes (found here: https://geonet.esri.com/docs/DOC-2336?sr=stream&ru=9646) that can be joined to the raster layer in the GDB containing the state's gSSURGO data.

Is there a way to batch process this, so that I can create new rasters from joining the raster layer in each states GDB to the national level weighted average data?

It seems it would entail (here follows poor pseudocode):

    Open up the national level table
    For each folder in the Main Folder (containing the states folders)
        Open up each GDB
        Open up the raster file
        Join the raster file to the national level file based on the one common field
        Create a new raster based on the join
    Merge all rasters into a national raster

I need to end up with a national level raster having merged all these individually joined state raster layers.


texts: QGIS 3 Unmet dependencies on Ubuntu 16.04?

texts:
My QGIS 3 (2.99, Ubuntu 16.04) stopped upgrading today. When doing sudo apt-get upgrade, I get an error about Unmet dependencies.

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 qgis-plugin-grass : Depends: qgis-provider-grass (= 1:2.99.0+git20171211+61db97f+24xenial-ubuntugis) but 1:2.99.0+git20171209+fb28adf+24xenial-ubuntugis is installed
E: Unmet dependencies. Try using -f.

Doing

$ sudo apt-get -f install

as suggested, I get the following error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  libqt5script5
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  qgis-provider-grass
The following packages will be upgraded:
  qgis-provider-grass
1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
22 not fully installed or removed.
Need to get 0 B/2,068 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]

(Reading database ... 286420 files and directories currently installed.)
Preparing to unpack .../qgis-provider-grass_1%3a2.99.0+git20171211+61db97f+24xenial-ubuntugis_amd64.deb ...
Unpacking qgis-provider-grass (1:2.99.0+git20171211+61db97f+24xenial-ubuntugis) over (1:2.99.0+git20171209+fb28adf+24xenial-ubuntugis) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/qgis-provider-grass_1%3a2.99.0+git20171211+61db97f+24xenial-ubuntugis_amd64.deb (--unpack):
 cannot copy extracted data for './usr/lib/qgis/plugins/libgrassprovider7.so' to '/usr/lib/qgis/plugins/libgrassprovider7.so.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
 /var/cache/apt/archives/qgis-provider-grass_1%3a2.99.0+git20171211+61db97f+24xenial-ubuntugis_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I use the following repositories in my /etc/apt/sources.list:

deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial main
deb http://qgis.org/ubuntugis-nightly xenial main

So far, apt-get is broken and keeps asking me to do apt-get -f install no matter what (autoremove, autoclean, clean etc.).

Does anyone have similar experience or know of a fix?


texts: Comparing Object Fields to a couple million rows with a SearchCursor from arcpy

texts:
I'm new to GIS.

I'm using arcpy.da.SearchCursor to read from a SQL server, and when I read through the first table I create objects ~350,000 of them.

cursor = arcpy.da.SearchCursor(SktSegmentTable, SktSegmentData, "status = 'A'and lrsn = '754'")
for row in cursor:
    count  += 1
    if(count % 100000 == 0):
        print("Processed %d rows" %count)

    sketchList.append(UnionSketchData(
        row[SktSegmentData.index("lrsn")],
        row[SktSegmentData.index("extension")],
        row[SktSegmentData.index("status")],
        row[SktSegmentData.index("segment_id")],
        row[SktSegmentData.index("vector_start")] )
        )
del cursor

This is working fine and the real problem comes in when I have to read from another table that has around 2.5 million rows.

cursor = arcpy.da.SearchCursor(SktVectorTable, SktVectorData, "status = 'A'") #and lrsn = '97429'")
print("Going into VECTOR TABLE")
countRow = 0
count = 0
for row in cursor:
    count  += 1
    if(count % 10000 == 0):
        print("Processed %d rows" %count)
    if(count % 100000 == 0):
        print("Processed %d rows" %count)
    seqCount = 0
# Do a check for every sketchList obj
    for item in sketchList:
    # Check if lrsn is equal to row's lrsn
        if(row[SktVectorData.index("lrsn")] == item.lrsn):
            # If we have a match on lrsn, then check if the items segment_id is the same
            if(row[SktVectorData.index("segment_id")] == item.segment_id ):
                if(row[SktVectorData.index("extension")] == item.extension ):
                #if The segment_id is the same for the item, append the vector string into seq_numbers
                sketchList[seqCount].seq_numbers.append(row[SktVectorData.index("vector")])
        seqCount += 1
del cursor

This runs incredibly slow and will take around 120 hours on my machine.

Can anyone help me figure out how to make this run quickly?

I've been trying to put the 2.5 million entries into a dict but haven't been able to successfully get that to work.


texts:
I have a Civil 3d CAD file with an attached object data table. The dwg contains only closed polylines and I have a single ODT defined with 30 fields which include text, integer and double data types. Everything is attached & visible in Civil 3d and data has been entered into the ODT. When I use the 'Autodesk AutoCAD Map 3D Object Data' reader, I get loads of ERROR -BADNEWS feedback that shows that the reader seemingly misreads half my fields mistaking values for column definitions and end up with a mess....
I don't understand why this is happening or what I can do about it. I created a dummy file with one closed polyline and attached the ODT but still run into the same problems. I have tried using 2015.1 32-bit and 2015.0 64-bit but have the same issues.


texts: Using result raster of Semi-automatic classification to obtain spatial statistics?

texts:
I finished classification (use SACP in QGIS), and got a classificated raster.
Now I want to obtain characteristics such as sum area of class, areas of different  polygons separately, etc.

I tried use shp. file, which created in SACP (i tried calculate areas by export/add the geometry field); I tried to use r.stats GRASS command but i have not gotten  characteristics of area linked with Class.

Maybe somebody can give good suggestion or ready recipe about this?


texts: Installing latest QGIS version on Ubuntu?

texts:
I am relatively new to Linux, so can you indicate the exact commands (step-by-step) that I need to type to get the latest QGIS installed on Ubuntu 14.04.

I have tried to follow the instructions provided here https://www.qgis.org/en/site/forusers/alldownloads.html but I haven't managed to install anything.

Can someone explain to me step by step process of doing it. Right from adding the QGIS repository on the sources list.

I have Ubuntu 14.04.1 LTS installed on a 32-bit Dell Latitude E4310 Machine


texts:
I would like to view videos and my position on the videos' gpx tracks simultaneously and I would like to do it in QGIS. I know that there is a plugin for this but it was made for an earlier version of QGIS and doesn't work for me. By the way, exactly that is what I am looking for. Right now I'm using 2.14.
Are there solutions for this case?

(I used Garmin's VIRB camera)


texts: Adding background map to GeoNetwork from GeoServer?

texts: I use GeoNetwork 3.0.2 ... Is it possible to remove the default background map and is there a way to add a background map from GeoServer, using WMS?


texts: Adding combined footage to points from the beginning of a line

texts:
I'm trying to add the footage of each point from the beginning of the line to the end.  There are around 4k vertexes between the two ends that I need to put the footage from the beginning of the line and adds footage as it goes down the line.

An example would be three points total with 50 ft between them.  The first point would be 0, the second point 50 and the third point 100 (that's just an example).  Is there a way to do this?

I was going to break the line into segments based of vertexes to get the individual length of each segment. How would I have it add going down the line and add that combined footage to each point?  I have arc 10.1, but am open to any solution/ideas.