texts:
I am stuck with a code due to a RunTimeError: Object: Error in Executing tool
and I really can't find the mistake.
The code is

# Now, the script for "Adding Surface Info" to the network, using the raster with MAX MEAN defined just above
# Set the raster of input, on the basis of the MAX MEAN
inSurface = "C:/B3061239/!!! WORK !!!/RAS_for_maxmean/", NameRasList[MEANlist.index(max(MEANlist))]
# NOTE that NameRasList[MEANlist.index(max(MEANlist)) has been calculate before
method = "BILINEAR"
if inSurface:
    print "Got inSurface"
# Create list of feature classes
fcList = arcpy.ListFeatureClasses()
print str(len(fcList))
# Process: Add Surface Information
if fcList:
    print "Got featureclasses"
    for fc in fcList:
        desc = arcpy.Describe(fc)
        print desc.name
        # Determine if the feature is 2D
        #if not desc.hasZ:
            #if desc.shapeType == "Polygon":
                # Desired properties separated by semi-colons
                #Prop = "Z_MIN;Z_MAX"
            #elif desc.shapeType == "Point":
                #Prop = "Z"
            #elif desc.shapeType == "Multipoint":
                #Prop = "Z_MIN;Z_MAX;Z_MEAN"
            #elif desc.shapeType == "Polyline":
                #Prop = "LENGTH_3D"
            # Execute AddSurfaceInformation
    arcpy.ddd.AddSurfaceInformation(fc, inSurface, "Z_MAX", method, "", "1", "0", "NO_FILTER")
print "Completed adding surface information."


texts: JS/browser API library to show/interact with many markers with the best performance?

texts:
What's the best Javascript library that can show about 50000 (and more) clickable markers without resorting to things like clustering markers,etc? The markers are clickable and I want to associate them with some action.

The main issue is coping with browser performance, so I'm already only considering performance in Chrome and Firefox. Yes, I also understand browser performance is dependent on the PC performance but still, there are better and worse libraries.

I have experience with GMaps v3 but with so many markers it is very slow. Changing to GEarth plugin on the browser solves the problem. Currently I'm using OpenLayers serving from my GeoServer WMS.

I guess I need a JS lib like Openlayers tailored for very high performance, for example using WebGL to make use of the PC's GPU. I know openlayers v3 would have webgl but I really want to hear the feedback from experienced users for these kind of big data on a map.

Also it should be opensource and free to use and be able to connect to my WMS to serve the tiles, like openlayers does.

I also don't mind if it's not JS API but some plugin I have to install on my PC / browser, like GEarth, if that improves the performance radically.


texts:
I wrote a code to retrieve LST values from a certain point. I am getting results but have NULL value as well, maybe due to cloudiness and ...
I want to fill those gaps.
Does someone have a running code for that?


texts: Example of how to POST a WMS GetCapabilities Request?

texts:
My WMS GetCapabilities response indicates it supports POST, but I cannot find how to form a valid POST request:

  <GetCapabilities>
    <Format>text/xml</Format>
    <DCPType>
      <HTTP>
        <Get>
          <OnlineResource xlink:type="simple" xlink:href="http://usalvwdgis1:8080/geoserver/ows?SERVICE=WMS&amp;"/>
        </Get>
        <Post>
          <OnlineResource xlink:type="simple" xlink:href="http://usalvwdgis1:8080/geoserver/ows?SERVICE=WMS&amp;"/>
        </Post>
      </HTTP>
    </DCPType>
  </GetCapabilities>

I've tried this:

<?xml version="1.0" encoding="utf-8"?>
<GetCapabilities service="WMS" version="1.3.0" xmlns="http://www.opengis.net/wms"></GetCapabilities>

But receive this error:

  Could not parse the XML for: org.geoserver.wms.GetCapabilitiesRequest

I've skimmed 06-042_OpenGIS_Web_Map_Service_WMS_Implementation_Specification.pdf for clues of how to convert the GET request into a POST request, but I could not come up with a working version.

I've also looked at https://github.com/geoserver/geoserver/blob/2.12.x/src/wms/src/main/java/org/geoserver/wms/GetCapabilitiesRequest.java and


texts: Since PyWPS is not yet packaged for Ubuntu an installation guide would be handy. This guide should target a vanilla Ubuntu LTS install, detailing the required dependencies.


texts: USA CRS with Alaska and Hawaii in Bottom Left

texts: Does anyone have any idea how to perform this type of projection in QGIS? I know the lower 48 looks to be Albers CONUS but what is the best method to project Alaska and Hawaii in the same way in the bottom left like this?


texts: What is the difference between QGIS file types?

texts: When I open the .qgz-file there are the others opened with it at the same time? or what is the use of other types?


texts: Help with Anita Graser's guide on making tapered rivers. River shapefile has "width" field but expression is not working

texts:
https://anitagraser.com/2017/04/17/better-river-styles-with-tapered-lines/

This is her expression

CASE
WHEN "GEW_GRKL" = '< 10 km2 Fluss' THEN 0.2
WHEN "GEW_GRKL" = '10 km2 Fluss' THEN 0.4
WHEN "GEW_GRKL" = '100 km2 Fluss' THEN 0.6
WHEN "GEW_GRKL" = '1.000 km2 Fluss' THEN 0.8
ELSE 1.0
END
* ( 1- ( @geometry_part_num /  @geometry_part_count ))

I copied it and replaced the field but it didn't work so I modified the expression a bit. The width of the river shapefille includes 0-8, 10, 12, 15, 20, 30, 35, 40, 50, 60, 70, 100, 200, 500.

Test expression which isn't working even with the km2 and Fluss

CASE
WHEN "width" = '500' THEN 2.0
ELSE 1.0
END
* ( 1- ( @geometry_part_num /  @geometry_part_count ))

This is the attributes of the river shapefile

How do I make my expression work?


texts: Scale bar for standalone PyQGIS layout clumped together

texts:
I'm trying to implement a scalebar for my layout in a standalone application.
This is my current code:
def createLayout(Main):
    layers = Main.canvas.layers()
    project = QgsProject.instance()
    manager = project.layoutManager()
    layoutName = 'Layout1'
    print(project.mapLayers())
    layouts_list = manager.printLayouts()
    for layout in layouts_list:
        if layout.name() == layoutName:
            manager.removeLayout(layout)
    layout = QgsPrintLayout(project)
    layout.initializeDefaults()
    layout.setName(layoutName)
    manager.addLayout(layout)

    map = QgsLayoutItemMap(layout)
    map.setRect(20, 20, 20, 20)
    map.setLayers(layers)

    ms = QgsMapSettings()
    ms.setLayers(layers)
    rect = QgsRectangle(ms.fullExtent())
    rect.scale(1.0)
    ms.setExtent(rect)
    map.setExtent(rect)
    map.setBackgroundColor(QColor(255, 255, 255, 0))
    layout.addLayoutItem(map)

    map.attemptMove(QgsLayoutPoint(0, 0, QgsUnitTypes.LayoutMillimeters))
    map.attemptResize(QgsLayoutSize(297, 210, QgsUnitTypes.LayoutMillimeters))

    # Scalebar
    scalebar = QgsLayoutItemScaleBar(layout)
    scalebar.setStyle('Line Ticks Up')
    scalebar.setUnits(QgsUnitTypes.DistanceKilometers)
    scalebar.setNumberOfSegments(2)
    scalebar.setNumberOfSegmentsLeft(0)
    scalebar.setUnitsPerSegment(0.5)
    scalebar.setLinkedMap(map)
    print(scalebar.linkedMap().layers())
    scalebar.setUnitLabel('km')
    scalebar.update()
    layout.addLayoutItem(scalebar)
    scalebar.attemptMove(QgsLayoutPoint(220, 190, QgsUnitTypes.LayoutMillimeters))

    # This exports a Print Layout as an image
    layout = manager.layoutByName(layoutName)

    # This creates a QgsLayoutExporter object
    exporter = QgsLayoutExporter(layout)

    # This exports a pdf of the layout object
    exporter.exportToPdf('C:\\Users\\seteg\\Desktop\\test\\testPDF.pdf', QgsLayoutExporter.PdfExportSettings())

    print("Save Complete")

It is supposed to create a layout and print it onto a PDF file.
but now the scale bar looks something like this:

and is all clumped together.
I have edited the code on QGIS Desktop and it works normally, just not on the standalone application, not sure what the issue is
Code on Desktop QGIS:
layersDict = QgsProject.instance().mapLayers()
layers = []
for key, value in layersDict.items():
    layers.append(value)
print(layers)

project = QgsProject.instance()
manager = project.layoutManager()
layoutName = 'Layout1'
layouts_list = manager.printLayouts()
for layout in layouts_list:
    if layout.name() == layoutName:
        manager.removeLayout(layout)
layout = QgsPrintLayout(project)
layout.initializeDefaults()
layout.setName(layoutName)
manager.addLayout(layout)

map = QgsLayoutItemMap(layout)
map.setRect(20, 20, 20, 20)

ms = QgsMapSettings()
print(project.mapLayers())
print(layers)
ms.setLayers(layers)
rect = QgsRectangle(ms.fullExtent())
rect.scale(1.0)
ms.setExtent(rect)
map.setExtent(rect)
map.setBackgroundColor(QColor(255, 255, 255, 0))
layout.addLayoutItem(map)

map.attemptMove(QgsLayoutPoint(5, 20, QgsUnitTypes.LayoutMillimeters))
map.attemptResize(QgsLayoutSize(180, 180, QgsUnitTypes.LayoutMillimeters))

# Scalebar
scalebar = QgsLayoutItemScaleBar(layout)
scalebar.setStyle('Line Ticks Up')
scalebar.setUnits(QgsUnitTypes.DistanceKilometers)
scalebar.setNumberOfSegments(2)
scalebar.setNumberOfSegmentsLeft(0)
scalebar.setUnitsPerSegment(0.5)
scalebar.setLinkedMap(map)
print(scalebar.linkedMap().layers())
scalebar.setUnitLabel('km')
scalebar.update()
layout.addLayoutItem(scalebar)
scalebar.attemptMove(QgsLayoutPoint(220, 190, QgsUnitTypes.LayoutMillimeters))

# This exports a Print Layout as an image
layout = manager.layoutByName(layoutName)

# This creates a QgsLayoutExporter object
exporter = QgsLayoutExporter(layout)

# This exports a pdf of the layout object
exporter.exportToPdf('C:\\Users\\seteg\\Desktop\\test\\testPDF.pdf', QgsLayoutExporter.PdfExportSettings())


texts: QGIS, deleting last placed vertice while digitizing, can I custom keyboard shortcut this task?

texts:
Upon searching this topic, I found the answer of using the delete or backspace key to delete the last placed vertex while editing.

My question, Is it possible to reprogram this delete function to a different keyboard shortcut within qgis?

I would want an alternative, say ctrl+Z or a programmable mouse button for example, something more easily utilized.


texts: Can one expose variables to the Python console from a plugin in QGIS?

