texts: Is WGS 84 datum, coordinate reference system, or both?

texts:
The background to this question is in Understanding difference between Coordinate System and Projection?

There @mdsumner commented:

  WGS84 is not a cs, it's a datum.

On a couple of places online I have found: "WGS84 geographic coordinate system" mentioned. Is this an incorrect terminology?

WGS84" is a datum, but "WGS84" is also a geographic coordinate system defined by the "WGS84" datum?


texts: Automatically adding date to attribute table in ArcGIS 10.3.1 for Desktop?

texts:
I am using ArcGIS 10.3.1 for Desktop.

I am working on a polygon layer in GDB file and i want that every feature that have been created in the map will be the date of creation (date and datetime). I created a field named "date" and choose "Date" in the Data Type

but the problem is that when i digitized a polygon in the map, the date hasn't added to the attribute table:


texts: Creating "oblique bounding box" with maximum width/height ratio?

texts:
I would like to create a surrounding rectangle with maxiumum width/height ratio ("oblique bounding box") from a set of input features as shown in the image below:

E.g. the PostGIS functions ST_Envelope and ST_Box2D as well as FME Transformers BoundingBoxReplacer and BoundingBoxAccumulator generate axis parallel bounding boxes.

Any suggestions using approaches with PostGIS, QGIS or FME greatly welcome!


texts: ESRI Converting JSON Object to Polygon Object

texts:
I am using require.js

// output of polygonString is
// {"spatialReference":{"latestWkid":3414,"wkid":3414},"rings":[[[18240.432900000364,43817.389900000766],[18214.047899999656,43880.139900000766],[18303.02390000038,43896.1548999995],[18316.83990000002,43898.6389000006],[18331.732900000177,43815.97389999963],[18247.076899999753,43800.71189999953],[18240.432900000364,43817.389900000766]]]}
var polygon = JSON.parse($parameters.polygonString)

I am trying to convert the JSON object to a ESRI Polygon object, I had tried the following:

(1)

//doesn't seems to work
var new_polygon = new window.ArcGIS.Polygon({
      fromJSON: polygon
});

(2)

//return fromJSON is not a function
var new_polygon = new window.ArcGIS.Polygon();
console.log(new_polygon.fromJSON(polygon));

What is the correct way to use fromJSON?


texts: Is it possible to create OGC wms service based on the arcgis mxd file and data in java

texts:
We are trying to create a OGC wms using J2EE, and we know there  are some opensource solution, like geoserver-wms. However most of them will use the SLD to render the data to an image. Which does not meet our requirement.

Then I wonder if we can read the mxd file in java and generate data according to the wms parameters?

Update:

We have arcgis engine license.

Since we are trying to create a OGC WMS servcie, so we will have to generate an image and return it to user.


texts: Converting an Experian (Geoconcept) file to GPS coordinates

texts:
I'm working with a file containing Experian data which was used in Geoconcept.

The file describes a serie of microzones, that is polygons. Unfortuntely the coordinates system is hard to understand:

    2116944 602039  2116760 602084  2116700
602124  2116670 602169  2116600 602240  2116420 602269  2116320 602360

How can I convert the data to GPS coordinates?


texts: Efficient arcpy method of points in polygon

texts:
Coming from a background of Mapinfo and Manifold, I frequently find myself frustrated with the ArcGIS SQL toolset. In both these former programs it is trivial to write a query asking, for instance, how many points fall within each polygon. This can be filtered using where clauses, e.g. all the points of type a within each polygon and then all tbe points of type b within each polygon. Since the query result is an in-memory table, it is quick and uses up very little disk space.

By contrast, Spatial Join in ArcGIS seems quite slow, possibly because of disk IO, uses up more disk space than necessary, and I personally find it cumbersome.

I know there are alternatives, Hawths Tools for instance, but I was trying to do something in arcpy. My first thought was to loop through each geometry in both the polygon set and point set and test whether the point was contained by the polygon. This would then enable all sorts of things to be calculated. I wrote a test that just looped through all the points for one polygon:

import arcpy
arcpy.env.workspace = r"path\to\workspace"
print "Start"
geom = arcpy.Point(530000,180000)
cursor = arcpy.SearchCursor("FCName")
for rowid in cursor:
     poly = rowid.Shape
     if poly.contains(geom):
          print rowid.OBJECTID

However, this takes a few seconds for each polygon, so with a dataset size of 4,000 polygons, I don't think this is going to work particularly quickly.

Does anyone have any ideas for making this more efficient, or a function that I'm missing?


texts: Image Export fails in Google Earth Engine because "export region contains no valid (un-masked) pixels

texts:
I want to export Sentinel-2 mosaics for rectangular ROIs. For this, I intend to use a script following this example: https://code.earthengine.google.com/ce1a151ce06497b20cf1793715cb0120

However, whenever I want to run the export task in the "Tasks" manager, I receive the following error after some time: "Error: Export region contains no valid (un-masked) pixels."

This leaves two questions:

1) Why are there no images for the right half of the ROI? The ImageCollection actually contains 9 images. Is that a Sentinel-2 inherent problem?

2) How can I deal with this situation when automated exporting is the goal? I can imagine two general options:
a) Export the image anyway (e.g. with the non-covered pixels set to NaN) - but how will GEE let me do this? b) Apply a check if such "empty" pixels are contained in my mosaic image. (Unfortunately, I have no idea how to achieve this.)


texts:
I have two heat-maps and related point data layers, one of correspondent sender addresses, the other of recipient addresses. I wish to identify clusters -- hotspots -- of sender and receiver addresses.

In QGIS, can I create a heat-map from the two point layers to show densities (the Heat-map Plugin only accepts one vector input layer)? Or can I combine the two heat-map rasters to show the coincidences of data?

(QGIS 2.12+)


texts: from Qgis 2.2 to Garmin Base Camp: how to get rid of the white frame?

texts:
I have geo-referenced a raster map in QGIS 2.2 (with the georeferencer plugin) and I can also create a kmz file for my garmin (Dakota20) with GarminustomMap. However the kmz file, as imported in Base Camp, has a white frame around and in spite of many trials (change transparency, change file type both in input and output, clip a portion to have a straight map etc etc) I couldn't  avoid that. This seems to be the white border around the image appearing in Qgis.
I have been googling for dayds, but I didn't find anything.
I am a beginner, please can you help?
Many many thanks
Carla


texts: Compare two layers and just select the unequal datasets

texts:
I have two layer (lineshapes from OSM) with the same attributenames. But one of the layer includes more datasets. Now I want to create a query that compares both attributetables and put out/ select only the unequal datasets. So i want to get a atributetable with all the datesets, which not included in both shapes.

But i don't know how to do it, because the atributename in both layer are the same.

for example:
the first atributetable includes 110000 datasets.
the second atributetable includes 130000 datasets.

So i want two compare the atribute "osm_id" in both layer. the result should be all osm_id's which just include in one of the layer.


texts: Selecting features of layer based on meeting length requirements within another layer?

texts:
I'm trying to select roads from one line layer, where 1/3 of their miles are within another polygon layer.

I can't figure out the logic necessary, such as Select * from route_data Where (1/3 of their length?) are within Population_blocks layer.


texts: Is there any tool to reproject x,y coordinates, apart from Proj4?

texts:
I have a JEE project (Java, JBoss) and I'm looking for a library that allows x,y coordinates reprojection.

I know about Proj4. Do you have any other option?

Is it possible to find on the net a reprojection algorithm that I could use?

The reprojection I'm interest in is the French NTF Lambert II Etendu to RGF Lambert 93.


texts: Find the number of sides that intersect between two or more polygons

texts:
I am currently struggling to find the number of sides that intersect between two or more polygons in a layer, the layer contains around 2700 polygons. All polygons have a rectangular form, as it can be seen it in the following picture. The picture is a small part but everything looks more o less the same

I have tried using intersection function, but I don’t seem to have proper results, or at least the ones I expected.

In the picture there are numbers on some polygons (I put them there just to explain better), what I want to do is:

For the polygon 1, I would have just one side that intersect with other polygons
For the polygon 2, I would have 2 sides that intersects with other polygons
For the polygon 3, applies the same as polygon 2
For the polygon 4, I would have just one sides that intersects with other polygon
For the polygon 5, applies the same as polygon 4

In other words:

Polygon Sides
1   1
2   2
3   2
4   1
5   1

Does anyone have an idea how to achieve this using GeoPandas or similar moduls?


texts: Placing Excel Data in ArcMap/ArcScene similar to Image Georeferencing

texts:
I have XYZ-dataset of Temperature Data in Excel, with no (Lat, Lon) added.

Every time when I try to display the Data in ArcScene the Programm tells me, that a Spacial Reference is missing (of course). That means I am unable to visualize the dataset in the right environment.

Is there anyway, especially in ArcScene to place the dataset in the same way in which it is done with Georeference Images?

Long story short, is it possible to Georeference a Layer, that do not contain (Lat, Lon)-Datapoints?

Edit: The Rasta is located in Zürich (Swiss). You are right, my Excel Data is in XYZ Data. It is a four coloum set (X-Coordinate, Y-Coordinate, Z-Coordinate and Temperature Value)


texts: I cannot find osr after installing OSGeo4W package

texts:
I wanted to be able to import OSR from GDAL on my Python 2.7 (Anaconda) Windows 7 64-bit. I installed OSGeo4W after reading this post and eventually I'd like to import osr

from osgeo import osr

However, I cannot find any osgeo or osr after installing osgeo.

The other option would be installing GDAL from here but it says that "Do not use together with OSGeo4W".

How can I import osr after installing OSGeo4W?

I downloaded 64 bit version under Quick Start for OSGeo4W Users from https://trac.osgeo.org/osgeo4w/wiki not from https://trac.osgeo.org/gdal/wiki/GdalOgrInPython. Perhaps that is causing the problem.


texts: How can I access the different classes after I did a classification in Google Earth Engine

texts:
So I ran a Classification with Google Earth Engine, classifying forest and non-forest. After I prepared my ROI and declared some training points for each forest and non-forest (saved in the variable newfc) I ran the randomForest classification.
The result is okay but my question now is if can access the variable classified to e.g. mask only the area that was classified as forest. I tried several things but can't find a solution for my problem.

Code:

var collection = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA')
  .filterDate('2015-02-01', '2015-12-01')
  .filterBounds(roi)
  .filter(ee.Filter.lte('CLOUD_COVER', 1));

var bands = ['B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7']
var composite = coll.mosaic();
var img = composite.clip(roi);

var newfc = forest.merge(no_forest);

var training = img.select(bands).sampleRegions({
  collection: newfc,
  properties: ['class'],
  scale: 30
});

var classifier = ee.Classifier.randomForest().train({
  features: training,
  classProperty: 'class',
  inputProperties: bands
});

var classified = img.select(bands).classify(classifier);

Map.addLayer(classified, {min:0, max: 1, palette: ['green', 'black']}, 'Forest-Classification');


texts: GeoServer v2.5.2, webadmin, missing WMS and styles menu

texts:
After installing GeoServer v2.5.2 we are missing the Styles and WMS menus.
Does anybody seen this, have a clue whats wrong?

(The WMS server is working, just the webadmin interface not working.)

EDIT some more details about installation:

MS Windows Server 2008 R2 Standard 64-bit SP1
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)

GEOSERVER_HOME=C:\GeoServer\2.5.2
XX:MaxPermSize=512m
Initial Java Heap Size 512MB
Maximum Java Heap Size 1024MB

GeoServer is installed from zip-archive
Extensions: mysql, gdal, dxf-core
Only 1 small tweak to: OpenLayersMapTemplate.ftl
Installed as Service with Wrapper v3.5.19
Same type of installation as with previous versions (se directories below, all worked fine, only 2 or 3 versions live)


texts: Arc ASCII Grid output problem in QGIS 2.0

texts:
I used to convert tif files to ascii in Qgis 1.8 using gdal translate without having any problems with the output i.e. I have the normal heading and values. When I upgraded to 2.0 I started to get the output below (second image) which do not have the normal headings and values. The ascii grid output looks okay when loaded in Qgis but it seems broken when you check it on Textedit/Notepad/Terminal. I tried to convert the tif file using a newly installed Qgis 2.0 on windows, mac and ubuntu but they have the same results. Any ideas how to fix it?

I used the data from worldclim http://www.worldclim.org/ as sample.

Ascii output from Qgis 1.8

Ascii output from Qgis 2.0


texts: use mapnik to read from multiple geotiffs

texts:
I set up Mapnik to custom-render a GeoTiff file. python and xml files to do so were taken from a github mapnik example, and the successful image output  is a rainbow-esque .png from the original .tif.  Excellent.

All works fine, but now the question is: how can I configure Mapnik (either the python, xml or otherwise) to consider multiple .tif files when rendering images?  These won't be overlapping tifs that contain different sets of information, but rather geographically-adjacent tifs that contain the same type of information. Together, they will cover a larger geographical area.

For larger context: my goal is to download all SRTM files (there are 1000s) and store them in a single directory. Using mod_tile, Mapnik, and whatever other bits of software I need, I want to be able to generate tile images of the SRTM data for consumption by a map in a browser (e.g. Leaflet, Google Map).  mod_tile will be used for caching, but I will need to use Mapnik to generate images on the fly according to certain user preferences (e.g. user may be able to specify their own color bands for the elevation data).

How do I best make Mapnik consider multiple side-by-side GeoTiffs, when generating tiles?  Is that even possible?  do I have to create a single (massive) GeoTiff by stitching all of the SRTM files together?  GDAL virtual format?

I may be looking at the problem the wrong way, as I am new to Mapnik and creating tiles - please let me know if I am.

Here is the python code:

import mapnik
mapxmlfile = 'raster_colorizer_small.xml'
outputfile = 'raster_colorizer_test.png'
m = mapnik.Map(800, 600)
mapnik.load_map(m, mapxmlfile)
m.zoom_all()
mapnik.render_to_file(m, outputfile)

And here is the raster_colorizer_small.xml file:

<Map background-color="white" srs="+init=epsg:32630">
  <Style name="DISCRETE RAINBOW">
    <Rule>
      <RasterSymbolizer>
        <RasterColorizer default-mode="discrete" default-color="white" >
            <stop color="red"    value = "0"  />
            <stop color="orange" value = "5"  />
            <stop color="yellow" value = "10" />
            <stop color="green"  value = "15" />
            <stop color="blue"   value = "20" />
            <stop color="indigo" value = "25" />
        </RasterColorizer>
      </RasterSymbolizer>
    </Rule>
  </Style>
  <Layer name="dataraster" srs="+init=epsg:32630">
      <StyleName>DISCRETE RAINBOW</StyleName>
      <Datasource>
          <Parameter name="file">../data/dataraster.tif</Parameter>
          <Parameter name="type">gdal</Parameter>
          <Parameter name="band">1</Parameter>
      </Datasource>
  </Layer>
</Map>


texts: How do you draw a polygon (programmatically) on an ESRI map? [WPF]

texts:
I would like to programmatically draw a polygon on an ESRI map. I'm using this code to draw a polygon with the mouse but I'm really new to this technology and I'm a little bit lost ...
Here is my MainWindow :

public partial class MainWindow : Window
{
    Draw _myDrawObject;
    private GraphicsLayer _graphicsLayer;

    public MainWindow()
    {
        InitializeComponent();
        _myDrawObject = new Draw(esriMap)
                           {
                               FillSymbol = LayoutRoot.Resources["RedFillSymbol"] as FillSymbol
                           };

        _myDrawObject.DrawComplete += MyDrawObjectDrawComplete;
    }

    private void EsriMapMouseClick(object sender, Map.MouseEventArgs e)
    {
        _myDrawObject.DrawMode = DrawMode.Polygon;
        _myDrawObject.IsEnabled = true;
    }