texts:
I have a QGIS plugin that performs a long-running operation, eventually producing and loading new shapefiles into QGIS. (I have this as a plugin rather than just a function that can be called from the console because the console doesn't work very well for long-running operations.)

Internally, the plugin creates a complex Python data structure. I would like a user to be able to access this data structure from the QGIS Python console.

I know that this could be done by serializing the data structure to a file and then loading it from a file (slightly more difficult in this case because the data structure cannot be pickled) but I am wondering if there is some sort of global variable inside QGIS to which I can assign my data structure from the plugin so that it can be directly used from the Python console.


texts: New route events based on existing route events' locations/values

texts:
The goal is continuous values along a line based on known values of certain segments along the line. I was pointed towards linear referencing an an approach, so am currently trying to derive the values of the empty route events from their two neighboring route events (probably a distance weighted average).

Problem:

I need to assign values to the empty route events based on neighboring route events' values. Are there any tools or extensions compatible with a basic license that would do this?

The most similar question I have come across is https://geonet.esri.com/thread/98223, but that was points, not lines (so not continuous like I want), and it used Calculate Geometry to calculate the X value, which I don't have and am not interested in, so I can't use calculate geometry like they did.

I read about linear interpolation methods, but they are much(!) more statistically complex than I have the skills or time to even consider.

Is there a better/non-linear referencing/non-gis option for accomplishing this?


texts: Select linestrings containing points with duplicating M coordinates in postgis

texts:
I have a table of LineStringM geometries. Some of lines have points with same measure (M coordinate). This is a bug in initial data, that I want to clean somehow.
So I need to:
1. Select all records, containing linestrings with vertexes having duplicating M values.
2. Correct theese values automatically, using M values from their neighbor vertexes.
How can this be done?


texts:
5-15 seconds after loading a big project, QGIS crashes. QGIS draws the project data to the screen and seems ready with that, after this  get a "qgis-bin.exe has stopped working".

Is there any good way to start digging into the problem?

I have:

Uninstalled and re-installed QGIS, including removing the .qgis folder and all regedit entries for QGIS.
Manually tried to go through the project .qgs file to look for bigger noticable inconsistenies.
Tried both with the current 2.18.3 version and with older versions of QGIS (2.16.3, 2.14.11)

The problem started right after I had messed around with the print composer atlas generator to try to get a print layout to work, and after I installed the plugin Grids for Atlas - but removing the .qgis folder and uninstalling qgis should remove all traces of this? The projects consists of around 15 shapefiles 1Mb-30Mb. Any other projects work well except for this.

I find no way to enable a log file or find a crash dump when googling. There was a few weeks work with layouting for this project.

Environment: QGIS 2.18.3/2.16.3/2.14.11, Windows 10, i7 processor, 16Gb memory, 550Gb free SSD HD.


texts: Create greyscale geoTIFF and batch export in QGIS

texts:
I have 35 large sized .ecw images that I need to change to greyscale and then export as .tiff for someone else to use in AutoCAD.

In QGIS I can display the images in greyscale and then Save As and choose the 'rendered' option.

Is there a way that I can do this as a batch? My images are 500-700Mb each and can take an hour each to save. I'd like a way to do this as a batch process.

Any suggestions?


texts: Arcpy ArcMap mosaic use different raster whenever nodata value

texts:
I am using ArcPy in ArcMap and have multiple Rasters (Landsat imagery) taken from a given area (Image 1).

My final goal is to create a cloud free image of the complete area. Since the Rasters contain clouds, I first used the BQA given for the data and classified clouds, background, etc for each Raster as nodata. I am doing this to later replace these nodata entries with the entries of other Rasters taken of the same area. When I merge my Rasters with (composites is a list of Rasters)

arcpy.MosaicToNewRaster_management(composites, os.getcwd(), mosaic_name, number_of_bands = number_bands, mosaic_method = 'MAXIMUM')

I obtain a merged image that uses the pixel values of the underlying Raster if its classified as nodata in the above Raster (Image 2).

This is exactly the behavior I want to achieve. However, the disadvantage of this approach is that the code is not doing any color balancing, which I require. When I create a mosaic separately and do color balancing

mosaic = arcpy.CreateMosaicDataset_management("C:/Users/georg/OneDrive/Dokumente/ArcGIS/Default.gdb",  mosaic_name, arcpy.Describe(composites[0]).spatialReference,  num_bands = number_bands)
arcpy.SetRasterProperties_management(mosaic,nodata="1 0;2 0;3 0;4 0;5 0;6 0;7 0")
arcpy.DefineMosaicDatasetNoData_management(mosaic, number_bands, "ALL_BANDS '0'")
arcpy.SetMosaicDatasetProperties_management(mosaic, mosaic_operator='MAX')
arcpy.AddRastersToMosaicDataset_management(mosaic, "Raster Dataset", composites)
arcpy.BuildFootprints_management(mosaic)
arcpy.BuildSeamlines_management(mosaic)
arcpy.BuildPyramidsandStatistics_management(mosaic)
arcpy.ColorBalanceMosaicDataset_management(mosaic, "DODGING", "COLOR_GRID")
arcpy.MosaicToNewRaster_management(mosaic, os.getcwd(), mosaic_name+".tif", number_of_bands = number_bands, mosaic_method = 'MAXIMUM')

the final image classifies a pixel as nodata if the top Raster is nodata at this Pixel (Image 3), whereas it should be using a Pixel from the underlying Raster in such a case. How do I fix this problem? I tried many different settings, but none did work.


texts:
I'm looking at NDVI changes for an area over 20 years.  There seems to be a slight downward trend, however, upon switching from Landsat 5 in 2011 to Landsat 8 in 2013 I'm getting NDVI values that are suddenly a few values higher (0.03 - 0.06).

I was wondering if this has to do with the switch to Landsat 8? (higher spatial resolution, hence more accurate NDVI?)


texts: Join close parallel lines to one line in CAD to GIS workflow

texts:
I have a DWG that contains a very detailed drawing of an area. Especially every wall in that area is depicted as 3 close parallel lines.

For further processing in my GIS tools, i would like to combine these close parallel lines into one.

I thought about using FME tools, but the options are overwhelming.

What options do i have to achieve that workflow ?


texts: How to find if ArcMap raised error during edit session?

texts:
I have a class extended IExtension and inside this class I catch OnCreate, OnDelete and OnChanged and OnStopEditing events of Editor object of ArcMap. However I need to know if ArcMap has raised any error while user interaction during edit session when control falls into OnStopEditing event.But I could not find any property or method in Editor object that shows me it.

Is there any way to find if ArcMap has thrown an error while user drawing/modifying/deleting a sketch in programming?

Here is a sample how I structure my extension:

//Startup method of IExtension interface
public void Startup(ref object initializationData)
{
  //find Editor object somehow
  this.m_Editor.OnChangeFeature += new IEditEvents_OnChangeFeatureEventHandler(m_Editor_OnChangeFeature);
            this.m_Editor.OnCreateFeature += new IEditEvents_OnCreateFeatureEventHandler(m_Editor_OnCreateFeature);
            this.m_Editor.OnDeleteFeature += new IEditEvents_OnDeleteFeatureEventHandler(m_Editor_OnDeleteFeature);
            this.m_Editor.OnStartEditing += new IEditEvents_OnStartEditingEventHandler(m_Editor_OnStartEditing);
            this.m_Editor.OnStopEditing += new IEditEvents_OnStopEditingEventHandler(m_Editor_OnStopEditing);

}

void m_Editor_OnDeleteFeature(ESRI.ArcGIS.Geodatabase.IObject obj)
{
//Some verification
}

void m_Editor_OnChangeFeature(ESRI.ArcGIS.Geodatabase.IObject obj)
{
//Some verification
}

void m_Editor_OnCreateFeature(ESRI.ArcGIS.Geodatabase.IObject obj)
{
//Some verification
}

void m_Editor_OnStopEditing(bool save)
{
//Here I need if ArcMap has raised an error and showed it to user
}


texts: QGIS removed after updating to 2.18.5 on ubuntu

texts:
After updating to QGIS 2.18.5 using ubuntugis ppa my QGIS 2.18.4 installation was removed and I get an error about unmet dependencies when I try to install QGIS at the terminal:

The following packages have unmet dependencies:
python-qgis : Depends: python-future but it is not installable
E: Unable to correct problems, you have held broken packages.

I have seen similar posts like this and this on SE, but they were not able to resolve my issue. I have python-future installed in python 2.7, but I still cannot install QGIS. How might I resolve this problem? I have also tried installing the LTR, but this results in an even longer list of unmet dependencies. My OS is Linux Mint 17.3 (Ubuntu 14.04).


texts: How to tell QGIS where to start marker line interval?

texts:
I  want to tell QGIS where to start with a marker, like: use 3 markers, start at positions 0, 2, 4, and apply an interval of 12 to each marker.
However, after searching for hours, I haven't found a way to deal with this issue.

EDIT:
Regardings Nathan's answer:
This happens if x-offset for markers is used:


texts: CartoDB: custom sorting infowindow entries

texts:
I am trying to create a visualization at runtime like explained in the Cartodb documentation:
Then I add infowindows for each entry with this command:

cdb.vis.Vis.addInfowindow(map, layer.getSubLayer(0),
 ['center_name','phone','age_range']);

But the entries are displayed in alphabetical order, not the order I want it to be. Is there any way to force it to keep my order?


texts: Highest resolution Digital Elevation Model for the UK?

texts:
I need the most precise and highest resolution free digital elevation model for the UK.
Would OS terrain 50 or ASTER GDEM be more suitable for view shed analysis?


texts:
I have a .csv that I have displayed as XY data on the map, using Arc Pro's XY Table to Point tool. There are 40 points.
I have 40 .pngs of graphs that correspond to each point. I'd like to be able to select a point and display a thumbnail of the graph in the pop-up window. Is this possible?
I have looked at:
https://pro.arcgis.com/en/pro-app/help/metadata/create-a-thumbnail.htm#ESRI_SECTION1_E4B2309C5D204D97BC104463730F1F8A
and have tried going to View tab -> importing thumbnail, but that has not lead to any success.


texts:
I created a new map, connected to my ArcGIS service, and dragged a map from a map service into the Table of Contents. The map is drawn on the screen with all my data points and I can see the attributes of each point when using the Identify tool. How do I export all the points with their attributes to a shapefile?

I tried right-clicking in the ToC, on the points, on the layers... everywhere I could think of for a possible right-click option. I also looked in the ArcToolbox, Conversion Tools but none of the tools seemed like a fit. The source is not a CAD file, Feature Class, Raster, or Table. The closest I found is Feature Class to Shapefile (multiple) but my source is not a Feature Class and all my attempts to use this option with layers files have failed.

ArcMap 10.1


texts: Add individual fields to delete-log-trigger when deleting PostGis-Objects via QGis

texts:
I am using a PostGres Database with PostGis extension (on Windows). QGis serves as a client to access (visualize and edit) certain database-tables.

I need to create a delete-log-table that saves all the information about objects I delete from a certain database-table (via QGis). So far this is easy to realize since I can use Trigger-functions in order to fill this log-table. But how can I add individual (user defined) information about every single deletion?

Is it possible to let QGis and Postgres interact in the way that some kind of "form" pops up in QGis each time I delete an object and asks the user to enter certain values (e.g. "reason_for_deletion") and then also saves these columns/values into the delete-log?

So far I haven't produced any code. I just need to know if this is possible and some basic ideas of how to realize it.
Later I can provide code!


texts: ArcGIS API maximum distance in feature layer

texts: I use ArcGIS API of JavaScript to show a feature on the map. I use FeatureLayer and set definition Expression but I want to show results with maximum distance, for example show to use only the feature with distance between feature and one specified point is value.


texts: TypeError during compilation of extensions in GRASS GIS using g.extension

texts:
I am using GRASS 7.4.0 on Ubuntu 18.04. I installed grass-dev using sudo apt-get install grass-dev, and then used g.extension v.centerpoint to try to install v.centerpoint. The output is below:

$g.extension v.centerpoint
WARNING: GRASS_ADDON_BASE is not defined, installing to ~/.grass7/addons
Fetching <v.centerpoint> from GRASS GIS Addons repository (be patient)...
Compiling...
Traceback (most recent call last):
  File "/usr/lib/grass74/tools/mkhtml.py", line 229, in <module>
    name = re.search('(<!-- meta page name:)(.*)(-->)', src_data, re.IGNORECASE)
  File "/home/charlie/anaconda3/lib/python3.7/re.py", line 183, in search
    return _compile(pattern, flags).search(string)
TypeError: cannot use a string pattern on a bytes-like object
make: *** [/tmp/tmpTcbCB_/v.centerpoint/docs/html/v.centerpoint.html] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.

I find the same TypeError when trying to install other extensions (e.g., v.profile). Is there a way to get around this TypeError to allow extensions to be installed?


texts: Is there a way to split polygons by several lines in QGIS?

texts:
I have a polygon (.shp) and a line (.shp) layer. I want to split the polygon in several pieces along the lines that overlap the polygon. Afterwards I want to edit each polygon separately (attribute table).

I tried a workaround: Buffering the lines with a small distance and then it worked with the geoprocessing tools (difference - "Unterschied"). Afterwards "multipart to singlepart". It worked but I rather like to do it with lines.

Is there an extension for QGIS or another way to do the task? Similar to the ESRI ArcINFO tool "Split Polygons With Lines"? But all I have is QGIS 2.6.


texts:
There are quite a few questions regarding the subject but the fact that these have so many views makes me think it's a much more complex subject that requires more attention.

I've been through the answers, such as in here, here  or here , however none of them really do the trick for me.

So I've based my code on this tutorial https://medium.com/@goldrydigital/wfs-t-with-openlayers-3-16-6fb6a820ac58 that has a working example and a github page. However when I've tried adapting my WFS to it, I ran into quite a few problems. For starters, the layer doesn't even show up.

I'm running the html from a server and the line in my WFS can be easily seen in QGIS, just a bit north along the Thames river in London. The javascript passes no errors and no warnings

I think the problematic bit is:

sourceVector = new ol.source.Vector({
loader: function(extent) {
    $.ajax('http://localhost:8080/geoserver/wfs?forcebasicauth=true&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAME=BFTchambers:bft&SRSNAME=EPSG:27700&username=user&password=password',{
        type: 'GET',
        data: {
            service: 'WFS',
            version: '2.0.0',
            request: 'GetFeature',
            typename: 'bft',
            //srsname: 'EPSG:27700',
            //cql_filter: "property='Value'",
            //cql_filter: "BBOX(geometry," + extent.join(',') + ")",
            //bbox: extent.join(',') + ',EPSG:27700'
            //extent:[524416,175664, 538096,184752],
            },
        }).done(function(response) {
            formatWFS = new ol.format.WFS(),
            sourceVector.addFeatures(formatWFS.readFeatures(response))
            });
    },
    strategy: ol.loadingstrategy.tile(new ol.tilegrid.XYZ({
        maxZoom: 19
        })),
});

I'm not completely sure if the syntax is right in this portion of the code, but it successfully returns a proper XML with the line I've created in Postgis (deleted some bits so that it appears below).

<wfs:FeatureCollection xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:BFTchambers="http://geoserver.org/bftchamber" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" numberMatched="1" numberReturned="1" timeStamp="2016-06-02T09:56:21.450Z" xsi:schemaLocation="http://www.opengis.net/gml/3.2 http://localhost:8080/geoserver/schemas/gml/3.2.1/gml.xsd http://geoserver.org/bftchamber http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=DescribeFeatureType&typeName=BFTchambers%3Abft http://www.opengis.net/wfs/2.0 http://localhost:8080/geoserver/schemas/wfs/2.0/wfs.xsd">
gml:name>test</gml:name BFTchambers:id>1</BFTchambers:id> BFTchambers:geom> gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#27700" srsDimension="2"> gml:posList>528115 181037 533903 180877</gml:posList> /gml:LineString> /BFTchambers:geom> /BFTchambers:bft> /wfs:member> /wfs:FeatureCollection>

The bit that loads the map is the following:

var layerVector = new ol.layer.Vector({
    source: sourceVector
});
layerOSM = new ol.layer.Tile({
    source: new ol.source.OSM()
});
var map = new ol.Map({
    target: 'map',
    overlays: [overlayPopup],
    controls: [controlMousePos],
    layers: [layerVector, layerOSM],
    view: new ol.View({
        center: [-12000,6711790],
        zoom: 14
        })
    });


texts: Determining if particular point is near country or state boundary

texts:
I'm developing an accessibility Add-On for flight simulators that allows a blind person to fly. The App is coded in c#.
I can easily get the GPS location of the user's Aircraft. What I want to be able to do is tell the user if they are within range of a country or state/province boundary.
All the output is done using text-to-speech, so I'm not actually drawing a map, I just need the data and to understand how to process it. Is anyone aware of an API that can give me this type of information?
I know I can query various APIs for the coordinates and get the country/state/city location, but what about finding nearby boundaries?


texts: QGIS opening shp file: why does it crash?

texts:
I am trying to open a shp file from the EEA (Urban Atlas), and with some of the shp files qgis keeps crashing as soon as I try to load it.
QGIS 1.8.0 is running on Windows 7; I reinstalled QGIS, reloaded the shp file from the EEA website.
Metadata of the shp file is:

Geometry type of the features in this layer: Polygon
The number of features in this layer: 15271
Editing capabilities of this layer: Add Features, Delete Features, Change Attribute Values, Add Attributes, Delete Attributes, Create Spatial Index, Fast Access to Features at ID, Change Geometries
Extents:
In layer spatial reference system units : xMin,yMin 4208112.15,2360649.92 : xMax,yMax 4271746.52,2392865.69
Layer Spatial Reference System:
+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs


texts:
I successfully georeferenced the raster the first time and it loaded correctly in QGIS. Then, I went back to the georeferencer to add more control points to make the overlay look more exact. When I ran the georeferencer again the raster loaded into QGIS but the image was unrecognizable and not where it was supposed to be.

Is it possible to add more control points to a raster that I've already georeferenced?

In the attached image, the brown space is supposed to be the georeferenced raster that should overlay the parcels on the vector layer


texts: Easy way to close open clipped contours with the edges of the clipping mask?

texts:
I am trying to programmatically (with pyqgis) clip contour lines that I've generated in QGIS, but make it so that the clipping mask forms the new edges of the contours, rather than leaving the contours open. The way I'm kind of thinking about this is that I want to "squeeze" down the contours to the extent of the clipping mask, at which point even numbers of overlapping lines on the edges will cancel each-other out and make open gaps (keeping things topologically sane).

The drawing below shows what I'm getting at. The left shows the contour lines for a single elevation that I'm clipping with a square bounding box. The middle shows the result of clipping. The right shows what I want to have as my result. The bottom shows the inverse of what I want to do.

I'm pretty sure I have a solid algorithm thought up to do this, but I want to see if there's a simple plugin or script that does this already so I don't have to sink a bunch of effort into implementing it. Working in QGIS 3.8.3 at the moment.

For those who are interested, here's my proposed algorithm. Please poke any holes you can. Where I say to connect two endpoints, assume there is a function that will figure out how to trace the edge of the bounding box rather than a straight connection (important for corners, for example). This relies on the contour lines not overlapping:

Generate contour lines.
Check orientation of all contour lines, and ensure all are oriented clockwise. (Is this already the case?) Flip any that aren't.
Clip contours using bounding mask.
Separate out the contour lines by elevation, and work on one elevation at a time.
Going clockwise, find all the endpoints on the edge of the clipping mask, and create an ordered list of the ID of the lines which those endpoints belong to: [1, 2, 3, 4, 4, 5, 6, 6, 5, 3, 2, 1]
Cycle that list to the first repeated ID (will have at least one): [4, 4, 5, 6, 6, 5, 3, 2, 1, 1, 2, 3]
Close those first two endpoints and check the orientation of the resulting polygon. If clockwise, continue. If counter-clockwise, you are about to create the bottom picture, so you need to revert that closure and cycle the list of IDs by 1.
Going through the ordered list of endpoints, connect each successive pair. If the endpoints have the same line ID, the contour is closed and you can continue. If the endpoints have different IDs, merge the second line onto the first and replace its IDs in the list with that of the first.
Do this for all contour elevations.


texts: How to automatically connect polylines to one part

texts:
I have a polylines shpfile that consist multiple parts - a water supply network. One part should be one record in att table with name - but, unfortunately, it's made up of a dozen short sections. Ideally, they should be combined into one layer and name of this one part should be "uploaded" from points shapefile.
Shapefile (points) lays over the polylines contain name of part.
How to combine them so finally it will one polyline shapefile where one record contain name.


texts: OpenLayers 4 - draw or move a vector geometry reprojecting its vertices to keep dimensions

texts:
I have to draw a polygon on a vector layer on a simple OpenLayers OSM map (WebMercator).
What I know:

the center (lat/lon) of this polygon
the lengths (in meters) of each side.

I can pre-calculate the mercator coordinates of each vertice at a given position (for example lat/lon 0,0) and save them on a DB.

To do so, I'm using libraries I cannot use in my application backend.

But what I need is to move this polygon around the world keeping the right dimensions in meters: the user needs to view on the map the real size of that object.

So, is there any way to reproject the moved object in the new location?
Or at least to create a new geometry each time in the new position by simply know the sides lengths?


texts:
It seems that MacPorts installs Python27 in /opt/local, but that MacPorts QGIS updates and uses the Apple Python27 in /Library. The result is that MacPorts additions to Python27 such as OpenCV don't work because they are added to the /opt/local Python27 whereas with QGIS installed all Python links point to the /Library Python27 so things like OpenCV can't be used. Has anyone found a way of keeping QGIS working while either
1. making it use the MacPorts Python27 at /opt/local, or
2. enabling MacPorts to add things to the /Library Python27?

The MacPorts people agree it's a problem, but are focussed on finding a 100% MacPorts solution (none yet after 5 months); they aren't interested in cooperating with the native QGIS or Apple Python. I've no response from the OpenCV people as to whether it can be linked to the /Library Python27. (Not being a Unix guru, I'd prefer to stay with MacPorts if that's possible.)


texts: calculate 'predicted class' raster in QGIS

texts:
I have six raster layers that represent the probability of each pixel belonging to a specific vegetation type. I would like to use these to generate a new raster where the value of each pixel is the ID of the raster with the maximum value for the pixel, i.e. the most probable vegetation type of that pixel.

e.g. if at a given pixel raster1 = 0.5, raster2 = 0.2, raster3 = 0.1, raster4 =0.1, raster5=0.05 and raster6 = 0.05, then I would like that pixel in the new raster to be 1.

I can't work out how to do this either with the QGIS Raster Calculator (v2.18) or using an ifelse function with the SAGA Raster Calculator, but I am a bit of GIS newbie still.

In case it's relevant, Creating Maximum-Value Composite using QGIS? explains how to build a composite raster from maximum values but doesn't help me work out to extract the identity of the raster containing the maximum value.


texts: Add panel to the linked map in Google Earth Engine

texts:
I want to show the band compositions of sentinel-2 (i.e. 4 linked maps) in different years. However, can anyone give me a clue on how to add the panel of slider onto the split maps?

Here is the codes: https://code.earthengine.google.com/475585174fe8971bff87bb822ddc770c

The code is shown below:

// Display a grid of linked maps in different years

// A helper function to show the image for a given year on the default map.
var showLayer = function(year) {
Map.layers().reset();

year = ee.Number(year)

var startdate = ee.Date.fromYMD(year,9,1);
var enddate = ee.Date.fromYMD(year,9,30);

// Create an initial mosiac, which we'll visualize in a few different ways.
var image = ee.ImageCollection('COPERNICUS/S2')
    .filterDate(startdate, enddate)
    // Scale the images to a smaller range, just for simpler visualization.
    .map(function f(e) { return e.divide(10000); })
    .median();

// Each map has a name and some visualization parameters.
var MAP_PARAMS = {
  'Natural Color (B4/B3/B2)': ['B4', 'B3', 'B2'],
  'Land/Water (B8/B11/B4)': ['B8', 'B11', 'B4'],
  'Color Infrared (B8/B4/B3)': ['B8', 'B4', 'B3'],
  'Vegetation (B12/B11/B4)': ['B12', 'B12', 'B4']
};

// Shared visualization parameters for the images.
function getVisualization(bands) {
  return {gamma: 1.3, min: 0, max: 0.3, bands: bands};
}

/*
 * Configure maps, link them in a grid
 */

// Create a map for each visualization option.
var maps = [];
Object.keys(MAP_PARAMS).forEach(function(name) {
  var map = ui.Map();
  map.add(ui.Label(name));
  map.addLayer(image, getVisualization(MAP_PARAMS[name]), name);
  map.setControlVisibility(false);
  maps.push(map);
});

var linker = ui.Map.Linker(maps);

// Enable zooming on the top-left map.
maps[0].setControlVisibility({zoomControl: true});

// Show the scale (e.g. '500m') on the bottom-right map.
maps[3].setControlVisibility({scaleControl: true});

// Create a grid of maps.
var mapGrid = ui.Panel(
    [
      ui.Panel([maps[0], maps[1]], null, {stretch: 'both'}),
      ui.Panel([maps[2], maps[3]], null, {stretch: 'both'})
    ],
    ui.Panel.Layout.Flow('horizontal'), {stretch: 'both'});

// Center the map at an interesting spot in Greece. All
// other maps will align themselves to this parent map.
maps[0].setCenter(21.2712, 38.4151, 12);

/*
 * Add a title and initialize
 */

// Create a title.
var title = ui.Label('September 2018 Sentinel-2 Visualizations', {
  stretch: 'horizontal',
  textAlign: 'center',
  fontWeight: 'bold',
  fontSize: '24px'
});

// Add the maps and title to the ui.root.
ui.root.widgets().reset([title, mapGrid]);
ui.root.setLayout(ui.Panel.Layout.Flow('vertical'));
}

// Create a label and slider.
var label = ui.Label('Select Year');
var slider = ui.Slider({
  min: 2016,
  max: 2019,
  step: 1,
  onChange: showLayer,
  style: {stretch: 'horizontal'}
});

// Create a panel that contains both the slider and the label.
var panel = ui.Panel({
  widgets: [label, slider],
  layout: ui.Panel.Layout.flow('vertical'),
  style: {
    position: 'top-right',
    padding: '7px'
  }
});

print(panel)

// How to add panel to the Map (i.e. right after the title) ??
maps.add(panel)

// Set default values on the slider and map.
slider.setValue(2018);


texts: Use area of intersection as a variable in PostGIS

texts:
I have two geojson files - NYCSample and censusTracts.  Each census tract contains a population attribute (integer).  My objective is to multiply the population attribute by the % area of intersection / total area of tract that NYCSample intersects.  For example, we see that the sample layer intersects 6 census tracts.  If each of the census tracts contain 100 people, then the output should be 100 * (% of intersection).

Using the st_area(st_intersection()) functions in PostGIS, how would one output a table with population adjusted for % of area intersected?

So far, I've written this query but am not sure how to create a separate pop_adjusted variable

CREATE TABLE test_join
AS
  SELECT t.*, m.*
  FROM censusTracts AS t , NYCSample AS m
  WHERE ST_Intersects(t.geom, m.geom)
  AND (
    ST_Area(ST_Intersection(t.geom, m.geom))
    /ST_Area(t.geom)
  )


texts:
My Gis Client Program, using OpenLayers, and my GeoServer were running on the same server, everything worked fine.

Now, I started a new instance of My Gis Client Program on another server. There, I get the following Problem:

WMS Layers work fine, but for the WFS Layer I get: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://mygeoserver/mylayerr. This can be fixed by moving the resource to the same domain or enabling CORS.

What can I do about that?


texts: How to create Extended Data for KML exported from shapefile by ArcGIS for Desktop?

texts:
I have a GIS shapefile of 300+ points that I am converting to KML using ArcGIS for Desktop. Once in KML I want to create custom balloons by editing the KML file.  However, the HTML feature in ArcGIS does not set up the Schema and Extended Data that I need (e.g. if I open a shapefile in Google Earth Pro and save it as KML, it creates the Schema and Extended Data automatically). I don't have access to Google Earth Pro right now. Is there another way to create this in ArcGIS or is there a 3rd party program that will do this? I don't have much programming experience, so I can't really go that route.
Thanks in advance!


texts: How to join data in a spreadsheet to a shapefile ?

texts:
Possible Duplicate:
  How can i transfer data from a spreadsheet into a shapefile?

I have data for Indices of Multiple Deprivation for the UK from this website: http://www.communities.gov.uk/publications/corporate/statistics/indices2010

The data in the spreadsheet is represented by Lower Layer Super Output Areas (LSOA) so I have managed to get a shapefile for the LSOA's in the UK and I want to bind the data from the spreadsheet into a shapefile that maps out the indices of multiple deprivation... How do I go about doing this?


texts: QGIS2.14: Attribute table values show "error" while Identify show results

texts:
Using QGIS2.14 and using source data from a MSSQL Server 2016 instance I stumbled across a strange error.
My attribute table show all values as "ERROR"-values while using Identify shows up attribute values just fine. Below I have added a screenshot to illustrate my problem.

I have tried using ArcGIS10.4 as well. Attribute values show up, yet adding a 'ESRIOID' column.

Can someone identify the reason of this QGIS/SQLServer behaviour ?

*EDIT

Adding a primary key column without 'dot' values (like f.i. GBG.18) seems  to have solved the problem...


texts: Making vertex at intersection points of lines from two layers using QGIS?

texts:
I have 2 layers of polylines representing a two road network called roads and routeir (Loaded to Qgis from 2 shapefiles). I want to insert vertices at the intersection points between the two polylines (where the purple polylines cross the red polyline).

How can I achieve this in QGIS?

I am not interested in adding a geometric point at intersection points.


texts: Animating objects on canvas to change color by delay using PyQGIS?

texts:
On my map canvas I have various point objects spread through several layers. My plan is to 'animate' those objects by a loop from start to a predefined resolution.

By now I'm just testing the algorithm with the vertical positions of the existing objects and an exportCanvas function which saves the canvas as a single image for each step.

Because this method isn't very handy I want to have the output of the loop directly to the canvas - delayed by e.g. 0.5 seconds per step.

Above is an example of the merged jpg-files to a gif

The problem is that my loop doesn't work very well at all and freezes my QGIS for the whole process time (+delay).
I know that I need some kind of hyperthreading or callback from QGIS to my plugin but at this point I have no clue how to transfer this idea to useful code

Down below: the code so far

# Animation: Button clicked
def btnAnimationClicked(self):
    rate = 24

    # Werte zum Färben der xyz
    for i in range(0,rate,1):
        self.caller(i, self.callback)

# Animation: Caller
def caller(self, val, func):
    func(val)

# Animation: Callback
def callback(self, i):
    yhi = 5699049523 + 400000
    ylo = 5696625163
    delta = yhi - ylo
    rate = 24
    ste = delta / rate

    ubound = ylo + (ste * (i+1))
    lbound = ylo + (ste * i)

    values = (
        ('hi', ubound + 1, yhi, 'red'),
        ('is', lbound, ubound, 'green'),
        ('lo', ylo, lbound - 1, 'yellow'),
    )
    # HaKasten abgestuft färben
    for layer in QgsMapLayerRegistry.instance().mapLayers().values():
        if layer.name()[0:9] == "xyz_______":
            ranges = []
            for label, lower, upper, color in values:
                symbol = QgsSymbolV2.defaultSymbol(layer.geometryType())
                symbol.setColor(QColor(color))
                rng = QgsRendererRangeV2(lower, upper, symbol, label)
                ranges.append(rng)
            attribut = 'y'
            renderer = QgsGraduatedSymbolRendererV2(attribut, ranges)
            layer.setRendererV2(renderer)
    for layer in qgis.utils.iface.mapCanvas().layers():
        layer.triggerRepaint()
    #time.sleep(0.5) # optional
    self.exportCanvas()


texts: How to use processing in a PyQT plugin in QGis

texts:
I am writing a QGis plugin with UI that should utilize certain QGIS processing tools when the user runs the plugin.

Now I tried a lot, searched a lot and came along quite many different approaches. First I want to succeed using QGis processes and second I want to make sure this survives the upcoming changes in QGis 3.0.

For now all I want is to use the process "gdalogr:cliprasterbyextent" and manged to use this one when opening the Python console and entering directly:

import processing
from qgis.core import QgsRasterLayer

raster = QgsRasterLayer('/tmp/test.tif', 'test.tif')
output = '/tmp/result.tif'
extent = '67.9986111111,97.5069444444,6.70138888889,37.1097222222'

processing.runalg('gdalogr:cliprasterbyextent', {'INPUT': raster, 'OUTPUT': output, 'PROJWIN': extent})

The same code in my Python plugin doesn't produce any output nor errors. It just runs through with not blocking the execution. I wasn't sure if the processing is properly callable from within my plugin? So I did a print("processing.runalg") and see that it is still a function. Yes, it is still a callable function and accessible from my Python plugin!
I can also just use "processing.runalg('gdalogr:cliprasterbyextent')" and get the cliprasterbyextent help text when running my plugin. I also made sure the file exists and access rights are no obstacle.

I also saw examples where runalg is getting passed only arguments like:

processing.runalg('gdalogr:cliprasterbyextent', raster, '', extent, 5, 4, ...)

and I saw examples which first import and then initialize the Processing framework like this:

sys.path.append(QgsApplication.pluginPath())
from processing.core.Processing import Processing
Processing.initialize()

So far this all doesn't help me. I am lost and wonder why utilizing a simple process in my plugin seems so complicate. Why doesn't runalg throw any errors or block the execution for at least 1-3 seconds like when calling it from the QGis Console?

Could someone please indicate me what the right approach would be. I think, such cases should also be properly documented or an example guide should be in the QGis documentation/tutorials.


texts: ArcGIS Tool Resample (Data Management) equivalent in QGIS?

texts: In ArcGIS tools there is one tool named Resample (Data Management), is there any equivalent tool in QGIS which performs the same task as Resample (Data Management)?


texts: Select by attributes returning wrong records

texts:
I'm trying to select by attributes on a parcel shapefile with 555k+ records using the apn field and the statement is returning records that have completely different values. My initial statement was "apn" = '525-670-10-2'

And received the top two records with APNs starting with 84A.

Then I tried a wild card and got a whole slew of records starting with 84A:

Has anyone encountered this and was able to correct it? I'm using ArcMap 10.6


texts: Why is QGIS points in polygon so slow when select is fast?

texts:
I'm looking at QGIS 2.18.9 and using a polygon to select points from a large point layer (file based tab file).

I wondered why the process is so slow if you use plugins or analysis options? I ask because simply drawing the same polygon with the select tool works in seconds.

Tools tested include the intersection tool and Select Within plugin.

If the select tool is so much faster, is there not scope to improve the performance of the analysis in QGIS?


texts: Kriging: Large standard error very close to known value points

texts:
I am attempting to create surfaces of strata via Kriging in Arc GIS from borehole data. In addition to the predicted surface I also want surfaces showing 95% confidence above and below the predicted surface.
The issue I'm having is with these 95% surfaces.

The surfaces are very "tight" to the known surface when within a couple of meters of a known value/ borehole but standard errors immediately become high once a few meters away from the borehole.

 I have included a cross-section of our 3 surfaces. The predicted surface is represented by the middle line with the lower dashed and upper line the lower and upper 95% confidence limits. Please note how steeply we lose confidence at a very close distance to a known borehole.


texts: Add a field value to a polyline that's generated from an cursor.insertRow in Arcpy

texts:
I have a feature class that is built using the calculated values along two lines. I am trying to add a new column with a value from each line but am not able to.

I have a list that looks like

['102382191', '102387203', 'fe3bd81d-4c9f-4134-b7fe-e3529d2d7749'],
['104750210', '104716195', 'fe886c2d-c0a4-42b5-9f5b-fcade3dda238']]

from this we get the three values

cursor = arcpy.da.InsertCursor(out_fd+"/Turn_Lines",
                           ["SHAPE@"])
for turn in turnNotAllowedList:
        fromUFI = turn[0]
        toUFI = turn[1]
        rUFI = turn [2]

We have an array which get us the positions along the line to use

streetDictA = {str(row[1]): row[0].positionAlongLine(0.5,True).firstPoint for row in arcpy.da.SearchCursor(
    out_fd+"/streets", ["SHAPE@","EdgeFID"])}

The feature to add is built using

array = arcpy.Array()
array.add(streetDictA[fromUFI])
array.add(streetDictB[toUFI])
#array.add(rUFI)
polyline = arcpy.Polyline(array,sr)
cursor.insertRow([polyline])

How do I get the table to include the rUFI value? so that it has

I have tried cursor.insertRow([polyline],r_UFI) but I get

  TypeError: insertRow() takes exactly 1 argument (2 given)

Do I need to insert the polyline and then separately add the new column and value like this?

an example line would have the following

>>> streetDictA[fromUFI]
<Point (150.7028015, -33.753457, #, #)>
>>> streetDictB[toUFI]
<Point (150.702866881, -33.7537085424, #, #)>
>>> rUFI
'00004e53-5700-4600-0000-0000245bdf33'
>>>


texts:
Basically my question is quite simple:

I want to create certain amount of random points within polygons. The RandomPointGenerator does almost exactly what I want, but I'd like to pass the Number of Points from an attribute value that I have in one of the shapefiles I read in to the workspace. Now the transformer only allows to "hard code" the value in there.

Any ideas how to solve this? I'm not very familiar with using published/private parameters so maybe those could help? Or should I "manually" create the workflow of random point generation within polygons and ditch the RandomPointGenerator?


texts: Removing interval limit for Color ramp in ArcMap?

texts:
I am Making a program for a DEM I have made, but I have a problem. There is banding in the Color-ramp I have exported from ArcMap, and I can see the individual colors change in the scale. I have set the interval as 50,000 but it still does not export as an HD gradient.

How can I remove the interval cap, so that the  Scale can be more of a gradient that does not show color banding?


texts: Forcing left to right order of cross section lines of river using QGIS?

texts:
Based on "Generating a series of cross sections (profiles) along a line?" post, how can I force the cross-section lines to be created, thus collecting elevation data, from LEFT to RIGHT facing the downstream end of the river based on the example Steven Kay has provided?

I see that it depends on the CRS, but is there a way to actually force them?

I need to import the cross-sections of a river in HEC-RAS 2D and they need to be created specifically in such way from the beginning.

I am using QGIS 3.6.


texts: Calculating number of pixels in raster image using ArcPy?

texts:
I have a formula for suitability which I have created and I need to count how many pixels are in each class.

For example
- Suitability class 0 has 12545 pixels
- Suitability class 1 has 386 pixels
- Suitability class 2 has 1145 pixels
- Suitability class 3 has 518 pixels

Is there a python code for this????

By the way my program is set up because I am creating a tool(Beginning Stages). No Numpy allowed!

import arcpy
from arcpy import env
from arcpy.sa import *

arcpy.env.overwriteOutput = True
arcpy.CheckOutExtension("Spatial")

# Workspace location
env.workspace = arcpy.GetParametersAsText(0)

# DEM raster dataset
DEM = arcpy.GetParametersAsText(1)

# Land Use raster dataset
landUse = arcpy.GetParametersAsText(2)

#Floating point values of suitability weights
weight_1 = arcpy.GetParametersAsText(3)
weight_2 = arcpy.GetParametersAsText(4)
if ((weight_1 + weight_2 > 1.0),(weight_1 + weight_2 < 1)):
arcpy.AddMessage("Error! Weights limits not appropriate!")

# The output feature class name
outputFC = arcpy.GetParameterAsText(5)

# Get Slope of DEM raster
arcpy.sa.Slope(DEM, Slope_DEM,"DEGREE", "1")
arcpy.AddMessage("Slope Raster Created!")

# Reclassify Slope
reclass_slp = RemapRange([[0,3,3],[3,6,2],[6,90,1]])
reclass_slope = Reclassify(Slope_DEM, "VALUE", reclass_slp)
reclass_slope.save(workspace)
arcpy.AddMessage("Slope Raster Reclassified!")

# Get Aspect of DEM raster
outAspect = arcpy.sa.Aspect(DEM)
outAspect.save = (workspace)
arcpy.AddMessage("Aspect Raster Created!")

# Reclassify Aspect
reclass_aspt = RemapRange([[-1,0,3],[0,45,1],[45,135,2],[135,225,3],[225,315,2],[315,360,1]])
reclass_slope = Reclassify(Aspect_DEM, "VALUE", reclass_aspt)
reclass_aspt.save = (workspace)
arcpy.AddMessage("Aspect Raster Reclassified!")

# Reclassify Land Use Raster
reclass_land = arcpy.sa.Con(landUse,1, "Value == 18,21,73" )
reclass_land.save = (workspace)
arcpy.AddMessage("Land Use Raster Reclassified!")

# Calculate Best Site and create resulting shapefile raster with interger values between 0 and 3
bestSite = (int((weight_1 * reclass_slp) + (weight_2 * reclass_aspt))* reclass_land)
arcpy.AddMessage("Suitability Raster Created!")


texts: Error: unable to open Unable to open %s.shp or %s.SHP

texts:
I am using c shapelibrary (http://shapelib.maptools.org/) SHAPE API for creating and reading shapefiles. I am able to create a new shapefile using SHPcreate(). However I am unable to read it using SHPopen() function. Even if I give the full path to the .shp it doesn't open. I tried one of the test1.shp files in my cpp program however it still didn't work.

These are the lines.

#include "shapefil.h"

SHPHandle pfile;
pfile = SHPOpen("xx.shp", "r+b");

I also used

pfile = SHPOpen("xx.shp", "rb");

and all the .shx .prj .dbf were in the same folder as .shp. I am unable to figure out what would be the issue. Can anyone assist. These commands work fine in linux. However I need to use it in c++ project. Can anyone suggest on if I need to enable any macros. or anything.


texts: Getting the pixel area of the individual changes (Change Detection Map) in Google Earth Engine

texts:
I would like to get the change pixel area from the change detection map. As in bareland-waterbody, bareland-builtup, bareland-vegetation, vegetation-vegetation, vegetation-builtup, vegetation-waterbody etc.
Below is the link to the script:
   https://code.earthengine.google.com/5037318a76283385a9c217f3cb610fa8

//Imported image

 var changeDetection = image2;
 Map.addLayer(changeDetection,
{min: 0, max: 11, palette: ['green', 'wheat', 'blue', 'red', 'white', 'pink', 'orange', 'black',
'brown', 'yellow']},'changeDetection8616');

//Shapefile

var densu = Densu;

//Classified image 1986

// Select the class from the classified image

 var veg = classified86.select('classification').eq(0);
 Map.addLayer(veg);

// Calculate the pixel area in square kilometer

var area_veg = veg.multiply(ee.Image.pixelArea()).divide(1e6);

// Reducing the statistics for study area

 var stat = area_veg.reduceRegion ({
 reducer: ee.Reducer.sum(),
 geometry: Densu,
 scale: 30,
 maxPixels: 1e9,
 });

// Get the sq km area for vegetation

print('Vegetation Area(in sq.km)', stat);

// Select the class from the classified image

var water = classified86.select('classification').eq(1);
Map.addLayer(water);

// Calculate the pixel area in square kilometer

var area_water = water.multiply(ee.Image.pixelArea()).divide(1e6);

// Reducing the statistics for study area

var stat1 = area_water.reduceRegion ({
reducer: ee.Reducer.sum(),
geometry: Densu,
scale: 30,
maxPixels: 1e9
});

// Get the sq km area for waterbody

print('Waterbody Area(in sq.km)', stat1);

// Select the class from the classified image

var bare = classified86.select('classification').eq(2);
Map.addLayer(bare);

// Calculate the pixel area in square kilometer

var area_bare = bare.multiply(ee.Image.pixelArea()).divide(1e6);

// Reducing the statistics for study area

var stat2 = area_bare.reduceRegion ({
reducer: ee.Reducer.sum(),
geometry: Densu,
scale: 30,
maxPixels: 1e9,
});

// Get the sq km area for bareland

print('Bareland Area(in sq.km)', stat2);

//List of the individual values in km2

var sample = ee.Array([stat.values().get(0), stat1.values().get(0), stat2.values().get(0)]) ;
print([stat.values().get(0), stat1.values().get(0), stat2.values().get(0)], 'sample');

//Classified image 2016
// Select the class from the classified image

var veg3 = classified16.select('classification').eq(0);
Map.addLayer(veg3);

// Calculate the pixel area in square kilometer
var area_veg3 = veg3.multiply(ee.Image.pixelArea()).divide(1e6);

// Reducing the statistics for study area

var stat3 = area_veg3.reduceRegion ({
reducer: ee.Reducer.sum(),
geometry: Densu,
scale: 30,
maxPixels: 1e9,
});

// Get the sq km area for vegetation

print('Vegetation Area(in sq.km)', stat3);

// Select the class from the classified image

var water4 = classified16.select('classification').eq(2);
Map.addLayer(water4);

// Calculate the pixel area in square kilometer

var area_water4 = water4.multiply(ee.Image.pixelArea()).divide(1e6);

// Reducing the statistics for study area

var stat4 = area_water4.reduceRegion ({
reducer: ee.Reducer.sum(),
geometry: Densu,
scale: 30,
maxPixels: 1e9
});

// Get the sq km area for Waterbody
print('Waterbody Area(in sq.km)', stat4);

// Select the class from the classified image

var builtup = classified16.select('classification').eq(3);
Map.addLayer(builtup);

// Calculate the pixel area in square kilometer
var area_builtup = builtup.multiply(ee.Image.pixelArea()).divide(1e6);

// Reducing the statistics for study area

var stat5 = area_builtup.reduceRegion ({
reducer: ee.Reducer.sum(),
geometry: Densu,
scale: 30,
maxPixels: 1e9,
});

// Get the sq km area for Builtup

 print('Builtup Area(in sq.km)', stat5);

//List of the individual class in km2

 var sample1 = ee.Array([stat3.values().get(0), stat4.values().get(0), stat5.values().get(0)]) ;
 print([stat3.values().get(0), stat4.values().get(0), stat5.values().get(0)], 'sample1');


texts:
I have a mobile app that uses Phonegap with OpenLayers and Geoserver. Now, I need to make the app available completely offline. The amount of data points can get very large depending on what client is loaded into the app, and each point has related properties. So, I need to be able to pull the data down to the phone when it is online and then use the local data when it is offline. I like the speed of GeoJSON and would like to use it if possible. I have built a GeoJSON file that loads on the map like I want it to. Now, I have to save edits/moves to the GeoJSON file and I'm stuck. Using a save strategy isn't working and from what I read it looks like I have to have a server script to make that work.

How do I save the edits back to my GeoJSON file?

Or am I going about this all wrong and need to use something else for offline data with OpenLayers?


texts: How to access data from a selected feature in ArcGIS 10?

texts:
First to describe my problem as I see it. I've been asked to design a tool that will take a selected features attributes and copy it out to an output table, with each successive selection and processing of the tool adding a new row to the formerly mentioned output table. I'm trying to work exclusively in Python since my VB knowledge is None (or perhaps Null?).
My current method has been to make a Layer View consisting only of the feature that the user has selected and then use a search cursor to snatch the data and populate the other table with use of an insert cursor. This seems clearly inefficient to me, but more appropriate methods have not made themselves clear to me. However, to make matters worse, it would seem that my Layer View is simply creating a copy of the original table because I don't have a method for singling out a unique identifying attribute to create a Layer View with 1 feature.

A couple of questions, then.

1) Is it possible through python/arcpy to access the attributes of a currently selected feature?
2) If this is not possible, what are other methods that come to mind for performing the task of extracting data from one feature class and using it to populate fields in a separate table?


texts: How can I get coordinates outside the scope of a function

texts:
I am using google maps API in OpenLayers for geocoding so that when I enter an address I can get back the coordinates of this address. I am implementing this with a function but I cannot get the return values outside of the scope of the function. The implementation is the following:

function googleGeocoding(start){

            var geocoder = new google.maps.Geocoder();

            geocoder.geocode({address:start}, function(results, status){

                var x1 = results[0].geometry.location.lat();

                var y1 = results[0].geometry.location.lng();

                alert(x1+' '+y1);  <--- this one alerts

            })
            alert(x1+' '+y1);   <-- this one gives back undefined

        }

 googleGeocoding(startAddress);

How can I get the values of x1, y1 outside of the scope of geocoding? I'm sorry if this is more of JavaScript related question than GIS


texts:
I am trying to load layers from WMS using QGIS with following adress:

http://bialystok.geoportal2.pl/map/wms/wms.php

I am able to connect to server and see available layers however I cannot load them on the map. I tried to change ESPG or load layers on empty project but still I can't see anything on the map.

Can you please tell me is it possible to load "siec_energetyczna" layer from this WMS and why I can't load the layers?

I saw that connection is working fine on this website:
http://bialystok.geoportal2.pl/map/www/mapa.php?CFGF=wms&mylayers=%20granice%20OSM


texts: Count number of layers in a stack with value equal to raster pixel value

texts:
I would like to count number of layers in a stack with value equal to raster pixel value. Here is my current try:

r1 <- calc(s, fun=function(x){sum(x == r)})

I get two errors

Error in FUN(newX[, i], ...) : unused argument (na.rm = TRUE)

and

Error: cannot allocate vector of size 1.9 Mb

Where I'm going wrong?


texts: Selecting features by attribute in QgsVectorLayer faster?

texts:
I've gone through many posts here that describe some ways of selecting features by attribute, but there is really no definitive answers as to which way is the fastest way of selecting features from a QgsVectorLayer by attribute values. Here is the case in point, I have a python list of attribute values, such as ['obj1', 'obj2', 'obj3'], these are the values of object 'name', which is also an attribute in the QgsVectoryLayer, say, layer. I need to select these map features on the map as fast as I can as the layer usually has hundreds of thousands of features. Here is a few ways I tried:

method 1:

name_list = ['obj1', 'obj2', 'obj3']
feature_ids = [f.id() for f in layer.getFeatures() if f.attributes()[0] in name_list]
layer.setSelectedFeatures(feature_ids)

method 2:

feature_ids = []
for n in name_list:
   for feature in layer.getFeatures(QgsFeatureRequest(QgsExpression('"name"=' + "'" + n + "'"))):
      feature_ids.append(feature.id())
layer.setSelectedFeatures(feature_ids)

neither of the above is fast, when executed over a few large layers, it is really slow. So, what would be the fastest way to select features on map fast by attribute values.

To time it:
one can put the above methods into functions, then do the following to time it:

import timeit
print "method1: %s seconds " % timeit.timeit(method1,number=1)
print "method2: %s seconds " % timeit.timeit(method2,number=1)

The QGis Core library is from QGIS 2.12.3 Lyon; GDAL/OGR 1.11.3; GEOS 3.5.0-CAPI-1.9.0


texts: Combining Mapbox GL JS plugin with another SQLite-based plugin (Cordova)

texts:
I'm creating an App with Cordova. For this I want to use Mapbox GL JS for using offline maps and a SpatiaLite database for storing additional spatial data.
The mapbox-gl-cordova-offline plugin requires the cordova-sqlite-ext plugin to work properly. To access the SpatiaLite database I want to use the plugin cordova-spatialite-storage. I cannot use cordova-sqlite-ext for this because it only supports standard SQLite functions and not spatial functions, which my app also requires. However, apparently, I cannot use two separate SQLite plugins as the app can only recognize one (see here).
How do I go about combining the Mapbox GL JS plugin with another SQLite-based plugin? Alternatively, is it somehow possible to use SpatiaLite functions in a standard SQLite database?


texts: Using ArcPy to Move Feature Classes to Feature Dataset?

texts:
I have a File Geodatabase. I am using Python to manipulate data. I have a bunch of Feature Classes in the root of the FGDB. What I need to do is to loop through them and move all of them into a 'Sewers' Dataset. I am able to do so by using ArcCatalog but haven't found a way to programatically to so. The following script generates error: 'Manhole' Feature Class already exists.

fd = "Sewers"
for fc in featureclasses:
arcpy.CopyFeatures_management(fc,target_gdb+"\\"+fd+"\\"+fc)


texts: QGIS GUI showing nothing on loading a GRASS mapset

texts:
I have GRASS 7 plugin installed with QGIS 3.4.2.

I downloaded the Alaska QGIS sample dataset and followed these steps to load the dataset into QGIS.

When I expand the alaska location and load the demo mapset into QGIS, I see nothing except a red polygon on the QGIS canvas. Is this how its supposed to be? What do I understand about GRASS mapsets from this?


texts:
Hi, I know that the is a possibility to "build" 3d structures - or rather to visualize shapefiles in 3d - in QGIS.
ie. a "reconstruction" of a redoubt I have created earlier

Alhtough I have not found a case study where a rectengular-like features where visualized.
What I am looking for is to (re)"construct" a simple 3d visualization of ALS-derived dtm interpretation of a POW camp from IWW - most of the buildings where pit-houses. To put it simply a rectengular roof sticking out of ground.

I know that it would probably be better for me to use some CAD software, but I have none experience with them and I do have GIS skills. I do not have access to ArcGIS and if possible I prefere not to use it.


texts: Is it possible to look at the contents of Shapefile using Python without an ArcMap license?

texts: I wondered if it is possible to look at the contents of a shapefile using Python without having and ArcMap license. The situation is that you can create shapefiles from many different applications, not only from ESRI software.  I would like to create a Python script that checks the spatial reference, feature type, attribute names and definitions, and the contents of the fields in a shapefile and compares them to a set of acceptable values.  I would like this script to work even if the organization does not have any ESRI licenses.  To do something like this, do you have to use ArcPy or can you dig into a shapefile without using ArcPy?


texts: Unable to compile plugin (pyqt) for Qgis

texts:
I have installed the

latest version of Qgis (2.18.0, 64 bit) using the OSGeo4W  network
installer from the download page of Qgis.
QT 5.7.0 (64 bit) available at
https://www.qt.io/download-open-source/#section-2

Next, created a code using the 'plugin builder' in Qgis and then compiled  in the OSGeo4W Shell (screen shot attached)

pyrcc4 -o resources_rc.py resources.qrc

Next, restarted Qgis but was the plugin was not loaded. The log file displayed the following

I have no coding background and therefore unable to understand and resolve the issue.


texts: Any way to identify squares with a minimum area within polygons?

texts: I have a few thousand polygons, all of them with an area bigger than 15m2. Some of them can have quite 'strange'shapes, like being very long and very narrow. I need to identify those polygons that can FULLY contain within them at least one square of 1.25m per side. Is there any way to do this with ArcGIS Pro?


texts:
I have the following label style defined in geoserver SLD stylesheet:

<TextSymbolizer>
        <Label>
          <ogc:PropertyName>pisanjeimena</ogc:PropertyName>
        </Label>
        <VendorOption name="group">false</VendorOption>
        <VendorOption name="labelAllGroup">true</VendorOption>
        <VendorOption name="spaceAround">20</VendorOption>
        <VendorOption name="goodnessOfFit">0</VendorOption>
        <VendorOption name="conflictResolution">false</VendorOption>
        <VendorOption name="maxDisplacement">10</VendorOption>
        <VendorOption name="autoWrap">150</VendorOption>
        <Halo>
          <Radius>2</Radius>
          <Fill>
            <CssParameter name="fill">#FFFFFF</CssParameter>
            <CssParameter name="fill-opacity">0.6</CssParameter>
          </Fill>
        </Halo>
        <Font>
          <CssParameter name="font-family">Arial</CssParameter>
          <CssParameter name="font-size">12</CssParameter>
          <CssParameter name="font-style">normal</CssParameter>
          <CssParameter name="font-weight">bold</CssParameter>
          <CssParameter name="fill-opacity">0.6</CssParameter>
        </Font>
        <LabelPlacement>
          <PointPlacement>
            <AnchorPoint>
              <AnchorPointX>0.5</AnchorPointX>
              <AnchorPointY>0.0</AnchorPointY>
            </AnchorPoint>
            <Displacement>
              <DisplacementX>0</DisplacementX>
              <DisplacementY>5</DisplacementY>
            </Displacement>
          </PointPlacement>
        </LabelPlacement>
        <Fill>
          <CssParameter name="fill"><ogc:PropertyName>boja</ogc:PropertyName></CssParameter>
        </Fill>
      </TextSymbolizer>

The style is defined for point layer.

Can someone explain what do vendor opetions "group" and "labelAllGroup" do together in this case?

I'm asking because  is set to false. Does this mean that  will also not be applied?

According to documentation, labelAllGroup causes all of the disjoint paths in a line group to be labeled, not just the longest one. How will this work if layer contains only points?


texts: Merging Features in QGIS While Avoiding Rings

texts:
I have a large grid (~1m/feature) poly shapefile I need to get into an application controller. The controller is seeing coverage, so a feature=already applied, no feature=apply. The features can have as many nodes as needed, as long as there are no rings.

Currently, the file has too many features for the controller to handle. Is there a way to merge features automatically while avoiding the creation of rings (ie, leaving feature splits to allow featureless areas to remain outside of other features)? Doing it manually would be too time intensive.


texts: GdalTools core plugin "missing metadata file"

texts:
I installed QGIS 3 with GRASS 7 this morning via OSGeo4W64, and the application opens up without any issues, however the GdalTools plugin is coming up as "Invalid", showing the error "This plugin is broken: Missing metadata file."

I can't uninstall/reinstall the plugin within QGIS, as it advises it is a core plugin. I can't find it in the repository either, which was my Plan B. I've uninstalled and reinstalled QGIS 3, along with all of the GDAL-related packages listed in OSGeo4W64, but nothing has corrected this error.

I have QGIS 2.18.17 installed on the same machine, which is working fine, however I've also noticed that I'm getting the same error for the fTools plugin in 2.18.17. Could be related but I can't be sure when that error first appeared - it may have been there for some time without me noticing.


texts:
I am trying buffer 1 side of a line, which I have done using the method outlined in https://knowledge.safe.com/articles/20651/buffer-on-left-or-right-side-only.html. But I need to orientate the linework so its all in the same direction because some of the buffers are being placed on the incorrect side of the 5m contour (ie two different contour lines and the buffer outputs on different sides for both).  I have tried the orientor transformer but have had no luck.

My workflow clips the area to Councils LGA, and then filters out all linework that has an elevation of 5m.  The LineJoiner joins the linework that links together, and then the snapper snaps joins those lines that didn't touch together that are within 10m of one another (5m contour linework not that accurate and sometimes dont touch the next 5m contour line).
Length is calculated and filtered, any lengths under 1000m are put directly through to an area builder and the unfiltered go through a counter and multibuffer etc as per the https://knowledge.safe.com/articles/20651/buffer-on-left-or-right-side-only.html workflow.


texts: Balloon popup in dynamic display looks weird (with image link)

texts:
Here's how it looks when dynamic display is enabled
http://iterationx.posterous.com/34293301

Each letter gets its own balloon callout - this is quite annoying and I can't image why anyone would actually want this.

Here's the code I'm using, its in a custom dynamic layer:

public override void DrawDynamicLayer(esriDynamicDrawPhase DynamicDrawPhase, IDisplay iDisplay, IDynamicDisplay iDynamicDisplay)
{
if (this.m_textGlyph == null)
{
IBalloonCallout balloonCallout = new BalloonCalloutClass();
balloonCallout.Style = esriBalloonCalloutStyle.esriBCSRoundedRectangle; //oval doesn't work
ITextElement pTextElement = new TextElementClass();
TextSymbolClass textSymbolclass = new TextSymbolClass();
IFormattedTextSymbol balloonCalloutTextSymbol = textSymbolclass as IFormattedTextSymbol;
balloonCalloutTextSymbol.Background = balloonCallout as ITextBackground;
balloonCalloutTextSymbol.Font = ESRI.ArcGIS.ADF.Connection.Local.Converter.ToStdFont(new Font("Arial", 10.0f, System.Drawing.FontStyle.Regular));
m_textGlyph = dynamicGlyphFactory.CreateDynamicGlyph(balloonCalloutTextSymbol as ISymbol);
}

m_dynamicSymbolProperties.set_DynamicGlyph(esriDynamicSymbolType.esriDSymbolText, m_textGlyph);
dynamicDisplay.DrawText(mousePoint, textToDisplay);

}

edit:

I tried this but it looks the same

ASCIIEncoding ascii = new ASCIIEncoding();
Byte[] encodedBytes = ascii.GetBytes(textToDisplay);
String decodedString = ascii.GetString(encodedBytes);
dynamicDisplay.DrawText(mousePoint, decodedString);

Since I don't think there is going to be an answer, I'll just mention my workaround.

I created a Polygon to represent the Hover balloon, the simplified the geometry and drew text in the middle of it.  Then I kept a copy of the Balloon PointCollection in memory, and if the mapscale changes, I used a Transform2D, to move or scale it, depending on which was necessary.  The Glyph outline has to be the same as the fill color or you will get weird squares.


texts:
actually i am in need of some requirment regarding context menus.

We created our own button in the context menu which will call a exe file whenever that option in selected in the context menu.

The problem is that this button is that it only should be enabled when a particular area on  our map is selected. Otherwise it should be disabled.

As i am new to this arcGIS ..need help on this.


texts: Loss in data after conversion from .shp to .tif using QGIS

texts:
I have some .shp data, which include points with values. After converting it into .tif, using QGIS, I have some loses in data.

In .shp file sum of field was about 141418146 and in .tif image sum is about 139544448. How can I save my data after conversion?
 Any suggestions are acceptable.


texts: Georeferencing image from Google Maps using gdal_translate?

texts:
I am trying to geo-reference an image using gdal_translate in a command prompt. Currently I have the following

gdal_translate.exe -of GTiff -a_nodata 0 --config GDAL_DATA "Config location" -a_ullr -77.057275 38.872024 -77.054672 38.869986 -a_srs EPSG:3857 "Input.tif" "Output.tif"

Where the config location is the location of the gdal data files.

The issue I am having is when I open the image it has lost its aspect ratio. I believe it has something to do with the projection but I am unsure.

gdalinfo.exe gives the following info.

Driver: GTiff/GeoTIFF
Files: Output.tif
Size is 1950, 1950
Coordinate System is:
PROJCS["WGS 84 / Pseudo-Mercator",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs"],
    AUTHORITY["EPSG","3857"]]
Origin = (-77.057275000000004,38.872024000000003)
Pixel Size = (0.000001334871795,-0.000001045128205)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_SOFTWARE=TwelveMonkeys ImageIO TIFF writer DEV
  TIFFTAG_XRESOLUTION=72
  TIFFTAG_YRESOLUTION=72
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( -77.0572750,  38.8720240) (  0d 0' 2.49"W,  0d 0' 1.26"N)
Lower Left  ( -77.0572750,  38.8699860) (  0d 0' 2.49"W,  0d 0' 1.26"N)
Upper Right ( -77.0546720,  38.8720240) (  0d 0' 2.49"W,  0d 0' 1.26"N)
Lower Right ( -77.0546720,  38.8699860) (  0d 0' 2.49"W,  0d 0' 1.26"N)
Center      ( -77.0559735,  38.8710050) (  0d 0' 2.49"W,  0d 0' 1.26"N)
Band 1 Block=1950x1 Type=Byte, ColorInterp=Red
  NoData Value=0
Band 2 Block=1950x1 Type=Byte, ColorInterp=Green
  NoData Value=0
Band 3 Block=1950x1 Type=Byte, ColorInterp=Blue
  NoData Value=0


texts:
Each of my projects is a directory in which I have the following folders:

Data/.. (contains .shp files, tables, and rasters in various formats)

Maps/.. (contains .mxd files that depend on the files in Data/)

I reuse some feature classes extensively between projects. Most of them I would probably never update, so I keep copies of them in each projects Data/ folder. My supervisors/colleagues depend on this data organization as well, so that they don't have to dig around to find the supporting shapefiles for a given project.

This system has worked decently for our purposes, but it has problems. Some files are large, yet need to be available in multiple Data/ folders. This is an inefficient use of space. In addition, on occasion changes have to be made to commonly used files that we wish to persist for all versions. This results in many headaches and a lot of extra work for me.

What if instead of maintaining separate versions of each of these large datasets between each project we had a "file shortcut" like what people frequently put on their Desktops, but as a sort of proxy or pointer to the actual shapefile that would be stored in a common File Geodatabase.

Does such a "shortcut" method exist for managing various geospatial data formats, especially shapefiles?


texts: Determining distance between polygons in two shapefiles using ArcGIS Desktop?

texts:
I have a parcel shp and a lake shp.

How to calculate the distance between the parcel polygon and the lake?

I do not want to use the measure ruler tool in ArcGIS Desktop 10.2.


texts:
Is it possible to show two or more labels for one layer?
For example - one label will show the name of a school and the 2nd label will show the number of students? They should be completely different labels. Editing one label (its buffer, font, background etc.) will not affect the other labels


texts: Markers Flickering on OpenLayers export from qgis2web

texts:
Is there a way to stop Markers/Symbols from flickering when exported to OpenLayers using qgis2web, Or a preferred marker format to use?

The problem occurs using either SVG or simple markers. They are displayed in QGIS correctly and also export to leaflet.

An example of the issue can be seen at http://ncssurveys.com/Maps/2/index.html  The problem is exactly the same using SVG markers.

QGIS and Plugin are both updated to the current builds.


texts: Raster merge leaves gap where one file has no data

texts:
So I gave up on using the Raster|Misc|Merge... command in QGIS because it always crashes.  I tried using the merge tool from the GDAL/OGR Processing Toolbox instead.  That runs OK, but it puts a gap in the mosaic where one of the input rasters contains no data values - looks like the no data values are over-writing the valid values from the other raster.  Is there any way around this problem?

I assume that if you execute gdal_merge from a Windows command prompt then there are switches you can use to fine-tune the result which aren't available when you run it from inside QGIS.  I tried that, but gdal_merge won't run this way on my machine, so I guess there's something wrong with the way this stuff is implemented in a Window QGIS installation.  What to do?


texts: Detecting if GPS coordinates fall within polygon of points?

texts:
I'm looking for a simple explanation on how to detect if GPS coordinates fall within a polygon of points.

I would prefer an explanations that can be done using paper and pencil and not programming language specific.

If I have a list of points (latitude and longitude in degrees) that makes up a polygon. How can I tell if a point falls withing that polygon.

The only data I have access to is the polygon points and the point to check. An example is: 41.21,-104.77(point to check) then I have polygon points (39.39 -101.69 + 48.8335,-106.2435 + 38.803,-109.5781 + 39.4413,-111.043 + 45.6336,-113.7162 + 48.8335,-106.2435)

I found a Java specific answer and an R specific answer but I am looking for a programming language agnostic answer. Something written in plain English/step by step.


texts: Getting vector output segmentation algorithms to work in QGIS

texts:
I am using QGIS 2.0.

I'm trying to run the Watershed Segmentation algorithm, specifically, but I have been receiving the same error message using any of the available segmentation algorithms. I'm new to QGIS and have been running it in OSX 10.9.

The error message I receive says:

  Oooops! The following output layers could not be open
  Output vector file: /var/folders/mq/01l7wc357319d3bxlsfp8n840000gn/T/processing/606c5f7baef84d2c9d91b5fc023a5947/-mode vector -mode.vector.out.shp
  The above files could not be opened, which probably indicates that they were not correctly produced by the executed algorithm
  Checking the log information might help you see why those layers were not created as expected

After checking the log, the OTB execution console output says:

  OTB execution console output
  Segmentation -filter watershed -in /Volumes/New Volume/Thesis/soterra_LCmap/soterra_mosaic -filter.watershed.threshold 0.01 -filter.watershed.level 0.1 -mode.vector.inmask /Volumes/New Volume/hancockseg/hancockrst/hancockmask.shp -mode.vector.stitch true -mode.vector.minsize 1 -mode.vector.simplify 0 -mode.vector.layername layer -mode.vector.tilesize 1024 -mode.vector.startlabel 1 -mode.vector.outmode ulco -mode vector -mode.vector.out /var/folders/mq/01l7wc357319d3bxlsfp8n840000gn/T/processing/606c5f7baef84d2c9d91b5fc023a5947/-mode vector -mode.vector.out.shp

  ERROR: option -mode.vector.out.shp does not exist in the application.

How can I overcome this issue?

As I said, I'm new to QGIS and don't have any experience with open source GIS/RS software in general. My experience has mostly been with ESRI, ERDAS, and IDRISI. I'm very interested in performing some basic segmentation and classification but with a very specific goal in mind which I doubt I could accomplish using the Semi-Automatic Classification Plugin. I'm tempted to give it a try.


texts: Arcpy - Error 010240 - Con statement - can`t save raster dataset with output format GRID

texts:
I am trying to set an "output path" in my Arcpy script in order to not have to repeat the path everitime I want to save a dataset after applying a tool.

So I set the output path like:

  output_path = "C:/PhD/output"

But Python is sending this error message:

  RuntimeError: ERROR 010240: could not save raster dataset to C:\PhD\output with output format GRID

I`ve had a look at the tips given by Slslam in his question bellow

RuntimeError: ERROR 010240 in Con operation in arcpy

So I have separated scratch and output workspaces and I have imported multiprocessing, but it is still not working, as ERROR 010240 keep being sent.

I am using ArcMap 10.2.

Can anyone shed light on this problem, please?

# Import system modules
import arcpy, multiprocessing
from arcpy import env
from arcpy.sa import *

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

# Set environment settings
env.workspace = "C:/PhD/raster"
output_path = "C:/PhD/output"

# Set local variables
inRaster1 = Raster("slope_angle")

# Execute raster calculator to create a slope percentage raster showing values <= 9% and the remaining
#values set to zero

outRas1 = Con(inRaster2 <= 9, 1, 0)
outRas1.save(output_path)


texts: Save a WMS layer on your Hard Drive via QGIS?

texts: Well, here's another question. I'm working on a set of WMS data right now and i wanted to know if you can save it on a Hard drive. I do know that you can save the current view as a georeferenced Tif, but considering the resolution i need and space covered by my workspace i need something a lot faster or i'll be doing this for weeks.


texts:
I am performing an interpolation in R but i get the following results. What could be the issue?
The script

##MySript=group
##rainfall= vector
##output= output raster
    require(sp)
    require(rgdal)
    rainfall
    slotNames(rainfall)
    rainfall@proj4string
    rainfall@data
    att.table = rainfall@data
    class(att.table)
    dim(att.table)
    dimnames(att.table)
    summary(rainfall)
    plot(rainfall)
    require(geoR)
    require(sp)
    require(maptools)
    require(raster)
    require(geoRglm)
    require(rgeos)
    require (rgdal)
    locs=pred_grid(c(35.06,35.72), c(-1.63,-1.0), by = 0.002)
    data1=as.geodata(rainfall)
    plot(variog(data1, uvec=seq(0,1, by = 0.05)))
    LE1=likfit(data1,cov.model="matern",ini=c(0.0002,0.06),
         nugget =0.000002,kappa=1.5)
    KC = krige.control(type = "sk", obj.mod = LE1)
    sk1 = krige.conv(data1, krige = KC, loc = locs)
    map=image(sk1)

The result

require(geoR)
Loading required package: geoR
--------------------------------------------------------------
Analysis of Geostatistical Data
For an Introduction to geoR go to http://www.leg.ufpr.br/geoR
geoR version 1.7-5.2 (built on 2016-05-02) is now loaded
--------------------------------------------------------------

    require(sp)
    require(maptools)
    Loading required package: maptools
    Checking rgeos availability: TRUE
    require(raster)
    require(geoRglm)
    Loading required package: geoRglm
---------------------------------------------------------

A Package for Generalised Linear Spatial Models

geoRglm version 0.9-11 (2017-10-17) is now loaded

-----------------------------------------------------------

require(rgeos)
Loading required package: rgeos
rgeos version: 0.3-26, (SVN revision 560)
GEOS runtime version: 3.6.1-CAPI-1.10.1 r0
Linking to sp version: 1.2-7
Polygon checking: TRUE

    require (rgdal)
    locs=pred_grid(c(35.06,35.72), c(-1.63,-1.0), by = 0.002)
    data1=as.geodata(rainfall)
    plot(variog(data1, uvec=seq(0,1, by = 0.05)))
    variog: computing omnidirectional variogram
    LE1=likfit(data1,cov.model="matern",ini=c(0.0002,0.06),
           nugget =0.000002,kappa=1.5)
---------------------------------------------------------------
likfit: likelihood maximisation using the function optim.
likfit: Use control() to pass additional
arguments for the maximisation function.
For further details see documentation for optim.
likfit: It is highly advisable to run this function several
times with different initial values for the parameters.
likfit: WARNING: This step can be time demanding!
---------------------------------------------------------------
likfit: end of numerical maximisation.
KC = krige.control(type = "sk", obj.mod = LE1)
sk1 = krige.conv(data1, krige = KC, loc = locs)
krige.conv: model with constant mean
krige.conv: Kriging performed using global neighbourhood
map=image(sk1)

writeRaster(output,"C:/PHDproposal/R_spatial/R_Spatial Exx/data/map.tif", overwrite=TRUE)
Error in writeRaster(output, "C:/PHDproposal/R_spatial/R_Spatial Exx/data/map.tif", :
object 'output' not found
Execution halted


texts: Append in Arc.Py could not write value ' ' to output?

texts:
I have a list called list1:

[('C:\\Users\\user\\Desktop\\merge\\output_c\\exports\\r01\\r01.shp',
  'C:\\Users\\user\\Desktop\\merge\\promerge\\r01\\r01.shp'),
 ('C:\\Users\\user\\Desktop\\merge\\output_c\\exports\\wwa\\wwa.shp',
  'C:\\Users\\user\\Desktop\\merge\\promerge\\wwa\\wwa.shp'),
 ('C:\\Users\\user\\Desktop\\merge\\output_c\\exports\\ds\\ds.shp',
  'C:\\Users\\user\\Desktop\\merge\\promerge\\ds\\ds.shp')]

then append what is in the output_c to the promerge

for i,j in list1:
    arcpy.Append_management([i], j, "NO_TEST") #appends first item to the second

gives:

  ExecuteError: ERROR 001156: Failed on input OID 0, could not write
  value ' ' to output field DEC_W Failed to execute (Append).

The field DEC_W is empty and gives error while its is told to be appended. Is it possible to complete the append of its other fields and just ignore the fact that only this field is empty and continue?

This script works fine for all the files and only with this file that has DEC_W empty it doesn't append it. I would like to append all its fields and ignore this specific field that is empty of this file.

UPDATE:

Maybe somehow check if that specific shapefile has empty that field and if it is to delete it before the append? How can I do that?


texts: Leaflet cluster point with same coordinates

texts: i have many points with the same coordinates, for example 5 points in one location. But when i zoom cluster, it is not devided automaticaly, i have to click manualy to cluster circle. It is possible to automaticaly devided markers with the same coordinates when i zoom in ?


texts: How can I know which Sentinel Tile is further north?

texts: Sentinel divides the planet surface into tiles, represented in the figure below. I was wondering if there is a programmatic way to compare two of those tile ids and "calculate" which is further north?


texts: Is there general Earth Projection in ArcGIS for Desktop?

texts:
I'm starting a new personal project and I need a little bit of helping on setting it up.

First off I'm trying to determine the area of a rectangle that is 1 mile in width and the circumference of the earth minus a mile in length(like a great circle minus a mile). I understand I can solve this with an equation but I want to map it.

Anyways I don't know what projection I need for this and how to get started.

Is there a general earth projection in ArcMap? Do I even need a projection if it is the whole earth? Do I need to worry about equal area distortion? and etc.


texts: How to include duplicate samples (same locations, different temporal sampling) in Geographically Weighted Logistic Regression?

texts:
I want to assess local most important predictors for a specific event within a region. The same locations (grid) were all sampled in two different time occasions.
I am assuming predictors to be spatially varying, but temporally stationary.
The problem is that distance matrix calculation fails to run due to duplicate locations.
Is there a way to carry this "atemporal" GWLR, or a workaround, interpreting the two different regression analyses as a global model?

I am running GWmodel, in R.


texts: ModelBuilder error on validating when deleting not yet created gdb

texts: I have a parent model with a submodel nested in it and tools outside the submodel but within the parent model that connect to the submodel.  In the submodel, the first tool is "create geodatabase". In the parent model, the last tool deletes the gdb.  When the model is run (not edit), it looks like the model validates before running and comes up with the error that it cannot find the gdb to delete at the very end.  Obviously this is because the gdb has not yet been created at the beginning of the model.  Is there any way to get around this where it would not validate before running?


texts: How to Force the Showing of Labels of a Vector File in QGIS

texts:
I imported some OSM data. I then label the lines (roads) with their "name" field using the new label layering settings dialog box. When I zoom to different scale levels I find that while all the lines remain, some of the labels appear / disappear. In any particular zoom level if I adjust the size of the text of the labels, more or less labels show (i.e. when I make the text larger less labels show and when I make the text smaller more labels show). While in general this is good because it creates less clutter and keeps labels from overlapping, etc. there are times when I want to see some of these labels and I can't unless I adjust the text size or zoom in further. I also can't find any control over this either.

So, I guess I am wondering if there is a way to force all the labels to show no matter what my text size or scale is. Another option would be a way to turn on a particular label that I wanted. In fact the latter option would be best.

Thanks in advance for any help with this.
David


texts: Quantifying shape of polygon using ArcGIS Desktop?

texts:
I want a quantification technique to differentiate different shapes of polygons. For example, the following image consists of 3 seperate polygons, e.g., (a) is stretched to its tails, (b) is bowl shaped, and (c) is a complex polygon.

Is there any geometrical way to differentiate these phenomenon?

For instance, if I want to segregate only the bowl shaped polygons, what would be the technique in GIS?

I dont want to use any kind of pattern recognition techniques, just looking for a geometrical solution in ArcGIS.


texts:
Code :

>>> import arcpy
>>> ras1 = arcpy.Raster(r'D:\IMD\test_converted1961.img')
>>> ras2 = arcpy.Raster(r'D:\IMD\test_converted1961_fliped_ud1.img')
>>> result = CellStatistics([ras1,ras2], "RANGE", "NODATA")
Runtime error
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'CellStatistics' is not defined
>>>

I have refered to the example in the tool help


texts: MongoDB: Faster alternative to a basic $geoIntersects query

texts:
I've got a whole bunch of political boundaries defined in a MongoDB collection, which are (as you might guess) very complex polygons, with thousands of points.

One of the queries I need to run is to retrieve all the boundaries which overlap a rectangular map extent. Right now I'm just running a $geoIntersects query on the polygons, which are 2dsphere-indexed.

Since it's OK if the occasional polygon which doesn't actually overlap the map gets included by accident, I know I could just add a bounding-box property to each document which contains a simple rectangular boundary that includes the whole polygon, then index and run my $geoIntersects query against the boxes. But I'd prefer, if possible, to avoid having to add another property to the documents.

Is there a simpler/more efficient way to do this? Or is the bounding box idea the best option?


texts: How can I clip a multiband raster and preserve the band names?

texts:
I have a Landsat 8 image which I clipped with a polygon shapefile. It works fine, but I'd like to preserve each band name in order to improve my workflow speed. The output raster saves each band as "clip1", "clip2"... and so on, what I'm looking for is something like "Blue", "Green", etc.

I'm working with ArcGIS 10.3 for Desktop.