    private void MyDrawObjectDrawComplete(object sender, ESRI.ArcGIS.Client.DrawEventArgs args)
    {

        var graphic = new Graphic()
                              {
                                  Geometry = args.Geometry,
                                  Symbol = LayoutRoot.Resources["BlueFillSymbol"] as FillSymbol
                              };

        _graphicsLayer = esriMap.Layers["MyGraphicsLayer"] as GraphicsLayer;

        if (_graphicsLayer != null)
            _graphicsLayer.Graphics.Add(graphic);

    }

I already went to the ArcGIS help site (http://resources.arcgis.com/content/web-based-help) but i can't find the solution.  Any ideas or tips ?

Feel free to ask me some questions if you want more details!


texts: How to convert floodplain inundation results from a Hec-Ras model into Google Earth?

texts: Having run a Hec-Ras 4.1.0 model, I wish to show the results in Google Earth. How is this possible and is it possible to do this by using ArcMap 10.1?


texts: Apply a color ramp to vector layer using PyQGIS3

texts:
I'm trying to apply a color ramp to a QgsGraduatedSymbolRenderer in PyQGIS 3 (QGIS 3.8) using the following code:
Getting the QgsGradientColorRamp:
myStyle = QgsStyle().defaultStyle()
defaultColorRampNames = myStyle.colorRampNames()
ramp = myStyle.colorRamp(defaultColorRampNames[-6]) #Spectral color ramp

Applying it to the QgsGraduatedSymbolRenderer:
myRenderer = QgsGraduatedSymbolRenderer('', myRangeList) #A list of break values
myRenderer.setSourceColorRamp(ramp)
myVectorLayer.setRenderer(myRenderer)
myVectorLayer.triggerRepaint()

Unfortunately the layer still shows in its original colors without the color map being applied. Upon looking in properties, however, oddly enough the color map is applied partially. The color map selected is indeed the one chosen ('Spectral'), but this isn't applied to the values' symbols. If I then just click on the color ramp and reapply it, it works, but I'd like to achieve this all through PyQGIS. I looked at similar questions here and the QGIS3 Python API and couldn't find a solution.


texts:
Which software can I use for mapping of underground utilities? I am using GRED for marking of utilities & then transferring it to AutoCAD.

Now I would like to load this AutoCAD file into a GIS. Can any one suggest a GIS package that can read these files and give me some hints on how to do it?


texts: Which is the most accurate method of measuring distance?

texts:
I aim to analyse the accuracy of the various methods of geodesic calculations (distance between two points on Earth)based on the three assumed models of Earth - flat, spherical & ellipsoidal.
I need a reliable index to compare my results to measure for accuracy. Will using the WGS84 geoid with Vincenty's formula yield the most accurate results?


texts: Align unreferenced TIFF with GeoTIFF in QGIS

texts:
I'm working in QGIS. I have two TIFF files of the exact same dimensions, but one of them is georeferenced and the other isn't. I'd like to import the non-georeferenced file so that it aligns exactly with the georeferenced one, pixel for pixel. Using the georeferencer with GCPs is not precise enough. Is there a way to transfer the georeferencing info from the GeoTIFF to the unreferenced file?

This is the same question as here, except in my case, the georeferencing data seems to be embedded in the .tif file. I'll accept even solutions that require manually adding the data (CRS, origin, pixel size) into the unreferenced file. I'm just not familiar with the format so I'm not sure where to start.


texts: Adding text background color using ArcPy?

texts:
Is possible to add text background color using python on ArcGIS (ArcMap 10)?

I wrote a function that able to change font color of the string but I want to add background color to it as well

def changeColor ([s1]):
  return "<CLR red = '255'>" + [s1] + "</CLR>"

Following links show me how add background color manually http://resources.arcgis.com/en/help/main/10.2/index.html#/Creating_text_symbols/00s60000000z000000/

Is there a way that I can write a python script instead of doing manually?


texts: How to use the points which come from the leaflet file layer plugin?

texts:
I am using leaflet file layer plugin.I have added a kml file which includes some points. I want to do sth by using these points. But I don't know if the plugin saves this data or not. How can I use these points?

https://github.com/makinacorpus/Leaflet.FileLayer/issues/24

In the link you can see what I mentioned.


texts:
Basically I want to run a select analysis on each individual row in a shapefile, then output unique shapefiles. After, I want to use each shapefile that's been output and stored to clip one particular shapefile. Right now my code doesn't do anything and I'm not sure why.
Here's what I have:

import arcpy
from arcpy import env
arcpy.env.overwriteOutput = True
outputpath = "C:/Users/Documents/HWGDB.gdb/Co_"
clipper = "C:/Users/Documents/HW2_shpfiles/OuterCountiesFull.shp"
ABV_list = ["ClT", "LBT", "FT", "CnT", "MrT", "AB", "CT", "MtB", "AkB", "DB", "EbT", "PT",
            "WCT", "BT","LT", "PsT", "DT", "EDT", "EnT", "PvT", "QB", "SB", "ST", "WET",
            "CyT", "WDT", "SsT", "CsT","BrT", "LB", "WwT", "MB", "CrB", "SdT", "EET",
            "THB", "ECT", "MJT", "EGT", "MJB", "RT", "EB","ET", "ET", "NHB", "EbB"]
for abv in ABV_list:
   arcpy.Select_analysis(clipper,outputpath + abv, "'ABBREVIATI = ' + abv")
      print "complete"


texts: Python upload to service fails in FME but works in ArcGIS

texts:
I have added a shutdown Python script to my FME workbench to publish the TIFFs written as a service.
import fme
import arcpy
AGSconnection = "W:\\Entity\\ABZ\\myfolderpath\\gbepabz-file.name.ags"
print fme.featuresWritten

layerlist = []
mxd = arcpy.mapping.MapDocument("\\\\gbepabz-aqgis02\\OWProcessing\\temptest\\TEMPLATE.mxd")
df = arcpy.mapping.ListDataFrames(mxd)[0]
sr = arcpy.SpatialReference(23031)
df.SpatialReference = sr
mxd.activeDataFrame.spatialReference = sr

for tiff in fme.featuresWritten:
    filepath = "\\\\gbepabz-apgis01\\ArcGisServer_data\\Vendor\\Sentinel\\"+tiff+".tif"
    tifflayer = arcpy.MakeRasterLayer_management(filepath, tiff)
    #addlayer = arcpy.mapping.Layer(tifflayer)
    #layerlist.append(tifflayer)
    layerfile = "\\\\gbepabz-apgis01\\ArcGisServer_data\\Vendor\\Sentinel\\"+tiff+".lyr"
    arcpy.SaveToLayerFile_management (tifflayer, layerfile)
    addlayer = arcpy.mapping.Layer(layerfile)
    arcpy.mapping.AddLayer(df,addlayer)
    print filepath
mxdpath = "\\\\gbepabz-apgis01\\ArcGisServer_data\\Vendor\\Sentinel\\temp3.mxd"
print mxdpath
mxd.saveACopy(mxdpath)
df.SpatialReference = sr
mxd.activeDataFrame.spatialReference = sr
mxd.save()
sddraftpath = "\\\\gbepabz-apgis01\\ArcGisServer_data\\Vendor\\Sentinel\\sentinel.sddraft"
SDpath = "\\\\gbepabz-aPgis01\\ArcGisServer_data\\Vendor\\Sentinel\\sentinel.sd"
service = "Sentinel"
arcpy.mapping.CreateMapSDDraft(mxd, sddraftpath, service, "ARCGIS_SERVER", AGSconnection, "FALSE", "GENERAL")
arcpy.mapping.AnalyzeForSD(sddraftpath)
arcpy.StageService_server(sddraftpath, SDpath)
arcpy.UploadServiceDefinition_server(SDpath, AGSconnection, in_startupType="STARTED")

When this runs at the end of my workbench I get an error on the analyser.

Python Exception : ERROR 001272: Analyzer errors were
encountered (codes = 179, 179, 179, 179). Failed to execute
(StageService).

Online I've found that this error code means that the data is not registered with the server. It is on the server and registered with the server. It is in the same directory as other data that have been successfully published.
If I then open temp3.mxd and run the following
mxd = arcpy.mapping.MapDocument("CURRENT")
AGSconnection = "W:\\Entity\\ABZ\\myfolderpath\\gbepabz-file.name.ags"
sddraftpath = "\\\\gbepabz-apgis01\\ArcGisServer_data\\Vendor\\Sentinel\\sentinel.sddraft"
SDpath = "\\\\gbepabz-aPgis01\\ArcGisServer_data\\Vendor\\Sentinel\\sentinel.sd"
service = "Sentinel"
arcpy.mapping.CreateMapSDDraft(mxd, sddraftpath, service, "ARCGIS_SERVER", AGSconnection, "FALSE", "GENERAL")
arcpy.mapping.AnalyzeForSD(sddraftpath)
arcpy.StageService_server(sddraftpath, SDpath)
arcpy.UploadServiceDefinition_server(SDpath, AGSconnection, in_startupType="STARTED")

It will sucessfully publish the service. The Analyze for SD step gives warnings but no errors.
The whole point of the process is to work without any manual intervention so I need to get this workiing from FME.
Is it a difference in the Python interpretation, or is ArcGIS Server easier to work with from ArcMap?


texts:
In qfield, I cannot get gps information to work. If I press the gps button, the map freezes and cannot be moved any longer. The gps status bar does not show any positioning value (X: N.a. ...). Without positioning information qfield works fine, but accurate positioning information is a crucial feature of a gis for field use.

I am using qfield 1.0.0-rc5 on a samsung tablet (galaxy tab active2, Android 8.0). The tablet's gps does its job. I have tested it with different apps. The CRS of the gis project is EPSG:25832 (ETRS89/UTM zone 32N) and the original qgis project was synced with qfieldsync (QGIS Version: 3.6.0.).
I have no idea what's going wrong.


texts: How to fill empty pixel from DEM using QGIS?

texts:
Is it possible to fill empty pixel from DEM (hgt file)?) in QGIS ? When I load it, and zoom to a big scale, some pixel without any value appear.  ( I have found a way using another software 3DEM on this link in french
http://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Atelier_graphique/Didacticiels_cartographiques/Didacticiel_de_cr%C3%A9ation_de_carte_du_relief_bitmap
But is it possible with Qgis 2.6 Brighton to fill them ?


texts:
Last night we were moving from point 'A' to point 'B'. We are quite familiar with the road way and the directions, but not so sure. So just for the confirmation we tried to use the Google maps and the Nokia maps (provides a better directions here in India). And not so surprisingly both the services failed to provide even near matching directions. We were just a half KM away (roadway tww lanes each side) from the destination and Google maps was like a destination is 27Km away. Nokia maps was a little closer with 11 Km of travel.

On this problem a little idea stroked back in my mind, Following are the details

We all travel from some point 'A' to some point 'B' on a daily basis, and as we live in that region and/ or travel frequently on the same path we probably have found the shortest path for the destination.
Generally 60% of us do carry a location aware device with us daily. Be it a Cell phone tablet or any such device with GPS capabilities.
Here I am assuming that both point 'A' and point 'B' are well known points(on any map service google, apple microsoft any) and or we get some identification information about those points either from user or preinstalled devices or anything

Is it possible to record the path/directions we took and share same with rest of the world. Other people would search for directions between point 'A' and point 'B' and we could return a shortest path we have recorded or a list of all.
Is it doable?
What all problems we may face here?


texts:
I have some grib files that I converted to csv. I would like to view the data in a table using the lat, lon, and variable as column headers.  How can I do this using the grid data/dimensions within the file?  In other words, I don't know how to assign each data point(var1) it's corresponding lat/lon point.  Right now I have a Excel table full of data with 1441 rows/2880 columns.

  dimensions:
    lon = 2880;
    lat = 1441;
    time = 1;
  variables:
    int LatLon_Projection;
      :grid_mapping_name = "latitude_longitude";
      :earth_radius = 6367470.0; // double

    float lat(lat=1441);
      :units = "degrees_north";

    float lon(lon=2880);
      :units = "degrees_east";

    float var1(time=1, lat=1441, lon=2880);
      :long_name = "variable1";
      :units = "";
      :missing_value = NaNf; // float
      :grid_mapping = "LatLon_Projection";
      :coordinates = "reftime time lat lon ";
      :Grib_Variable_Id = "var1";
      :Grib2_Parameter = 0, 20, 132; // int


texts: ModelBuilder tool not working but standalone works

texts:
I have a Model built that iterates through a GDB of rasters. The first tool is to Times the raster by 1000 to bring, then convert it to an interger for Euclidean Allocation. But the Times tool doesn't return the proper values, I tried with Raster Calculator as well and it created the same results. So, if I'm expecting high = 4560000 and low= 122.102 it actually returns -3.9999999 for both high and low values of the raster.

But when I use the standalone Times or Raster Calculator I get the results I need.

What is the difference between the tool in ModelBuilder vs. standalone?


texts: How to dynamically change images in map reports?

texts:
I need to make a report about several cadastral parcels which data are contained inside three different tables of a database. Report must contain:

Cadastral data taken from the three tables
A photograph of the front of the building (these photos are .JPG images contained in a folder)
View of the cadastral cartography over the ortophoto centered in the cadastral parcel

In order to make these reports, I have created one template in the QGIS map composer. To obtain the reports easily and fast, I though to program in PyQGIS a script that change the strings, the images and the view of the template depending the cadastral reference.

I found how to change the map view and the strings, but I don't know how to change the photos of the buildings. These photos have the format "CADASTRAL REFERENCE".jpg, so, knowing the cadastral reference is easy to find the right photo in the folder.


texts: If/then statement with layer definition query

texts:
I created a short script which creates a layer from a table view, applies a definition query (hereafter DQ) to that layer, then uses that layer to generate a report. The script works perfectly except for in cases where the DQ results in an empty layer (i.e. no records in the SDE table satisfy the query). When this happens, the script results in an error message. This would not bother me, except for the fact that this script is primarily used by a fellow co-worker who has little background in GIS. I would prefer that instead of getting an error message, he/she gets a statement saying something like "no records found for this report, report cannot be generated."

With the help of someone on this forum, I have come up with an updated script with an if/then statement. This script works exactly as it should, but only when run in IDLE. I have created an ArcGIS toolbox, added a script to that toolbox, and referenced the Python script through the toolbox script. When I run this tool through the toolbox script in ArcCatalog, I receive an error. Why does this tool work perfectly in IDLE, but not in ArcCatalog? Perhaps I am using a command that ArcGIS does not recognize? I will include the updated sript and the error message below. You will see below that the script is failing after the line arcpy.AddMessage('1') but before the line arcpy.AddMessage("Parameters set, generating report").

#THIS SCRIPT WILL GENERATE AN INSPECTION REPORT FOR APPROACHING DEADLINES

#DEFINE PARAMETERS
import arcpy, os, datetime
from arcpy import env
arcpy.env.overwriteOutput = True
arcpy.env.workspace = r'filepath'
today = datetime.date.today()
Str_today = str(today)
where_clause = "OPEN_ = 'Y' AND ( NOTICE_DEADLINE >=" + "'" + Str_today + "'" + "OR NOTICE_DEADLINE2 >=" + "'" + Str_today + "'" + "OR NOTICE_DEADLINE3 >=" + "'" + Str_today + "'" + ")"

#BUILD LAYER FOR APPROACHING DEADLINES
mxd = arcpy.mapping.MapDocument(r"filepath.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "")[0]
lyr = arcpy.mapping.ListTableViews(mxd, "", df)[0]
lyr.definitionQuery = where_clause
arcpy.AddMessage('1')
DQ_Result = arcpy.GetCount_management(lyr)
Count = int(DQ_Result.getOutput(0))
arcpy.AddMessage("Parameters set, generating report")

#GENERATE REPORT FOR APPROACHING DEADLINES
if (Count == 0):
    arcpy.AddMessage("No records exist for this report, cannot generate report")

else:
    arcpy.mapping.ExportReport(lyr, r"filepath.rlf", r"filepath.pdf")
    del mxd
    os.startfile(r"filepath.pdf")
    arcpy.AddMessage("Report generated and in appropriate file")
    arcpy.AddMessage("Tool Complete")

Here is the error message I receive in the ArcCatalog result box when I try to run the script. It is not very helpful.

Executing: Deadlines
Start Time: Thu Sep 22 08:18:31 2016
Running script Deadlines...
1
ERROR 000714: Error in script Deadlines.
Error in executing: cmd.exe /C Q:\GIS_MA~1\BUILDI~1\INSPEC~1\DO_NOT~1\Scripts\DEADLI~1.PY  "#"

Failed to execute (Deadlines).
Failed at Thu Sep 22 08:18:40 2016 (Elapsed Time: 9.10 seconds)


texts: What is the correct way to handle assembly resolution in .NET ArcGIS add-ins?

texts:
This has been a thorn in my side for some time now -- in .NET ArcGIS add-ins, assembly dependencies packaged with the add-in are often not resolved correctly. I am still not sure why and under which circumstances this happens but there are a couple of examples (1, 2) on this site, and I have run into several others involving reflection and WPF/XAML resources.

Presumably this is happening because add-ins run in the ArcGIS application's AppDomain, whose assembly probing path is that of the folder containing the application executable, not the add-in. If you use fuslogvw to log assembly binding failures you'll see that it is probing e.g. C:\Program Files\ArcGIS\Desktop10.0\Bin for your assemblies, which will obviously never work with assemblies packaged in your add-in, which are extracted on app startup to e.g. %USERPROFILE%\Local Settings\Application Data\ESRI\Desktop10.0\AssemblyCache\<{Add-In Guid}>.

Some workarounds I have seen include handling the AppDomain.AssemblyResolve event and explicitly forcing a referenced assembly to load by referencing a type defined within that assembly, e.g. var dummy = typeof(SomeTypeInReferencedAssembly);. The latter is what I have settled on doing since it is simple enough, but it seems tacky.

The former seems fragile, especially when you have the potential for multiple add-ins needing to do the same thing. Is there not potential for them to mishandle the others' AssemblyResolve events, since they are all in the same AppDomain?

Why did ESRI not provide an AppDomain for each add-in so they automatically get the correct probing path and avoid all this trouble? What practice does ESRI recommend in this situation?


texts: Difference between TileStache and Geoserver?

texts:
I have troubles to understand the differences between TileStache and Geoserver.

My goal is to serve tiled geoJson through a restFull API and consume it with Leafet.

Which one is the best for this use case? Is one faster than the other?


texts: Google Earth Engine - how to set masked pixels to 'noData'

texts: Lets say I have a region of mangrove forests (from a classified Landsat image) and I mask out all non mangrove pixels. I view this as a layer on the map and it shows the mangrove forests on the map hugging the coastline. Next, lets say I want to take a random sample of these mangrove pixels. As far as I can tell, this isn't possible, as when setting the parameters for a random sample, the 'whole image footprint' is considered, therefore giving most of the random samples as masked pixels. How can I set masked pixels as noData so when doing a random sample for a 'non-square' image that only the unmasked pixels are sampled. I've included a picture for clarity. Essentially I want the random samples to fall only within the mangrove forest, no for the 'whole image footprint'. I could do a stratified random sampling approach, whereby the sample points only fall within a class of my choosing, but I'm doing this for the whole of Indonesia, which returns a timeout.


texts: Can I classify graduated symbology ranges by current render extent?

texts:
I have a layer with population densities for tracts for an entire country and I want to graduate the symbology with a color ramp to show areas of relatively high or low population densities. The graduated symbology option that creates x classes by whatever mode (equal interval, equal count, etc.) looks great, but the problem is that some parts of the country are more densely populated than others, leading a misleading visualization when considering less densely populated areas.

Is there a way to set the symbology so that it dynamically reclassifies the layer symbology based on the current render extent? E.g. the maximum value for population density for the entire country is something like 10,000 persons/km2. So when rendering the entire country, it makes sense for the color ramp to scale with 10,000 persons/km2. But if I zoom to a town where the maximum tract population density is 1000 persons/km2, I want the darkest color to represent the local maximum.


texts: arcpy.da.updatecursor to delete duplicate rows where values switch columns

texts:
I'm trying to dissolve polygons using polygon neighbors in arcgis 10.1, but don't want to use duplicate rows. However, the field values will switch when they're duplicated.

If I run this:

arcpy.env.workspace = "C:\Users\Ant\Documents\ArcGIS\ITN.gdb"
fc = r"BLPUs_PolygonNeighbors"
fields = ["src_OBJECTID","nbr_OBJECTID"]
with arcpy.da.SearchCursor(fc,fields) as cursor:
   for row in cursor:
      print "{0}, {1}".format(row[0],row[1])

I get:

1, 2
1, 4
2, 1
2, 3
2, 4
3, 2
3, 4
4, 1
4, 2
4, 3

Then when I run my script to dissolve based on these values, I will end up with duplicate polygons such as 1 & 2 as well as 2 & 1. Can someone please help me with writing the UpdateCursor to go through and delete these duplicates? I don't know how to look through when the fields have then switched.

Also, what if I then have three polygons to merge? If I had three columns such as OID1, OID2 and OID3, is there an SQL expression to capture whether the three values in these have been repeated in a different order but in the same row previously? Thanks


texts: Problem compiling UI file generated by QGIS Plugin Buidler

texts:
I have used the plugin builder QGIS 1.8 to create an empty plugin.  The next step is to compile the ui file using pyuic.  pyuic.py runs but halts at the line with from PYQt4 import QTCore and an error message of 'No module named PyQt4' is displayed.  I am using an OSGeo Install and I also have an install of last weeks master.  Using the plugin builder in the master produces the same issue.

It could be a path issue and if anyone replies, setting the path is part of the answer, knowing where to set the path is the other part.

Could someone also briefly explain what python is looking for when is is looking for a module. I am guessing that it is looking for a dll but it could be looking for an API or even a py / pyc file.  Unless I can first check that the module exists with Windows explorer and can find its path, I will not later be able to set a path.

An alternative would be use gnu make or other compiler to compile the plugin using the make file produced by the plugin builder.  Is there a compiler that makes this simple (a pre-compiled windows installer that comes with instructions on how the compiler with a make file)?

Can QT Designer compile the ui files that it edits?

Andrew M


texts: Precision loss in the REAL fields when saving GRASS layer as shp with QGIS

texts:
I am using QGIS version 2.18.14 with GRASS 7.2.2 to clean up some geometry issues within shp files I have.

I have an initial shapefile “test.shp” which has a field named “area”. The “area” type is REAL with LENGTH = 15 and PRECISION = 7.

I do the following:

I load in QGIS (with GRASS7) the file “test.shp” using  v.in.ogr (snapping 1.0 and minimal area 10.0) and specify the file name as “test” in the dialog. It all goes well. The file is saved in my GRASS folder with the usual three sub-layers (0 - holes, 1- “fixed” (as I call it), 2 - overlaps).
Then I navigate to my GRASS folder and load the “test_1” (the “fixed” sublayer).
Now, when I open the attribute table I can see the field “area” and the values shown there are decimal numbers (e.g. 12.345 ... as they should be).

However, if I open the Properties of the “test_1” the field “area” is defined as “double”, but with LENGTH = 20 and PRECISION = 0. When I save the the “test_1” as “test_new.shp”, and then load the “test_new.shp” in the QGIS the field “area” of the “test_new.shp” has lost all the decimal places (e.g. instead of 12.234 is stands 12). If I create a new field “new_area” with LENGTH 15 and PRECISION 7 using the field calculator (“new_area”=1.0 * “area”), I can confirm the loss of precision (i.e. I get 12.000000).

Does anybody have an idea how to go around this?


texts: Calculating raster layer statistics using ArcPy gives ERROR 000840?

texts:
I'm trying to write a script that will, in part, calculate statistics for a raster layer in an Arcmap mxd, but when I run the script I get an "invalid parameter" error (Error 000840), saying that the value isn't a Mosaic Layer, Mosaic Catalog, or Raster Catalog. The Calculate Statistics tool in the toolbox works fine for a single raster, so I'm not sure how to fix this. Relevant code block:

import arcpy
inRaster = arcpy.GetParameterAsText(0)
arcpy.CalculateStatistics_management(inRaster, "1", "1", "-9999")

Any suggestions?


texts: ArcGIS 000210 error copy to feature class

texts:
I have a script tool that:

Creates a feature dataset within a file geodatabase
Performs a Select by Attributes on a cadastral layer
Copies the selected polygons into the feature dataset.
The copied polygons are then dissolved to give a property boundary and added to the feature dataset
The centroid is then calculated and added to the feature dataset

Now this works fine the first time you run the script. But once you run it for a new property I get the 000210 error whilst trying to copy the selected polygons into the feature dataset. It will create the new feature dataset, but it will not let me copy anything into it.
I have tried using personal geodatabases. I have tried outputting to a shapefile and using FeatureClassToGeodatabase tool, all which do not work. BUT if I delete all other feature datasets then it will work. I've checked for locks and there are none.
I do not understand what could possibly be going on here

import arcpy, os

#Specify the drive you have stored the NCT_GIS foler on
drive = arcpy.GetParameterAsText(0)

#Folders
RF_Prop_DB = drive + ":\\NCT_GIS\\DATA\\RF_Properties.gdb"
Lambert_Projection = drive +":\\NCT_GIS\\Scripts\\res\\GDA 1994 New South Wales Lambert.prj"

arcpy.env.workspace = (RF_Prop_DB)
arcpy.env.overwriteOutput = True
lot_DP = arcpy.GetParameterAsText(1).split(';')
PropertyName = arcpy.GetParameterAsText(2)
#Create the query
queryList= []
for i in range(0,len(lot_DP)):
    if i % 2 == 0:
        lt = lot_DP[i]
        DP = lot_DP[i+1]
        query_line = """( "LOTNUMBER" = '{0}' AND "PLANNUMBER" = {1} )""".format(lt, DP)
        queryList.append(query_line)
        if i < (len(lot_DP)):
           queryList.append(" OR ")
del queryList[len(queryList)-1]
query = ''.join(queryList)

#Create the feature dataset for the property
arcpy.CreateFeatureDataset_management(RF_Prop_DB, PropertyName, Lambert_Projection)
#Cadastre
lotFile = drive + ":\\NCT_GIS\\DATA\\NSWData.gdb\\Admin\\cadastre"
#Create lot polygons in feature dataset
arcpy.MakeFeatureLayer_management(lotFile, "lot_lyr")
arcpy.SelectLayerByAttribute_management("lot_lyr", "NEW_SELECTION", query)
arcpy.CopyFeatures_management("lot_lyr", os.path.join(RF_Prop_DB, PropertyName, "Lots"))
#Create property boundary in feature dataset
arcpy.Dissolve_management(os.path.join(RF_Prop_DB, PropertyName, "Lots") , os.path.join(RF_Prop_DB, PropertyName, "Boundary"), "", "", "SINGLE_PART", "DISSOLVE_LINES")
#Create property centroid in feature dataset
arcpy.FeatureToPoint_management(os.path.join(RF_Prop_DB, PropertyName, "Boundary"), os.path.join(RF_Prop_DB, PropertyName, "Centroid"), "CENTROID")


texts: How to get polyline features from a raster file using ArcGIS 10.1？

texts:
I have a watershed accumulation file look like this：

There are several white lines by visual, and I tried the raster to polyline tool and got this：

Are there better ways to extract polyline features from a raster file instead of creating an new shapefile and drawing lines by myself？


texts:
I've been using the Openoise plugin successfully for several years. I haven't used it for the past 3-4 months, but when I used it this week the dropdown combo boxes in the "Calculate noise levels" don't drop down.
I'm running QGIS 3.18 and I've tried the following without any success:

Uninstalled QGIS then reinstalled;
Rolled back to QGIS 3.16.x; and
Rolled back to QGIS 3.10.x.

I've notified the developed on Github but wondering if anyone else using this plugin is experiencing the same issue and has some suggestions?


texts: Differences in the longitude and latitude between a LiDAR DSM and an optical image

texts:
I've downloaded the UK's LiDAR elevation data (see below) in laz format for a specific region (Tewkesbury) from: http://environment.data.gov.uk/ds/survey#/download

From that, a DSM (Digital Surface Model) was generated using ENVI LiDAR in ENVI (hdr) format as shown below (the red cross represent the coordinates of the building of interest):

By comparing the previous DSM image (in the British National Grid EPSG:27700 projection) to the optical image of the same area found on Google Maps (see below), I noticed that the same point appears at different locations.

Now what I would like to do is to co-register the elevation DSM data with the optical image (or potentially a radar image), but this seems as an additional difficulty besides the differences in the resolution.
How can I deal with the differences in the projection between the two images? Should I (if possible) project the DSM elevation data to the standard WGS84?


texts:
I am performing a union on a polygon feature class with multiple overlapping polygons.
Each of the records in the resulting feature class can be thought of as "unique area" polygons made up of the various combinations of other polygons.

In my results I want each "unique area" record to contain the names of all the polygons that make it up, and I want those names listed alphabetically.

For example:

Ideal Resulting Table:

So far I have been able to do the union and then do a spatial join back to the original feature class and in the field map of the Spatial Join tool make the merge rule "Join" for attribute I want to concatenate (and indicate a delimiter). This gives me results like the following:

I can use .split(",") to divide this into separate fields.
My question is: how can I sort that Polys field so that those polygons are in alphabetical order?


texts: How can I have the percentage instead of the Frequency in Google Earth Engine? (Edited question)

texts:
EDIT : Since I had 2 questions in one, I edited it to only have one (second part here.)

EDIT 2 : I got a partial answer on another forum and made my script more universal

I have yet another question related to my last post.

I used the following script :

// Input layers
var globcover = ee.Image("ESA/GLOBCOVER_L4_200901_200912_V2_3"),
    geometry = /* color: d63000 */ee.Geometry.Polygon(
        [[[-71.466064453125, 48.763431137917955],
          [-71.378173828125, 48.89000369970676],
          [-72.674560546875, 49.38952445158216],
          [-73.179931640625, 49.106241774469055],
          [-73.575439453125, 48.27588152743497],
          [-72.83935546875, 48.10743118848039],
          [-71.4935302734375, 48.17341248658084],
          [-71.455078125, 48.56024979174331],
          [-71.5374755859375, 48.68370757165362]]]);
// Extract the landcover band
var landcover = globcover.select('landcover');
// Clip the image to the polygon geometry
var landcover_roi = landcover.clip(geometry);
// Add a map layer of the landcover clipped to the polygon.
Map.addLayer(landcover_roi);
// Print out the frequency of landcover occurrence for the polygon.
var frequency = landcover.reduceRegion({
  reducer:ee.Reducer.frequencyHistogram(),
  geometry:geometry,
  scale:1000
});
print('landcover frequency', frequency.get('landcover'));

var dict = ee.Dictionary(frequency.get('landcover'));
var sum = ee.Array(dict.values()).reduce(ee.Reducer.sum(),[0]).get([0]);
var new_dict = dict.map(function(k,v) {
  return ee.Number(v).divide(sum);
});
print(new_dict);

This outputs the land cover has a value between 0 and 1. I need to multiply by 100 to get a percentage.


texts: Submodel not executing within main model

texts:
My main model contains the following:

Workspace variable Input GDB
Feature class Input Feature Class
SubModel 1 that produces OUTPUT feature class

Parse Path is used to obtain the name from the input feature class and is stored in the variable Name. This is used as an inline variable for the various outputs of the processes inside SubModel 1. The workspace variable is also used as an inline variable.

My problem now is that the submodel is not executing. It accepted the input feature class and executed successfully on its own. When I added it to the main model it now refuses to run, even with exactly the same input.


texts: Joining table with address data to a shapefile (buildings) in QGIS

texts:
The aim is to show all mineral oil deposits of an specific area.

First I have the buildings as a shapefile. The address of every building is divided in City, street and housenumber. So there are three different attributes.

And I got a table with all addresses that have a mineral oil deposit. ( I know how to import it into QGIS as a csv-file). In this table the address is also divided in three attributes as in the shapefile of the buildings.

The problem is I have no single attribute that could be used for a join. Do you know any easy possibility to join them? Maybe to put the attribute street and the house number in one attribute?


texts: Identify the coordinates of the max values resulting from using the Zonal Statistics tool

texts:
I used the Zonal Statistics tool to extract the max values of a raster/DEM layer. The attribute table shows the result, but the problem now is to identify the coordinates of the said maximum elevation. I tried looking for solutions online and saw Find the coordinates of the max n values of a raster layer but it does not apply to QGIS.
How do I identify these max values?


texts: Reprojecting raster (GeoTIFF) using PyQGIS in standalone script

texts:
I'm trying to reproject a GeoTIFF file within a PyQGIS standalone script.
Using QGIS 3.14 the steps would be:

resulting in the following process history and the output_raster.tiff being successfully created:

processing.run("gdal:warpreproject",
{'INPUT':'C:/Projects/PythonScripts/qgis_python/input/input_raster.tif','SOURCE_CRS':QgsCoordinateReferenceSystem('EPSG:2051'),'TARGET_CRS':QgsCoordinateReferenceSystem('EPSG:4326'),'RESAMPLING':0,'NODATA':None,'TARGET_RESOLUTION':None,'OPTIONS':'','DATA_TYPE':0,'TARGET_EXTENT':None,'TARGET_EXTENT_CRS':None,'MULTITHREADING':False,'EXTRA':'','OUTPUT':'C:/Projects/PythonScripts/qgis_python/output/output_raster.tif'})

However
Running the exact same command in a standalone python script does not create the output file even though it runs without any errors.
My guess is that it has something to do with a conflicting GDAL because I receive the following error reprojecting a raster directly with GDAL:
from osgeo import gdal

input_raster = gdal.Open(r'C:/Projects/PythonScripts/qgis_python/input/input_raster.tif')

gdal.Warp(r'C:\Projects\PythonScripts\qgis_python\output\output_raster.tiff', input_raster, format = 'GTiff', dstSRS="EPSG:4326")

Error:

TypeError: in method 'wrapper_GDALWarpDestName', argument 4 of type
'GDALWarpAppOptions *'

and if I import GDAL befor qgis.core, then It can't find the DLL for qgis._core import *
Full Script
import os

os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = 'C:\\Program Files\\QGIS 3.14\\apps\\Qt5\\plugins'
os.environ['GDAL_DATA'] = '/home/server/anaconda3/share/gdal'

from qgis.core import (
     QgsApplication,
     QgsProcessingFeedback,
     QgsVectorLayer,
     QgsCoordinateReferenceSystem
)

# See https://gis.stackexchange.com/a/155852/4972 for details about the prefix
QgsApplication.setPrefixPath('C:\\Program Files\\QGIS 3.14\\apps\\qgis\\', True)

from PyQt5 import QtGui, QtCore
qgs = QgsApplication([], False)
qgs.initQgis()

import sys
sys.path.append('C:\\Program Files\\QGIS 3.14\\apps\\qgis\\python\\plugins')

import processing
from processing.core.Processing import Processing
Processing.initialize()

from qgis.analysis import QgsNativeAlgorithms
QgsApplication.processingRegistry().addProvider(QgsNativeAlgorithms())

reproject_params = {'INPUT':'input/input_raster.tif',
                'SOURCE_CRS':QgsCoordinateReferenceSystem('EPSG:2051'),
                'TARGET_CRS':QgsCoordinateReferenceSystem('EPSG:4326'),
                'RESAMPLING':0,
                'NODATA':None,
                'TARGET_RESOLUTION':None,
                'OPTIONS':'',
                'DATA_TYPE':0,
                'TARGET_EXTENT':None,
                'TARGET_EXTENT_CRS':QgsCoordinateReferenceSystem('EPSG:4326'),
                'MULTITHREADING':False,
                'EXTRA':'',
                'OUTPUT':'output/output_raster.tif'}

processing.run("gdal:warpreproject", reproject_params)


texts: QGIS 2.16 "Nødebo" libintl-8.dll missing

texts:
I have some trouble to get the QGIS 2.16 32-bit installation working on a 64-bit Windows 7 machine. When the installation is finished and I hit the QGIS Desktop 2.16.0 icon the next error pops up: "The program can't start because libintl-8.dll is missing from your computer. Try reinstalling the program to fix this problem."

Reinstalling 2.16 didn't fix anything. Reinstalling 2.14.4 gave me the same result.


texts: Georeference an image by knowing two Lat/Long coordinates?

texts:
How can I georeference an unrotated image by knowing two Lat/Lng coordinates?

I tried to transform the coordinates to UTM, but this didn't work (for me), because I also need to rotate it and calculate with the angles, which seems to be complicated.

My aim is to calculate every other coordinate of the image by clicking on it.


texts:
I created a custom style on QGis and saved as SLD file. When I added to GeoServer, after validation it, I got an errors about parsing.

Here is the error message below:

Parsing failed for Filter: java.lang.RuntimeException: Unable to find function Literal
line 26: cvc-complex-type.2.4.a: Invalid content was found starting with element 'ogc:Filter'. One of '{"http://www.opengis.net/ogc":expression}' is expected.
line 27: cvc-complex-type.2.4.a: Invalid content was found starting with element 'ogc:Literal'. One of '{"http://www.opengis.net/ogc":spatialOps, "http://www.opengis.net/ogc":comparisonOps, "http://www.opengis.net/ogc":logicOps, "http://www.opengis.net/ogc":_Id}' is expected.

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns:se="http://www.opengis.net/se">
  <NamedLayer>
    <se:Name>Some_Name</se:Name>
    <UserStyle>
      <se:Name>Some_Name</se:Name>
      <se:FeatureTypeStyle>
        <se:Rule>
          <se:Name>Single symbol</se:Name>
          <se:LineSymbolizer>
            <se:Stroke>
              <se:GraphicStroke>
                <se:Graphic>
                  <se:Mark>
                    <se:WellKnownName>line</se:WellKnownName>
                    <se:Fill>
                      <se:SvgParameter name="fill">#ff0000</se:SvgParameter>
                    </se:Fill>
                    <se:Stroke>
                      <se:SvgParameter name="stroke">#ff0000</se:SvgParameter>
                    </se:Stroke>
                  </se:Mark>
                  <se:Size>3</se:Size>
                </se:Graphic>
                <se:Gap>
                  <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
                    <ogc:Literal>1.2</ogc:Literal>
                  </ogc:Filter>
                </se:Gap>
              </se:GraphicStroke>
            </se:Stroke>
          </se:LineSymbolizer>
          <se:LineSymbolizer>
            <se:Stroke>
              <se:SvgParameter name="stroke">#ff0000</se:SvgParameter>
              <se:SvgParameter name="stroke-width">0.26</se:SvgParameter>
              <se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
              <se:SvgParameter name="stroke-linecap">square</se:SvgParameter>
            </se:Stroke>
            <se:PerpendicularOffset>1</se:PerpendicularOffset>
          </se:LineSymbolizer>
          <se:LineSymbolizer>
            <se:Stroke>
              <se:SvgParameter name="stroke">#ff0000</se:SvgParameter>
              <se:SvgParameter name="stroke-width">0.26</se:SvgParameter>
              <se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
              <se:SvgParameter name="stroke-linecap">square</se:SvgParameter>
            </se:Stroke>
            <se:PerpendicularOffset>-0.6</se:PerpendicularOffset>
          </se:LineSymbolizer>
        </se:Rule>
      </se:FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

How can I resolve the parsing issue?


texts: LAStools plugin in QGIS: ''The system cannot find the path specified."

texts:
I'm attempting to convert LAS files to a multipoint file using QGIS methods. I've found some documentation that suggests that v3.2 and up has LAStools available as a plugin so I downloaded the latest version (3.4) of QGIS to explore this more.

You can see below the tool that I'm attempting to use here in the processing toolbox:

I have yet to be able to run this successfully. I'm not very familiar with QGIS so I'm having trouble finding documentation to explain the LAS tool sets.

Here is my input:

And here is the output:

The error message appearing says that I cannot find the path specified. Is this in reference my las file or to something within the LAS plugin?


texts: Classify point size by attribute in QGIS

texts:
I use QGIS 2.14

I classified the colors of a point layer by one attribute, now I wanted to classify the size of each point in each category according to another attribute. I used the dialog "Data define override" and the Size assistant. Unfortunately the assistant only provides 5 classes, whereas I would need 10.

Is there a way to change the number of classes of the size assistant?


texts: Preparing training data for crop species classification from drone images

texts:
I have high resolution multispectral (R,G,B,NIR,RE bands) images of a field taken from MicaSense RedEdge mounted on a drone. There are various species of crops planted. I want to classify the crops or crop species somewhat like this.

Image ref: https://www.intechopen.com/books/processing-and-analysis-of-hyperspectral-data/hyperspectral-image-classification
I am new to this. This is a classification task, so I'll also have to label the data. How should I label the data so that it can be fed to a classification mechanism, say CNN or SVM? What would the final X -> y mapping of training data look like?
I think we can use ArcGIS for this. Still, I'd like to know the manual labeling procedure and what is done under the hood just to gain some more understanding.
Do I have to create bounding boxes of some size around the crops, like what's done in object detection?


texts: Coordinates 2D transformation to PostGIS desde QGIS

texts:
This is a three-dimensional shapefile, I checked in ArcGIS, where the shape attribute indicates POINT ZM.

This is the table:

fid        0
shape*     point ZM
atribut1   A
atribut2      B
ESTE      500
NORTE      1000

and when exporting to PostGIS from QGIS indicated in the item "CLASS OF SPACE" NULL and the following error:

"Problemas al insertar objetos espaciales del archivo:
D:/gegrafo/BORRARç/COTACACHIa_Merge.shp

La base de datos dio un error mientras ejecutaba esta SQL:

SELECT AddGeometryColumn('public','COTACACHIa_Merge','the_geom',-1,'NULL',2)
El error fue:
ERROR:  Invalid type name - valid ones are:
    POINT, MULTIPOINT,
    LINESTRING, MULTILINESTRING,
    POLYGON, MULTIPOLYGON,
    CIRCULARSTRING, COMPOUNDCURVE, MULTICURVE,
    CURVEPOLYGON, MULTISURFACE,
    GEOMETRY, GEOMETRYCOLLECTION,
    POINTM, MULTIPOINTM,
    LINESTRINGM, MULTILINESTRINGM,
    POLYGONM, MULTIPOLYGONM,
    CIRCULARSTRINGM, COMPOUNDCURVEM, MULTICURVEM
    CURVEPOLYGONM, MULTISURFACEM,
    or GEOMETRYCOLLECTIONM
CONTEXT:  SQL statement "SELECT AddGeometryColumn('',$1,$2,$3,$4,$5,$6)"
funciÃ³n PL/pgSQL Â«addgeometrycolumnÂ» en la lÃnea 4 en sentencia SQL"


texts: How to do topographic correction of Landsat 8 image in ERDAS?

texts:
I am trying to perform a topographic correction of a Landsat 8 image using the C method described in the paper below. I am doing this in ERDAS IMAGINE Spatial Modeler. However, I am not sure how to calculate the value of Ck in the Spatial Modeler. In the paper, the way to calculate it is described on page 1058. It is the quotient of the gradient/intercept of the regression equation, pT vs IL. I have the pT and IL layers but am not sure how to get the Ck value in order to complete the model. I also have ArcMap 10.5.

http://www.geogra.uah.es/images/Documentos/emilio/PDF/Riano2003b.pdf


texts: How can I access lost panels in print composer?

texts:
In QGIS, I no longer have access to the panels in the composition for printing window (layout, history, object properties). QGIS 1.8.0 on a Mac.

What I already tried :

The right click on the toolbar didn't work, while it works anywere else.
I uninstalled QGIS, deleted preferences files, installed QGIS again, and menus didn't come back.
I copied the preferences files from a computer where these menus are on, to mine, and the menus didn't come back.

Thanks


texts: Problems combining (union) Multipolygons in geodjango

texts:
I'm using geodjango and postgis (1.x),
What is the best way to combine (union) a list of multipolygons.

in what i assume is rather inefficient i'm looping trough like this

combined = multipolygon

for item in items:

____combined = combined.union(item.geom)  #geom is a multipolygon

Usually this works fine, but often i'm getting the error
 Error encountered checking Geometry returned from GEOS C function "GEOSUnion_r".

Here is the geo json version of the item the error is thrown on if it helps

{ "type": "MultiPolygon", "coordinates":
[ [ [ [ -80.077576, 26.572225 ],
      [ -80.037729, 26.571180 ],
      [ -80.080279, 26.273744 ],
      [ -80.147464, 26.310066 ],
      [ -80.152851, 26.455851 ],
      [ -80.138560, 26.538013 ],
      [ -80.077576, 26.572225 ]
] ] ]
}

does anyone have anyideas?  the end goal is to take find all the locations (another table) which fall within this  list of n polygons  (using coordinates__within=combined_area)

thanks in advance for any help.


texts:
OSM map has a data layer and an information panel. How is it implemented? What is a type of the layer and URL of vector data source? How information panel works?

Thanks for all!


texts:
I've made a map with QGIS and I've tried to convert it to openlayers with the plugin qgis2web. Originally, the point layer has a custom icon made by me and it's an svg file, but when I export the map, it hasn't that icon and it seems to disappear.
I tried to export the map with the point layer with default icon and it's all ok so, reading the ol3 documentation I tried to change the file style in this way:

original code

var style = [ new ol.style.Style({
    image: new ol.style.Circle({
        radius: 5.0,
        stroke: new ol.style.Stroke({
            color: 'rgba(0,0,0,255)',
            lineDash: null,
            width: 1
        }),
        fill: new ol.style.Fill({
            color: "rgba(0,0,0,1.0)"
        })
    })
})];

modified code

var style = [ new ol.style.Style({
    image: new ol.style.Icon({
        anchor: [0.5, 0.5],
        size: [50, 50],
        offset: [0, 0],
        opacity: 1,
        src: 'x.png'
    })
})];

It doesn't work. I'm not a ol expert, is it possible to do something like I want to do? Am I doing something wrong?
Previously I did the same thing with qgis2leaf and all was right adding a columns called icon_exp in the attribute table in qgis, but I need some rotated maps, so I need of ol.

EDIT

In the network tab is reported

Property unknow "-moz-box-shadow". Declaration omitted.

Property unknow "user-select". Declaration omitted.

file:///D:/map/tower.png

IndexSizeError: Index or size is negative or greater than the allowed amount

file:///D:/map/resources/ol.css

file:///D:/map/resources/ol3-layerswitcher.css

(declaration or statement, I'm translating from italian and I don't which is the right translation)

"-moz-box-shadow" is related to index.html

.ol-popup {
    display: none;
    position: absolute;
    background-color: white;
    -moz-box-shadow: 0 1px 4px rgba(0,0,0,0.2);

"user-select" is related to ol.css

     .ol-unselectable{-webkit-touch-callout:none;
                        -webkit-user-select:none;
                        -khtml-user-select:none;
                        -moz-user-select:none;
                        -ms-user-select:none;
                         user-select:none;
                        -webkit-tap-highlight-color:transparent
       }

Maybe means something, I've this problem in firefox and internet explorer, in chrome the custom icon is showed.


texts: Open .tiff, set projection, then re-save in Python with GDAL

texts:
I am trying to set the projections of a .tiff file from another file with GDAL in Python.  I successfully set the projections, but how do I re-save the .tiff afterwards?

Here is my code:

ds = gdal.Open('satellite_image.tif')
prj = ds.GetProjection()

roads = gdal.Open('road_lines.tiff')
roads.SetProjection(prj)


texts: Save Leaflet drawn features with attributes to PostGIS

texts:
Goal:

In order to have a fully interactive map, I would like to be able to save some drawn features (in a second step with some attributes that may be grabbed through an input mask form or pop-up) on a Leaflet map to a PostgreSQL (PostGIS) database table.

Technical details:

I am using Lighttpd as webserver + geoserver (based on jetty) to serve my base vector layer on which I'd want to write the new features.

What I have read and tried:

Based on this code : https://bl.ocks.org/danswick/d30c44b081be31aea483
it is possible to "export" the features as a GeoJson string to a local file.

Related resources that I've tried but doesn't work:
Leaflet.draw: add attributes and save to file

And with this, I'm able to print out to the console a GeoJSON string that is ready to be written in a database field but I do not know how to technically communicate it to the database:
 https://stackoverflow.com/questions/24018630/how-to-save-a-completed-polygon-points-leaflet-draw-to-mysql-table

Related to the Geoserver documentation (the "demo" menu on the left column), it is not possible to write a GeoJson string to the connected PostgreSQL database: WFS-T only allows to write features using the GML format...

I remember (long time ago, so it is blurry in my mind) some functions with OpenLayer that could do some parsing on a GeoJson string to make it "GML ready" but I can not find any equivalent within Leaflet.

Am I stuck or is there an elegant way to store drawn vector features from a Leaflet map into a PostgreSQL database (based, or not, on Geoserver)?
If not possible, which other (light) techniques would be nice to use?

The raw code example:
https://pastebin.com/raw/Tbv9AcFs

Edit:

The answer given in the thread on which this question was marked as duplicate ( How to add Geoserver WFS to Leaflet JS Application ) is to use the Leaflet-WFST plugin: https://github.com/Flexberry/Leaflet-WFST.

When I tried the first command: npm i leaflet-wfst --save

I get an error "command not found". So it doesn't work in my really simple case where I use Geoserver. What I would like to find is a small function that converts a geojson object (which I already have!) to a GML one (which is the only format available with Geoserver WFST protocol).


texts: Convert 1m to decimal degrees (WGS84) depending on polygon location

texts:
I have a table with small polygons that are scattered around a "continental" area (Brazil). How can I convert 1m to decimal degrees of a wgs84 reference system (longitude / latitude) depending on the position of each polygon?

Broader context:
I am trying to use ST_SimplifyVW(geom, tolerance) to remove spikes from polygons (as describe here). The tolerance parameter of ST_SimplifyVW is given in terms of the SRID unit, which are decimal degrees. I would prefer to have the tolerance parameter provided in square meters because:
a) is a little more intuitive;
b) I would like the tolerance used to be the same regardless of the latitude of the polygons.

So ideally I would have something like:

ST_SimplifyVW(geom, f_m_to_degrees(1,geom) )

where fictitious function "f_m_to_degrees"would convert the supplied distance to degrees to the most precise projection around the location of geom.


texts: Getting "mismatched type for band" error in Google Earth Engine?

texts:
I have extracted a list of images from an iteration (using Google Earth Engine how can I return an image for each iteration) but I keep getting an issue when I try to add these images to an image collection.

var collection = ee.ImageCollection(list);

Using this line of code I was able to add the images to a collection, but when I try to make calculations with this collection (collection.max()) an error occurs:

The entire piece of code:

function drylength(current, previous){
  previous = ee.List(previous);
  var mask = current.remap([0], [1], 0,"precipitation").rename('precipitation');
  var sum = mask.add(previous.get(-1)).multiply(mask);

  return previous.add(sum); }

var dataset = TRMM .filterDate("2015-01-01","2015-02-01") .sort('system:time_start:');

var list = ee.List(dataset.iterate(drylength, ee.List([   dataset.max()
    .remap([0], [0], 0, "precipitation")
    .rename('precipitation') ])));

var collection = ee.ImageCollection(list);

print(list);
print(collection);

Map.addLayer(collection, imageVisParam, "max");


texts: Changing feature class and field aliases in bulk using ArcPy?

texts:
I have over a hundred FCs, each with 10 or 20 attributes to add or change the aliases for, two or more times a year. Needless to say, this is not something I'm going to grunt my way through. How can I automate this process?

Python solution preferred but will use anything that works.

I have access to Arcgis 9.3.1 and 10 (ArcInfo license level).


texts:
I have two point datasets that I am analyzing and I wanted to implement a multivariate hexbin approach for displaying this data.

I have managed to cobble together an approach using QGIS SVG symbols but the primary problems is that this approach doesn't produce a map that can be viewed at multiple scales. For example, this view is at a 2:1 scale:

The spacing between the points looks good and it's possible to see the variation in size and color. However. if I zoom in, the relationship between the size of the points and the distance between the points becomes such that the image is much harder to interpret:

I have a two questions.

First, is there any way to implement a scale-based rendering for points in QGIS? I could see developing an approach where I had multiple layers of the same data with the point sizes varying and having certain layers display at certain scales, but I'm not sure how best to implement this.

Second, is there any way to implement a bivariate point in ArcGIS. I've had no luck using the multiple attributes options, but I might be missing something.


texts: Cause of ExecuteError: ERROR 999999: Error executing function from Spatial Join?

texts:
I'm trying to use the spatial join to append rows to my target feature from my join feature. Here's my code:

#import the module
import arcpy
from arcpy.sa import *
from arcpy import env
env.overwriteOutput = True

#set the workspace
arcpy.env.workspace = r"C:\Users\Windows\Documents\JO_GIS_Analyst"

#Adding the municipality to the attribute table
for fc in arcpy.ListFeatureClasses("reclassnofptphil_onlyreprojected_2014121_geog*"):
    print fc #checking of feature classes
    outputFeature = "withjoin" + fc # specify output feature
    arcpy.SpatialJoin_analysis(fc, "PHL_adm2_UTM.shp", outputFeature)

print "Finish"

I'm getting an error of:

Traceback (most recent call last):
File "C:\Users\Windows\Dropbox\Python Scripts\batch_convert_raster_to_polygon.py", line 71, in <module>
arcpy.SpatialJoin_analysis(fc, "PHL_adm2_UTM.shp", outputFeature)
File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\analysis.py", line 481, in SpatialJoin
raise e
ExecuteError: ERROR 999999: Error executing function.
Item not found in this collection.
Failed to execute (SpatialJoin).

Here is the ouput of the print statement:

 reclassnofptphil_onlyreprojected_2014121_geog.shp

Actually I'm doing a loop for six files only, since I'm just using my sample files to test my code.


texts:
I have created a python script that batch summarizes all string fields within a fc table based on the concatenation of two fields.  The script loops through a list of the fields, however it stops about halfway through (same spot each time).  Why does this code not process the remaining string fields within the list?  After running it once, if I delete all the fields that it processed correctly the first time, then run it again on only the fields that it did not process, it runs ok.  Maybe my issue is with this line:

fieldname = flist.pop(0)

Ideas?

See code below

import arcpy, os
from arcpy import env

try:

    # Local variables:
    inTable = arcpy.GetParameterAsText(0)
    outWKSpace = arcpy.GetParameterAsText(1)

    # Process: Add Field
    arcpy.AddField_management(inTable, "cat", "TEXT", "", "", "200", "", "NULLABLE", "NON_REQUIRED", "")

    flist = arcpy.ListFields(inTable, '', 'String')
    fieldname = ''

    for field in flist:
        fieldname = flist.pop(0)
        arcpy.CalculateField_management(inTable, "cat", "!Sub_Batch!+\" \"+ !"+ fieldname.name +"!", "PYTHON_9.3", "")
        outTable = outWKSpace + "\SUM_" + fieldname.name
        table2 = arcpy.Frequency_analysis(inTable, outTable, "cat", "")

        intCount = arcpy.GetCount_management(outWKSpace + "\SUM_" + fieldname.name)

        arcpy.AddMessage(fieldname.name + ' records = ' + str(intCount))

except Exception, e:
  import traceback
  map(arcpy.AddError, traceback.format_exc().split("\n"))
  arcpy.AddError(str(e))


texts: How to generate Non-smooth/crude Contour Lines in QGIS?

texts:
I have an SRTM DEM and I want contour lines generated for specific elevations. This can easily be done using r.contour.level/step etc. but the contours generated are smooth and cover the cells only partially (red lines in image).

Are there any methods by which I could generate a contour line that encloses the cell boundaries above a desired elevation.

Image description: Red line is the 3950m contour generated by QGIS. The yellow line is one I need: a contour enclosing all cells >= 3950m).

EDIT: The goal is to extract the surface area of elevation ranges (50-100,100-150 etc.) in my raster. I have a surface area raster, and the next step is to calculate zonal statistics of the raster based on a defined polygon area of interest as my contours are occur every 50m, they seemed ideal for the mask.
BUT
Using a smooth contour vector gives me incomplete zonal statistics for every elevation polygon. This is could be because the 3950 contour polygon does not "completely" enclose pixels >= 3950. In the example below, the the zonal stats only gave me data for 5 pixels. The correct data should include 12 pixels (which I manually checked to be >= 3950m) as enclosed by the yellow line.


texts: Embed private AGOL webmap with automatic authentication

texts:
We're a subcontractor on a larger project that involves generating client-specific reports. Clients must log in to see these reports (HTML pages), and we'd like to embed a private ArcGIS Online (AGOL) map within these pages.

Is it possible to set permissions such that by virtue of being on the report page, they are allowed to see the private map? Is there any way for this page to pass credentials automatically, so that the client will never see them?

This is an example of a private AGOL map (you should be greeted by a username/password screen): http://stone-env.maps.arcgis.com/home/webmap/viewer.html?webmap=6b13e08c1cab4b399c7a79b61cb654ba

We'd like this to be embedded in a page, and have it visible automatically to the client when they're on this page.

Is this possible?


texts: I have classified the cloud points of LiDAR data into different classes. After extracting I have generated 3d building polygons using "Vectorize buildings" option from terrascan tools. Now I need to extract the outer lines of those entire 3d buildings in polylines. Extension of output file is .dgn only. Yellow coloured lines in the illustration are polylines. I drew them manually. I need to extract the rooftops including chimneys and other things above the roof. Is there any method to extract them automatically?


texts: Sum a Value Relation field in field calculator

texts:
I have a polygon layer with a Value Relation field that I'm using to capture upstream catchment areas that contribute to the selected record.

An example would be if I had 3 polygons of 100m2 - so I have 3 records in my table with a geometry area of 100m2.  But polygons A & B contribute to the catchment area of polygon C, so I use the Value Relation field to identify A & B as contributors to C.  I use the Value column to identify the polygon, but I use the Key column to save the area geometry values in the column.  I then want to add a virtual field to calculate the sum of the values in the Value Relation field and add it to the area of the particular record.  In this case, I would have a virtual field of 300m2.

The problem I'm having is summing the values of the Value Relation field (Real) - as soon as I save the table, I lose the values in the Value Relation field. Everything becomes zero.

I've been trying with the "UP_AREA" field as both a text and as a double. The text values seem to remain in the table, but the doubles are not showing up.  In the screen shot at the bottom, you can see that the AREA_ha values are being saved, but I'm not able to convert to real.

The last screenshot below shows that the values appear as expected in the UP_AREA_D field as expected when the polygon is drawn, but as soon as I save the table, the field returns to null.

Open to any and all suggestions if anyone has a better way to do this.


texts: String together multiple commands at command line - Qgis

texts:
I am using the command line to export images from Qgis. is there a way to export a series of images in a single command? It takes a while for the data to load each time. I have tried simply including a second snapshot command, but it only generated the second image.

C:\PROGRA~1\QGIS-2~1.1\bin\qgis --project Z:\Projects\Virtual-Raleigh\QGIS\Raleigh.qgs --snapshot Z:\Projects\Virtual-Raleigh\Images\OSM-0794.png --width 4096 --height 4096 --extent 2090000,740000,2100000,750000


texts: How to get a ui.Thumbnail with a standard Google Maps type as background

texts:
within the Google Earth Engine (Javascript API) I would like to create a Thumbnail image with a standard Google Maps type, (e.g. Terrain style) as background. The thumbnail image is set to be opaque (0.5). However, I can't figure out how to add the google base layer.

Here is the ui.Thumbnail GEE Developer example:

// Create a box around an area in the Brazilian Amazon.
var box = ee.Geometry.Polygon([[
  [-62.9564, 2.5596], [-62.9550, 2.4313],
  [-62.8294, 2.4327], [-62.8294, 2.5596]
]]);

// Visualize the image in RGB.
var image = ee.Image('LANDSAT/LE07/C01/T1_SR/LE07_233058_20011113').visualize({
  bands: ['B3', 'B2', 'B1'],
  min: 0,
  max: 1200,
  gamma: [1.3, 1.3, 1]
});

// Print a thumbnail to the console.
print(ui.Thumbnail({
  image: image,
  params: {
    dimensions: '256x256',
    region: box,
    format: 'png'
  },
  style: {height: '300px', width: '300px'}
}));

The thumbnail so far, but without the desired background map.


texts: How to debug "msProcessProjection(): Projection library error. no system list, errno: 2" error in mapserver?

texts:
I think I have a misconfiguration in my mapserver that is preventing it from serving up imagery.

In my map file, I have this section:

  PROJECTION
    "init=epsg:4326"
  END

If I leave that section in, I get this error when calling GetMap or even GetCapabilities:

msProcessProjection(): Projection library error. no system list, errno: 2

If I remove that section (not desirable), GetCapabilities works, but GetMap gives this error:

<ServiceExceptionReport version="1.1.1">
    <ServiceException code="InvalidSRS">msWMSLoadGetMapParams(): WMS server error. Cannot set new SRS on a map that doesn&#39;t have any projection set. Please make sure your mapfile has a projection defined at the top level.</ServiceException>
</ServiceExceptionReport>

Which is expected because I just removed the section.

So, my question is how do I debug the error: msProcessProjection(): Projection library error. no system list, errno: 2?

Searching online, I see comments related to permissions, but apache (user running httpd) can access the following directories defined in my httpd.conf:

SetEnv LD_LIBRARY_PATH /some/place/lib/
SetEnv PROJ_LIB /some/place/share/proj/
SetEnv GDAL_DATA /some/place/share/gdal/
SetEnv LC_NUMBERIC C
SetEnv GEOTIFF_CSV /some/place/share/gdal/
SetEnv LANG=C

In /some/place/share/proj, there is a file epsg that is as I expect.

I get no errors from apache.


texts: Incorrect Extent when importing images into ArcMap 10.7

texts:
I have 2 JPG images of the same pixel size and of the same square mile area, with identical JGW and aux.xml files. One displays correctly, the second does not.

I am stumped, and it seems that ESRI support is stumped. Over the course of a year, we generate about 200K annotated files, so we need a clean way to generate the world and aux files and any others needed to allow display of rectified images, without having our customers having to re-project, recalculate etc. Our software currently generates these files and we think the data and format is correct.

I have a workflow that does the following

We ortho raw data through ArcGISPro and develop a mosaic. Input is IMGxxxx.jpg and a csv file with the IMU data.

We generate a mosaic using arcgispro, then export the mosaic to JPG tiles.  Sample Name is KE192_26.JPG

We send these images to our remote analysts, who annotate the images with yellow squares using PhotoShop. Our .net software scans the images, assigns a target ID for each yellow square, adds the target ID to the image, saves the modified image, and records some tabular data in a csv file. Sample Name is KE192_26_Out.JPG

I have tried loading these 2 files into ArcMap 10.7.0 Both images have spatial reference as seen in the layer Properties (NAD_1983_UTM_Zone_11N)

Only the first (KE192_26.JPG) tile correctly loads with the correct extent values.

The annotated file (KE192_26_Out.JPG) has incorrect extents, although the world and aux.xml files are the same for the 2 images.

Here is the world file:

0.1055822640

0.0000000000

0.0000000000

-0.1055822640

293828.4972528925

3931418.2711116746

And the aux.xml (The first and last lines containing the PAMDataset tag will not display in the following text)

"
SRS>COMPD_CS["unknown",PROJCS["NAD_1983_UTM_Zone_11N",GEOGCS["GCS_North_American_1983",DATUM["North_American_Datum_1983",SPHEROID["GRS_1980",6378137.0,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0.0,AUTHORITY["EPSG","8901"]],UNIT["Degree",0.0174532925199433,AUTHORITY["EPSG","9102"]],AUTHORITY["EPSG","4269"]],PROJECTION["Transverse_Mercator",AUTHORITY["Esri","43006"]],PARAMETER["False_Easting",500000.0,AUTHORITY["Esri","100001"]],PARAMETER["False_Northing",0.0,AUTHORITY["Esri","100002"]],PARAMETER["Central_Meridian",-117.0,AUTHORITY["Esri","100010"]],PARAMETER["Scale_Factor",0.9996,AUTHORITY["Esri","100003"]],PARAMETER["Latitude_Of_Origin",0.0,AUTHORITY["Esri","100021"]],UNIT["Meter",1.0,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26911"]],VERTCS["NAVD_1988",VDATUM["North_American_Vertical_Datum_1988",AUTHORITY["EPSG","5103"]],PARAMETER["Vertical_Shift",0.0,AUTHORITY["Esri","100006"]],PARAMETER["Direction",1.0,AUTHORITY["Esri","100007"]],UNIT["Meter",1.0,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","5703"]]]
"


texts: Which parameter and Data Type to set for spatial reference in ArcGIS Python script tool?

texts:
I developed a python script for user defined grid and I want to make a tool from this script.

The problem I am facing is to set up parameter for spatial reference.

I used GetParameterAsText function for spatial reference and put 'Spatial reference' in data type while setting the tool in ArcGIS 10.1. It seems that function is not working.

I don't want to ask user to input the Factory code for coordinate rather want to ask them to choose coordinate system as they want to set up for their output feature class.

How can I setup the spatial reference using GetParameterAsText function and ask user to choose their reference system?


texts: Row count comparison as a condition in model builder

texts:
I have got number of point layers with overlays.

I need one layer consisting of points of both layers.

For each overlay area I need to delete points in one of the overlaying layers. I want to keep the points from the layer that contains more points in the area of overlay.

Therefore I am building a model, which clips points of both layers in the overlay area, finds the counts of clipped points in both layers and delete the points in the layer with lower point number in the overlay area.

How can I use the row counts to select the layer where to delete the points?


texts: QGIS invalid layer: Cannot open GDAL dataset / not recognised as a supported file format

texts:
I am trying to add a raster dataset in QGIS and I get this message:

Invalid layer
Cannot open GDAL dataset C:/Users/Nefel/Downloads/crm.tif:
`C:/Users/Nefel/Downloads/crm.tif' not recognised as a supported file format.

The weird thing is, I have downloaded multiple datasets from the same site. Some of them work fine and with some I get this error.

The datasets were downloaded from here:
https://maps.ngdc.noaa.gov/viewers/wcs-client/


texts: How to transfer data from a version to default version in ArcMap?

texts:
I have lost all data from default version and also from the base tables in Oracle. But luckily, there is a version that has all the data in it. I have reconciled and posted that version to default but since the data is already there in that version and I haven't made any changes yet therefore default version is still empty.

Is there any way to restore the data from that version to default version?

I don't want to import data in base tables directly but from ArcMap so that I can bring everything to its original state.


texts: Selecting grid squares (polygons) that intersect with a raster

texts: I have a raster dataset that I have exported a subset from using attribute values (so the extract has areas where there are no pixels). I also have a fishnet grid (polygons) and I want to select the grid squares that contain the extracted raster.  The grid is way bigger than the pixel size of the raster (see image below - brown is the raster, the grid is polygon). Is it at all possible to select polygons (grids) that contain the extracted raster?


texts: Is there QGIS equivalent to Delineate Built-Up Areas tool in ArcGIS?

texts:
I have a set of settlement points near a coastline polyline, but not actually on the coastline. I  need to eventually divide up the coastline polyline into "settled" coastline vs. "unsettled" coastline.

I believe the easiest way to achieve this is to cluster settlements together, and then use the coastline polyline as my edge, similar to what is done by the Delineate Built-Up Areas tool in ArcGIS:

Afterwards, I'll be able to split up my coastline based upon whether or not a "built up area" touches it.

Can this be done using QGIS?

Edit: I cannot simply buffer my points and then intersect by my coastline, because the buffering does not actually stop at the boundary edge. For example, let's say I have some settlements on the mainland, then buffer it by 10k or whatnot in order to group them together and hit the coastline. This buffer not only hits the coastline, but it crosses over to the coastline of a deserted island. If I were to then intersect my buffered shapefile by my land shapefile, the result would be a patch of habitation on a deserted island!


texts: Using ArcMap's report system on large scale?

texts:
I'm trying to set up a reporting system based off two layers - point and polygon feature classes.

The system would run this report on each polygon that had a value in a specific field (polygons that didn't need to be ran would be null) and select all points within that polygon and spit out the necessary information in a pdf.

More advanced uses of this would be for someone to type in a specific polygon they needed and it would spit out the points within that polygon.


texts: How to insert attribute in a selected feature from active layer (PyQGIS)

texts:
I want to update some fields from a selected feature in an edit session with some values provided by a form made in QtDesigner. The fields have indexes 0 and 2.

Tried so far:

from edit_Form import Ui_EditForm

class editForm(QtGui.QDialog):
 def __init__(self):
    QtGui.QDialog.__init__(self)
    self.ui = Ui_EditForm()
    self.ui.setupUi(self)
    self.ui.pushButton.clicked.connect(self.accept)

 def accept(self):

     for i in iface.activeLayer().selectedFeatures():
        fid = i.id()
        provider = iface.activeLayer().dataProvider()
        name = iface.activeLayer().fieldNameIndex("NAME")
        siruta = iface.activeLayer().fieldNameIndex("SIRUTA")
        textNAME = self.ui.NAME.text()
        textSIRUTA = self.ui.SIRUTA.text()
        i.setAttribute(0,self.ui.NAME.text() )
        i.setAttribute(2,self.ui.SIRUTA.text())


texts: How do I apply a gradient to the edges of a buffer?

texts: I have a series of buffered points. I want to apply a gradient to the buffer edge so it appears the buffer just fades away - no discrete line. How can I create this effect?


texts: Choosing correct Projection name for ArcPy?

texts:
I am trying to plug in a projection name to my code, but I think the syntax/name is incorrect.

 arcpy.env.outputCoordinateSystem = arcpy.SpatialReference("US Albers Equal Area Conic")

When I run the above it throws:

  RuntimeError: ERROR 999999: Error executing function. the input is not
  a geographic or projected coordinate system.

I cannot seem to find documentation on how the projection/coordinate system names should be given when using as parameters for arcpy.

Any suggestions?


texts: MapBox GL JS - How to set polygon Z-ordering within a layer

texts:
I would like to set the Z-ordering of the polygons on my MapBox GL JS vectortile layer. There is a "category" attribute with values: 1 and 2. Polygons with category 2 should be on the top.
This is the definiton of my layer:
map.addLayer({
  'id': 'testLayer',
  'type': 'fill',
  'source': 'testSource','source-layer': 'polygons',
      "paint": {
'fill-color':   {    "property": "cat",
          "type": "categorical",
          "stops": [
            [1, "#8dd3c7"],
            [2, "#ffffb3"]
          ]}
    }
});

How can I set Z ordering?
I'vew find this: https://docs.mapbox.com/help/troubleshooting/optimize-map-label-placement/
Order of features inside layers:
The draw order of features inside a single vector tileset source layer can be specified
At runtime with symbol-sort-key: If you don't have control over the data at the time of tileset creation, you can influence the draw order of features at runtime using symbol-sort-key.
How to use it? I don't know the syntax and I didn't find any examples.


texts:
I'm quite new to spatial data processing and got to work with some existing legacy data which isnt well documented. I see that in the SQL database geohash values stored along with lat and lon but they aren't characters but long decimals... For example 27944766710 corresponds to 49.63304 6.21676.

Wonder if anyone has an idea (an algorithm or a formula) how this geohash values encoded/decoded?


texts:
I am currently developing a little application in Android which uses GPS.

When i click a button i start to record a "track". If i walk around i save my position every second into a file. This works perfectly except for one thing:

I do not only save longitude and latitude but also the current altitude. Looking through the data I recognized that the altitude jumps some times.

For example the altitude values look like this:

271.4073616670083; 271.5165709069828; 345.6; 271.58538936056465;

The values around 270 metres are quite good. Jump like these happen irregularily but quite often (every 15 seconds there ist at least 1 jump). And the values always jump up to something around 340 metres.

While recording the track with my application I have also been walking around with an app called NMEA Recorder. This app recorded the altitude values as well but they don't jump like the values I receive.

I know that the altitude values of GPS (calculated by the WGS84-Ellipsoid) aren't very accurate but that still doesn't explain why the values jumpt sometimes.

Would be nice if somebody could tell me why jumps like these happen.


texts: QGIS3 ZoomToSelected() not working in QGIS Editor Script but works in Python Console

texts:
Using 3.10.1-A Coruña on Windows 10

I am writing a Python Script in the QGIS Editor but iface.mapCanvas().zoomToSelected() does not appear to be working at all in the Editor.

iface.mapCanvas().zoomToSelected() - works fine in the Python Console

Editor code - apparently does nothing

selectid = [2]
poalayer.select(selectid)
iface.mapCanvas().zoomToSelected() # does nothing
iface.mapCanvas().refresh();

Console - works as expected

iface.mapCanvas().zoomToSelected()

Let me know if I can provide any further info or do a test.

Added additional info: There's something obviously wrong here. From this reply (QGIS: Zoom to selected feature via plugin doesn't works in first attempt) I tried running my script a second time in the same session and it worked.


texts: Finding intersections between multi line segments

texts:
I am trying to find the common intersections between several multi line segments in postgis.
I have a solution, it seems to work for small data networks,but it takes its time for large networks.
My set up is

create table test(id serial, name text );

ALTER TABLE  test ADD PRIMARY KEY (id);
select addGeometryColumn('test','the_geom',3857,'MULTILINESTRING',2);
 create table test_results(id serial, name text );
 ALTER TABLE  test_results ADD PRIMARY KEY (id);
select addGeometryColumn('test_results','the_geom',3857,'MULTILINESTRING',2);

Load some data

insert into test (name,the_geom) values('Line_1',st_setsrid(ST_LineMerge( ST_GeomFromText('MULTILINESTRING((1 1,2 2,3 3),(4 4 ,5 5))')),3857));
insert into test (name,the_geom) values('Line_2',st_setsrid(ST_LineMerge( ST_GeomFromText('MULTILINESTRING((1 1,2 2,3 0,0 0,0 4),(4 4 ,5 5))')),3857));insert into test (name,the_geom) values('Line_3',st_setsrid(ST_LineMerge( ST_GeomFromText('MULTILINESTRING((1 1,2 2,4 4,0 0,0 4),(4 4 ,5 5))')),3857));

Compute all matching segments

insert into test_results(name,the_geom) select t1.name|| ' '|| t2.name as name  ,st_intersection(t1.the_geom,t2.the_geom) as  the_geom from test t1, test t2 where st_intersects(t1.the_geom,t2.the_geom) and  st_equals(t1.the_geom ,t2.the_geom)=false;

i.e. find every intersection in every line  where the lines are not same as each other.
It gives the following results in qgis

where
Line 1 green
Line 2 red
Line 3 yellow
Combine Black

Is there a faster way of getting this to work ?


texts: Why reflectance map in pix4d dont are normalized

texts: I want to know, why my reflectance map, dont have value between 0 and 1. Because my calibration table said me: for example red band has max value = 0.88 nm, and my reflectance map in red band have max value= 1.2 nm.


texts:
I have an ecw aerial map of part of Denmark, I need to import that aerial map into another program, and to do that I need to change the format to a picture. The georeference doesn't matter.

I have been trying to save the file as a geotiff, but the size is enormous, so I want to know if there is any other way to save the ecw to a file that can be opened in fx photoshop.

When using the "convert format" to jpeg, the program argues that the number of bands is not supported.

any good ideas how to change the format without having files that are 50GB, still keep the high resolution, and where it is possible to open the new picture in fx photoshop?


texts:
i have loaded the layers in qgis from database.
so after picking "toggle editing" plugin,the other corresponding plugin are in disabled state only,they are not enabled.how to set "add feature" plugin enabled using pyqgis.


texts: I am new to GIS, I want to develop web application using geoNetwork, Is it posible to use PHP with geoNetwork?