texts: ESRI JavaScript API - Multiple KML Layers - Internal KML Parser Error

texts:
I am building a webmap with the ESRI Javascript API. I am trying to add several KML layers, as well as a Legend Toggle and am repeatedly getting "Internal KML Parser Error" and only some of my layers are appearing on my map. All of my KMLs are publicly available, display properly in Google Earth, are under 10MB, and I'm using API 3.1. The layers that do appear work perfectly in the legend. I'm attempting to add upwards of 20 KML layers in total. My code is as follows (I apologize for not having the actual data, but it's proprietary):

var boundLayers = [];

var kml1 = new esri.layers.KMLLayer('publicURL',{id:'kml1'});
boundLayers.push({layer:kml1,title:'Layer 1'});

var kml2 = new esri.layers.KMLLayer('publicURL',{id:'kml2'});
boundLayers.push({layer:kml2,title:'Layer 2'});

var kml3 = new esri.layers.KMLLayer('publicURL',{id:'kml3'});
boundLayers.push({layer:kml3,title:'Layer 3'});

var kml4 = new esri.layers.KMLLayer('http://services.nationalmap.gov/ArcGIS/rest/services/nhd/MapServer',{id:'kml4'});
boundLayers.push({layer:kml4,title:'Layer4'});

dojo.connect(map,'onLoad',function(results){
if(legend){ legend.destroy(); }
var legend = new esri.dijit.Legend({
 map:map,
 layerInfos:boundLayers
 },"legendBOUND");
legend.startup();
 });

map.addLayers([kml1,kml2,kml3,kml4]);

dojo.connect(map,'onLoad',function(results){

        //add check boxes
        dojo.forEach(boundLayers,function(layer){
          var layerNameB = layer.title;
          var checkBoxB = new dijit.form.CheckBox({
            name: "checkBoxB" + layer.layer.id,
            value: layer.layer.id,
            checked: layer.layer.visible,
            onChange: function(evt) {
              var blayer = map.getLayer(this.value);
                if (blayer.visible) {
                blayer.hide();
              } else {
                blayer.show();
              }
              this.checked = blayer.visible;
            }
          });

          //add the check box and label to the toc
          dojo.place(checkBoxB.domNode,dojo.byId("bounds"),"after");
          var checkLabelB = dojo.create('label',{'for':checkBoxB.name, innerHTML:layerNameB},checkBoxB.domNode,"after");
            dojo.place("<br />",checkLabelB,"after");
          });
        });

Any thoughts?


texts: Efficiently projecting datasets of varying coordinate systems into one coordinate system?

texts:
I am working on streamlining data processing at my organization. Currently we are using various large-scale Models that we will gradually bring into Python.

The gist of our data processing is as follows:

Collect data from sources (State, County, City, etc.)
Project all data to a common coordinate system.
Perform all sorts of processes on the data.

I am currently concerned with part 2. The data comes in various coordinate systems. Our previous Models would run the ArcGIS Project tool individually on each dataset that needed it. Each Project tool in the Model would be projecting to the same output coordinate system, but some may require different transformation methods (or none at all).

You can imagine having about 70 different datasets whose transformation methods are each manually assigned. It's ugly in code, worse in ModelBuilder. Most importantly, it is hard-coded to those specific datasets and therefore not reusable by another collection of datasets. Ideally, I want to be able to choose a bunch of datasets, point them to a script tool, and reliably output them all in the same coordinate system.

I thought of importing all of the datasets into an ArcGIS Feature Dataset which will project all of the data automatically, but as blah238 pointed out in my previous question, it could be unreliable since it makes a 'best guess' on the transformation methods.

Are there any better methods, or any known tricks or custom tools? My organization is mostly in the Esri world, but I'm open to open-source solutions as well.


texts: How to fix AutoCAD file with a field that starts with a " , "

texts:
I have a AutoCAD DWG file with a field that start with " , " and the table doesn't open on ArcMap - the error message is invalid field and I can't export the data to shapefile.

How can I fix it?


texts: How to use range value in UpdateCursor in ArcMap

texts:
I am trying to add range value in attribute tables by using UpdateCursor module of data access (da).

import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
lyr = arcpy.mapping.ListLayers(mxd)[0]
sql = "رقم_المعاملة = '307'"
cursor = arcpy.da.UpdateCursor(lyr, "*", sql)
for row in cursor:
    for x in range(1, 6, 1):
        row[5] = x
        cursor.updateRow(row)

When I run this script, the result is 5 in all attributes. But need the value by range. For example, 1 in row 1, 2 in row 2, ... and 6 in row 6.


texts: Making base maps for weather limited to exact space and output dimension in QGIS?

texts:
I need to make some pretty basemaps and wish to use QGIS.  The program which will use the basemaps is GrADS, which doesn't read any navigated imagery like geoTIFF or kml.  However it produces KML files.  So I can specify the exact domain for QGIS to render.

The rectangle represents the area I wish to output at 1920x1080 pixels.

I know how to make the maps I want, but how do I limit them to this exact space and output dimension?


texts: Build list attribute by compressing existing one in FME

texts: I currently have an attribute table that is exploded - attribute A is repeated for each unique value of attribute B. But I want to "compress" attribute A and change attribute B to a list - so that the new table has only unique values of A and all of the corresponding unique values for B are complied in a comma delimited list attribute (so they're all in the same cell).


texts: Simple coordinate transformation using gdal library C++

texts:
I'd like to convert a coordinate from EPSG:5179 to EPSG:32652 and vice versa.
I've built gdal library and linked to my VS project, but I have no clue how to do it.
I've looked through the website but couldn't find the example.


texts: Spectral signatures difference between a raw image and an atmospherically corrected image

texts:
I did atmospheric correction of Landsat 5 image by Quick atmospheric correction method(QUAC), now I want to compare atmospheric corrected spectral signatures from ENVI QUAC with the input spectral
signatures of a Raw image. What differences are there, and why these differences occur?

Spectral signatures of a Raw image (Landcover features)

Spectral signatures of an Atmospherically corrected image


texts: Opening hyperlinks in a new tab from GeoJSON points when the link to the website is embeded in GeoJSON?

texts:
In the code below the point links are embeded in GeoJSON object places_geojson. How could we make the link to be opened in a new tab?

I believe that this functionality need to be added in the layerGroup layer href section.

Here is the code:

// Define spatial data in GeoJSON format
    var places_geojson={"type":"FeatureCollection","features":
[
    {"type":"Feature","geometry":{"type":"Point","coordinates":[-4.145212,51.569558]},"properties":{"id":1,"condition":"Location 1, Coordinates: -4.145212,51.569558","Link":"http://localhost/condition_0001.jpg "}},
{"type":"Feature","geometry":{"type":"Point","coordinates":[-4.14523,51.569542]},"properties":{"id":2,"condition":"Location 2, Coordinates: -4.14523,51.569542","Link":"http://localhost/new1.html"}}
]}

    // Define map
var map = L.map('mapid', {
    center: [51.565, -4.153],
    minZoom: 1,
    zoom: 14,
    layers: googleSLayer
});
// Map Control
L.control.layers(baseLayers).addTo(map);

// Adding GeoJSON layer with the data to the map and creating marker with popup for each feature
var layerGroup = L.geoJSON(places_geojson, {
        onEachFeature: function (feature, layer) {
            layer.bindPopup("" + feature.properties.condition + "")
  }
})
.addTo(map);


texts:
Upgraded QGIS to 2.14 (Essen) using OSGeo4W and upgraded all plugins:
QGIS2web > 'create web map' immediately freezes QGIS requiring kill and relaunch.
Here's the python log trace:
016-03-06T15:10:23  1   warning:C:\OSGEO4~1\apps\Python27\lib\site-packages\PyQt4\uic\uiparser.py:844: PendingDeprecationWarning: This method will be removed in future versions.  Use 'elem.iter()' or 'list(elem.iter())' instead.
              for include in elem.getiterator("include"):

        traceback:  File "<string>", line 1, in <module>
          File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 271, in loadPlugin
            __import__(packageName)
          File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 572, in _import
            mod = _builtin_import(name, globals, locals, fromlist, level)
          File "C:/Users/hogs hollow/.qgis2/python/plugins\processing\__init__.py", line 29, in <module>
            from processing.tools.general import *
          File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 572, in _import
            mod = _builtin_import(name, globals, locals, fromlist, level)
          File "C:/Users/hogs hollow/.qgis2/python/plugins\processing\tools\general.py", line 28, in <module>
            from processing.core.Processing import Processing
          File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 572, in _import
            mod = _builtin_import(name, globals, locals, fromlist, level)
          File "C:/Users/hogs hollow/.qgis2/python/plugins\processing\core\Processing.py", line 42, in <module>
            from processing.gui.MessageBarProgress import MessageBarProgress
          File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 572, in _import
            mod = _builtin_import(name, globals, locals, fromlist, level)
          File "C:/Users/hogs hollow/.qgis2/python/plugins\processing\gui\MessageBarProgress.py", line 34, in <module>
            from processing.gui.MessageDialog import MessageDialog
          File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 572, in _import
            mod = _builtin_import(name, globals, locals, fromlist, level)
          File "C:/Users/hogs hollow/.qgis2/python/plugins\processing\gui\MessageDialog.py", line 38, in <module>
            os.path.join(pluginPath, 'ui', 'DlgMessage.ui'))
          File "C:\OSGEO4~1\apps\Python27\lib\site-packages\PyQt4\uic\__init__.py", line 210, in loadUiType
            winfo = compiler.UICompiler().compileUi(uifile, code_string, from_imports, resource_suffix)
          File "C:\OSGEO4~1\apps\Python27\lib\site-packages\PyQt4\uic\Compiler\compiler.py", line 139, in compileUi
            w = self.parse(input_stream, resource_suffix)
          File "C:\OSGEO4~1\apps\Python27\lib\site-packages\PyQt4\uic\uiparser.py", line 933, in parse
            actor(elem)
          File "C:\OSGEO4~1\apps\Python27\lib\site-packages\PyQt4\uic\uiparser.py", line 844, in readResources
            for include in elem.getiterator("include")


texts: Is "eCognition Developer Trial 64 9.0" no longer available for download?

texts:
I would like to install the trial version from eCognition, but I cant find a working downloadlink, also after registration on the Trimble web page.
Removed Trimble the trial version for eCognition?


texts: Why don't set Geometry column in OpenLayers wfs-t request to geoserver?

texts:
I want to edit a vector layer(its a point layer) using OpenLayers 3.6 and then save it with wfs protocol. I'm using Goserver 2.8 in server side. I define my layer as follow:

var u="http://localhost:8080/geoserver/wfs?&service=wfs&version=1.1.0&request=GetFeature&typeNames=opengeo:Point";
format = new ol.format.WFS({});
wfs = new ol.layer.Vector({
    title: 'Point',
    source: new ol.source.Vector({
        url: 'proxy.cgi?url=' + encodeURIComponent(u),
        format: format
    })
});

I get all features correctly. Now I add a point to layer as follow:

point = new ol.geom.Point([39.8274942, 21.4226638]);
feature = new ol.Feature({
    geometry: point
});
feature.set('NAME', 'Ya Ali Madad');
source.addFeature(feature);

Now saving feature is as bellow:

node = format.writeTransaction([feature],null,null,{
    featureNS: 'http://opengeo.org',
      featureType: 'opengeo:Point',
      srsName: 'EPSG:4326'
});

s = new XMLSerializer();

var url = "http://localhost:8080/geoserver/wfs";

Ext.Ajax.request({
    url: 'proxy.cgi?url='+ encodeURIComponent(url),
    method: 'POST',
    xmlData: s.serializeToString(node),
    headers: {
        'Content-Type': 'text/xml'
    },
    success: function(response){
        console.log("All thing is right.");
    }
});

I use Extjs-6 for creating ajax request. it create a request as follow:

Request Payload:

<Transaction
    xmlns="http://www.opengis.net/wfs"
    service="WFS" version="1.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://www.opengis.net/wfs
        http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
    <Insert>
        <opengeo:Point xmlns:opengeo="http://opengeo.org">
            <geometry xmlns="http://opengeo.org">
                <Point xmlns="http://www.opengis.net/gml">
                    <pos>39.8274942 21.4226638</pos>
                </Point>
            </geometry>
            <NAME xmlns="http://opengeo.org">Ya Ali Madad</NAME>
        </opengeo:Point>
    </Insert>
</Transaction>

Request in Network:

And geoserver response this request as follow.
GeoServer response:

<?xml version="1.0" encoding="UTF-8"?>
<wfs:TransactionResponse
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:ogc="http://www.opengis.net/ogc"
    xmlns:wfs="http://www.opengis.net/wfs"
    xmlns:ows="http://www.opengis.net/ows"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:gml="http://www.opengis.net/gml"
    xmlns:opengeo="http://opengeo.org"
    xmlns:usa="http://census.gov"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    version="1.1.0"
    xsi:schemaLocation="
        http://www.opengis.net/wfs
        http://localhost:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd">

    <wfs:TransactionSummary>
        <wfs:totalInserted>1</wfs:totalInserted>
        <wfs:totalUpdated>0</wfs:totalUpdated>
        <wfs:totalDeleted>0</wfs:totalDeleted>
    </wfs:TransactionSummary>
    <wfs:TransactionResults/>

    <wfs:InsertResults>
        <wfs:Feature>
            <ogc:FeatureId fid="new0"/>
        </wfs:Feature>
    </wfs:InsertResults>
</wfs:TransactionResponse>

Geoserver add this point in database, but don't set geometry field. it only set properties column and Not geometry column.

Where is the problem? How can I do to fix it?


texts: How to add an identify button with ArcGIS JS API?

texts:
GIS StackExchange is the first website that I've come across that has come near to answering my question, but somehow I can't work the answer out in my head/or the answers here have confused things more.

I'd like to put a simple identify button on a web map. In simple terms, I want a map where the identify task is disconnected onload with an equally simple toggle on/off identify button.

I understand that you need to dojo.disconnect the onclick identify function and that you then need to dojo.connect it back in the onclick of a button but I can't work out how it all comes together. I've read and re-read the ArcGIS JavaScript API 'working with events' page but this too has lost me.

Any help would be great.


texts:
Due to some constraints, that I will not go into, I have found myself needing to implement custom panning in my application.

The ArcGIS API reference suggests using the following methods:

IScreenDisplay2.PanStart(IPoint start)    // Starts a pan
IScreenDisplay2.PanMoveTo(IPoint moveTo)  // Moves to a point
IScreenDisplay2.PanEnd()                  // Ends the pan

Each of these methods is called in the following event handlers (respectively):

IMapControl4.OnMouseDown     // Call PanStart()
IMapControl4.OnMouseMove     // Call PanMoveTo()
IMapControl4.OnMouseUp       // Call PanEnd()

So all of that works fine, the events are handled, the panning starts, everyone is happy.

-but-

Where the screen actually pans is not where I have dragged my cursor.  The map slides around in a somewhat deterministic pattern, but I can't seem to figure out how to compensate for what the API is doing.  I have been unable to find any enlightening documentation.

Does anyone have experience with this part of the API?  Sample code or documentation would be great!


texts: Mapbox - referencing a layer added in Studio in GL JS

texts:
I know this is a pretty basic question, but I'm fairly new with JavaScript and Mapbox. I have a map that I created in Mapbox Studio. Now I'm using GL JS to create an interactive map for my website. I want to be able to toggle layers, so I'm using this tutorial: https://docs.mapbox.com/mapbox-gl-js/example/toggle-layers/

My issue is that in the example, they first add layers to a blank map. I have the layers already on my map from adding to my style in Studio. So, I can take out the map.addSource and map.addLayers parts of the code because I don't need to add layers. But then when creating the toggle button, it doesn't point to the layers from my Studio style. What do I need to add to reference the two layers already in my style?


texts: Cesium: are there any easy hacks to load non-square tile images on Cesium?

texts:
The map tile images I created have non-square tiles in the maps edge. If the image format is png, I can put transparent pixels to make images square, but unfortunately, my image format is jpg, so I can't add transparent pixels to tiles.

If Cesium loads non-square tile images, it expands the tile image fit to be square, and this looks so bad.  Remodelling ImageryProvider.js to add transparent pixels to the tile on-the-fly is the possible solution, and actually I did this on OpenLayers 3, but it takes too much effort.

Are there any good hacks to load non-square tiles on Cesium, with no or light effort?


texts: When I finish drawing a polygon, it disappears again (although appearing in my attribute table)

texts:
I'm working with Quantum GIS at this moment. And as the title says, when I finish drawing a polygon, it disappears again. The new object does appear in my attribute table and in the legend/'filling of the polygon' should not be the problem. Before this never happend, so I supposed it was some change I made in the options. But even after reinstalling the program the problem stays.
After searching for a while I discovered that on a new project it works correctly till the moment I import a vector-file I made before with line objects.
How can importing a file have such an influence?

Thanks in advance!


texts: PyQgis: inaccurate points from geom.splitGeometry()

texts:
I have some problems with inaccurate points from geom.splitGeometry() and wonder if this is a known bug (or even an intended mechanism), if it is possible to prevent it or work around it and if it is worth writing a bug report (or if it is a known and accepted bug e.g. cause of some rounding errors, that can't be prevented).

Summarizing the problem:

find intersection point P of two lines, A and B
distance from P to A is zero, and intersects
distance from P to B is not zero, and doesn't intersect
distance from P to backup of A is zero but does not intersect
distance from A to B is also zero but does not intersect
happens also with geom.intersects(), geom.closestSegmentWithContext(), geom.nearestPoint() and probably further
is a big problem e.g. if using split Points of Polygons for creating new Lines and testing spatial operators with original Polygon

Some further remarks regarding splitGeometry():

Especially I don't exactly know what the 2nd statement in splitGeometry does (something with topological editing and if I turn it to False, I don't even get a point back - I am not quite sure if it is turned on standardly in a standalone script or how to test/change it and if it would change anything - maybe "true if topological editing is enabled" may also mean that with True it is enabled for this process? I am not quite sure).

To clarify some very simple code:

#creting points and lines and copies of lines
a = QgsPoint(0, 1)
b = QgsPoint(1, 10)
c = QgsPoint(-5, 6)
d = QgsPoint(4, 5)
line_a = QgsGeometry().fromPolyline([a, b])
line_a_backup = QgsGeometry(line_a)
line_b = QgsGeometry().fromPolyline([c, d])

#splitting one line with the other
succes, geoms, points = line_a.splitGeometry([c, d], True)

#testing returned point on intersection with lines
point = points[0]
print point
>>>(0.487805,5.39024)

qgsp = QgsGeometry().fromPoint(point)
if qgsp.intersects(line_a):
    print 'intersects'
else:
    print qgsp.distance(line_a)
>>>intersects
#all good with the splitted line

if QgsGeometry().fromPoint(point).intersects(line_b):
    print 'intersects'
else:
    print qgsp.distance(line_b)
>>>3.92331593257e-16
#distance between the split line and the intersection point with the splitted line?
#Though very small is a big problem with spatial operators

if qgsp.intersects(line_a_backup):
    print 'intersects'
else:
    print qgsp.distance(line_a)
>>>0.0
#Still no intersection even with Zero distance?

if line_a.intersects(line_b):
    print 'intersects'
else:
    print line_a.distance(line_b)
>>>0.0
#Still no intersection even with Zero distance?

This is very frustrating and expensive to deal with if working with polygons - e.g. I want to test if one of the split points from two seperate splitGeometrys are in the specific subpolygon or test if a line beginning at the split point crosses the original polygon - which might happen only through these deviations, while it actually doesn't or shouldn't at least.

(tested on Qgis 2.18.3 and Windows and Qgis 2.8.6 and Ubuntu and Qgis 2.8.1 and Scientific Linux)


texts:
I am looking for either an online tool or one that I can download to convert DD to DMS.

For example, I want to convert from:

41.590833, -93.620833 to 41° 35′ 27″ N, 93° 37′ 15″ W ...  Those are the coordinates, according to a Geohack, for Des Moines.


texts: Assign row object as field name in ArcGIS

texts:
Is there a specific way to assign the object that for example row[0] returns in a SearchCursor to a new field name? I mean how to write it in add field syntax, this doesn't work: arcpy.AddField_management(fc, str(row[0]), "DOUBLE"). That field is a string field by the way. I can't find such an example anywhere online. Here is the code:

import arcpy

fc = "C:/Users/salahmed/Documents/ArcGIS/Test.shp"

myList = []
myList2 = []
myList3 = []

myField = ["USE"]
myFields = ["USE", "Stadteil", "PERCENT"]

with arcpy.da.SearchCursor(fc, myField) as cursor:
    for row in cursor:
    if row[0] in myList:
        pass
    else:
        arcpy.AddField_management(fc, str(row[0]), "DOUBLE")
        myList.append(row[0])
del cursor


texts: QGIS 3.10: Project and Layer have Proj. Coord. System, why is layer tilted?

texts:
[OP edited to change tense and to show correct steps, in italics]
QGIS 3.10, Ubuntu 18.04
I was questioning why my map displayed at a +10 degree rotation, but displayed unrotated in the Print Layout.
What I did/do now.

Set Project->Properties->CRS to EPSG:5070 - NAD83 (Conus Albers)

Load 8 NED30m tiles covering the Grand Canyon.

Create a Virtual Raster from those and reloaded the .vrt file.
3.1 Change the newly reloaded VRT Layer's CRS to EPSG:5070
3.2 Zoom to that layer--to verify that it is indeed not rotated.

Export the zoomed layer as a Geopkg in EPSG:5070.

Exit QGIS.

Restart QGIS, set Project->Properties->CRS to EPSG:5070.

Load the EPSG:5070-saved Geopkg as a new raster layer.

Verify that its Layer CRS is EPSG:5070.

Expect the layer to display with North UP, which it does, with the addition of steps 3.n and the edition of step 4.

The layer also displays properly in Print Layout.

[Harking back to my 4Y3M's-ago question, Project->ProjectProperties->General->CoordDisplay IS set to "MapUnits" as directed by AndreJ, whom thanks again.]
Q. Could someone explain why this is happening, and perhaps suggest another approach, or PCS, to reach my goal; namely, a large-format print of multi-tile b&w elevations? *The corrected steps result in a GCS layer exported to PCS to display squarely/rectilinearly in a PCS project.


texts:
I am trying to use select by expression to query lines that contain certain attributes and that there geometry touch. In other words are connected or neighbour each other.

I tried a query such as this. My attribution might not make sense but I just need the syntax correct.

"isDiscouraged" = 't' AND touches("roadclass" = 'ramp')

or

"Links that have this attribute" AND Touch "links that have this attribute"

So I want to find links that contain the attribute isdiscouraged = t that are connected to links with this other attribute roadclass = ramp. Is this possible?

My above query is invalid but lays out what I'm looking for. Any ideas how to tweek it to make it work.

I know its kind of a more spatial query combined with attribute query but can't get it to work!


texts: Is it a good idea to migrate to OpenLayers 3 now

texts: I wonder if OpenLayers 3 is trustable enough to start migrate application to it now. Is the difference between versions 2 and 3 are too much important that the old code wont works? Are the major improvements of OpenLayers 3 is tested enough like 3D?


texts: GeoServer - manually edit WMS GetCapabilities xml files

texts:
I'm trying to use a local deployment of GeoServer. I've got a layer being exported as a WMS that I'd like projected in EPSG:3857 only. However, GeoServer adds in some defaults.
If I'm using standard FTP programs (eg WinSCP), which xml files would I need to manually edit in order to take these out? I'm altering the layer's wmslayer.xml file but that doesn't seem to actually be having any effect.


texts: Saving selection as new shapefile using QGIS gives OGR error?

texts:
I have an issue saving a set of polygons as a new layer that I've selected using the polygon select tool in QGIS.

After selecting the polygons in the main (source) layer, I've tried two ways:

I tried Edit> copy features > paste features as new vector layer. After which I get the dialog box below. A also tried paste features as new memory vector layer - which created a layer, but there were no attributes in the table - is was empty

I tried another way of right clicking the selected layer > save as > save as > and clicked the 'save selection only' in the 'save vector layer as...' dialog box. I got the same dialog box.

Any ideas welcome.


texts: Iteratively exporting from Table to .txt in Model Builder (ArcMap) not appending correctly

texts:
I am solving a location-allocation type of problem where I use a loop to go through several specifications of the problem. The model runs fine, and produces the vizualization outputs just as expected.

At the end of each run I try to append the values from one of the resulting tables to a .txt file using the following script in "Export". The script writes to the file but each time the For loop runs, it overwrites the file instead of appending despite the specification of the code. If I open half-way through the processing I can see the results getting deleted and updated straight after. Can you help me figuring out what is wrong?

import arcpy, csv

table = arcpy.GetParameterAsText(0)
outfile = arcpy.GetParameterAsText(1)

#List of all of the fields in the table
fields = arcpy.ListFields(table)
field_names = [field.name for field in fields]

with open(outfile,'ab') as f:
    w = csv.writer(f)

    #Search cursor that will iterate through the rows of the table
    for row in arcpy.SearchCursor(table):
        field_vals = [row.getValue(field.name) for field in fields]
        w.writerow(field_vals)

FINAL EDIT: I have followed the suggestions and changed my model and my script code as below. Now everything works as expected.

import arcpy

outfile = arcpy.GetParameterAsText(0)
bays = arcpy.GetParameterAsText(1)
service = arcpy.GetParameterAsText(2)

with open(outfile,'a') as f:
    f.write(bays + "," + service + "\n")


texts: Select % of pixel that have a specific value in R

texts:
I have a the following raster layer

class       : RasterLayer
dimensions  : 3865, 6899, 26664635  (nrow, ncol, ncell)
resolution  : 14.83, 14.83  (x, y)
extent      : 361363.5, 463675.7, 5760647, 5817965  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0
data source : in memory
names       : layer
values      : 0, 1  (min, max)

Out of the pixels that have value 1, I want to create a new raster that contains only 20 %.

I have tried the solution explianed here https://stackoverflow.com/questions/42161011/how-to-select-in-a-raster-pixels-with-specific-values but it is not completlety working in my case and I am looking for something more direct.

Is there any suggestion?

-- EDIT --

Having this similar raster layer:

> LC
class       : RasterLayer
dimensions  : 1523, 1251, 1905273  (nrow, ncol, ncell)
resolution  : 14.83, 14.83  (x, y)
extent      : 435676.6, 454229, 5778354, 5800940  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0
data source : in memory
names       : layer
values      : 0, 1  (min, max)
attributes  :
 ID value
  1     0
  2     1

When using the proposed code to create a dataframe with pixels having value 1

k<- which(LC[]==1)
validationDF<-data.frame(S1[k])

The output I get also includes those having differnet values. Here an example of the output:

3               0.54203808           0.24895041           0.22670831           0.46078694           0.50426632    NA
74               0.50227493           0.31457043           0.54777414           0.32805267           0.22595555    NA
75               0.35207680           0.54237461           0.43180075           0.33425951           0.38486433    NA
76               0.36328074           0.41732568           0.70713311           0.55753678           0.55029380    NA
77               0.41078874           0.31826615           0.53114951           0.57591325           0.64157540    NA
78               0.45285624           0.22833233           0.42914906           0.38943154           0.37679926    NA
79               0.39223304           0.34883267           0.43133700           0.53802007           0.24752679    NA
80               0.28511491           0.83619344           0.32504967           0.58656722           0.12048869    NA
81               0.32361615           0.83749610           0.49244761           0.55320078           0.28306779     2
82               0.46567097           0.71770340           0.73712200           0.69843239           0.37452736     2
83               0.74498045           0.87335765           0.84909189           0.84107888           0.60185462     2
84               0.88498110           0.90481257           0.88580418           0.83265042           0.82502586     2
85               0.80765188           0.81705832           0.78906369           0.64642227           0.86415219     2
86               0.51198280           0.34016779           0.64171618           0.45680562           0.70922333     2
87               0.36744031           0.48365906           0.67687130           0.37062010           0.66719669     1
88               0.43470848           0.56459582           0.72314465           0.55038470           0.66051489     2
89               0.53563386           0.69634366           0.73726457           0.57873970           0.57167530     1
90               0.64553213           0.67632288           0.68176281           0.51696473           0.46562076


texts: I have to import data vector and raster into GRASS GIS database. I try several projections and I don't know why I can't display the data in Grass GIS. But I can display my data with the grass plugin in QGIS...


texts: R: gdal_translate/gdalwarp/gdalUtils for georreferencing raster


texts:
I am using ArcMap One-way replication tool to synchronize feature classes from Oracle to MS SQL Server (once a day), but replication only works for the versioned data with move edits to base option as unchecked and only edits or changes from that specific version are synchronized in MSSQL server.

The version of the feature class (Oracle's) in ArcMap is different from the base tables (the one that is shown in Oracle SQL developer), how can I make sure that the data in base table and the one that is shown in ArcMap are same? How can I make sure the edits or changes that are made in either of the version are reflected to the other? How to make ArcMap aware of the changes that are made in base table?


texts:
I'd like to create a script tool to create Topo DEM with TopoToRaster, but the parameters are not valid.
I tried using the help: https://desktop.arcgis.com/en/arcmap/10.6/tools/spatial-analyst-toolbox/topo-to-raster.htm and also "Copy as python snippet" funtion too.
However the parameters error get:
Traceback(mostrecentcalllast):File"D:\zites.py",line24,in<module>
topo_DEM=arcpy.TopoToRaster_3d(in_topo_features="magassagm_fieldPointElevation",out_surface_raster="topo_DEM",cell_size="10",extent="buff45",Margin="20",minimum_z_value="",maximum_z_value="",enforce="ENFORCE",data_type="SPOT",maximum_iterations="20",roughness_penalty="",discrete_error_factor="1",vertical_standard_error="0",tolerance_1="2,5",tolerance_2="100",out_stream_features="",out_sink_features="",out_diagnostic_file="",out_parameter_file="",profile_penalty="",out_residual_feature="",out_stream_cliff_error_feature="",out_contour_error_feature="")
File"c:\programfiles(x86)\arcgis\desktop10.6\arcpy\arcpy\ddd.py",line4515,inTopoToRaster
raisee
ExecuteError:ERROR 000622:Failed to execute(TopotoRaster).Parameters are not valid.
ERROR 000628:Cannot set input in t oparameter extent.

This is my code:
import os
import sys
import arcpy
from arcpy import env
from arcpy.ddd import *

racs = arcpy.GetParameterAsText(0)
magassag = arcpy.GetParameterAsText(1)
m_field = arcpy.GetParameterAsText(2)
Sentinel = arcpy.GetParameterAsText(3)
topo_gdb = arcpy.GetParameterAsText(4)

arcpy.env.overwriteOutput= True
buff45= "D:\\termes_modell.gdb\\buff45"

arcpy.env.workspace= topo_gdb
arcpy.env.outputCoordinateSystem = arcpy.SpatialReference(Sentinel)
arcpy.Buffer_analysis(racs, buff45, "45 Meters", "FULL", "ROUND", "ALL", "", "PLANAR")
arcpy.AddMessage("buffer kesz")

arcpy.env.cellSize= Sentinel
arcpy.env.snapRaster = Sentinel
arcpy.env.extent= buff45
topo_DEM= arcpy.TopoToRaster_3d(in_topo_features="magassag m_field PointElevation", out_surface_raster="topo_DEM", cell_size="10", extent="buff45", Margin="20", minimum_z_value="", maximum_z_value="", enforce="ENFORCE", data_type="SPOT", maximum_iterations="20", roughness_penalty="", discrete_error_factor="1", vertical_standard_error="0", tolerance_1="2,5", tolerance_2="100", out_stream_features="", out_sink_features="", out_diagnostic_file="", out_parameter_file="", profile_penalty="", out_residual_feature="", out_stream_cliff_error_feature="", out_contour_error_feature="")
arcpy.AddMessage("topoDEM kesz")

How can I use get parameters and environments here?


texts: Leaflet layer control improperly selects basemaps when displaying multiple maps

texts:
As described on github, there seems to be an issue in Leaflet 1.4.0 when displaying multiple maps on a same page: base layers aren't properly selected.
In Leaflet 0.7.2 however, this seemed to work fine.

The following fiddles demonstrate the issue:
Leaflet 0.7.2 http://jsfiddle.net/sc28/fvy8aq37/2/ --> the base layers are correctly selected in both map controls
Leaflet 1.4.0 http://jsfiddle.net/sc28/9j3hstgx/ --> the base layers are only selected in the second map; when a base map is clicked in either map control, it gets deselected in the other.

Does anyone know of a solution or workaround for this issue?


texts: How to load territorial maps on QGIS from web?

texts:
Is it possible to use QGIS like Google Earth?

I need to draw simple shapes on territorial maps.
I would like to do that without using multiple files for each part of the Earth.

I use QGIS 1.8, but I can upload to the lastest version if necessary


texts: Using Google Maps Restricting Bounds API with ArcGIS JavaScript API?

texts:
I am trying to make a map with ArcGIS 3.29, but in my map I need a bounding box. The ArcGIS API does not have a bounding box function, but the Google Maps API does.  What I am having trouble with is using the ArcGIS map with the Google Maps bounding box. This is what I have so far:

var map;

require([
  "esri/map",
  "esri/geometry/Extent",
  "esri/SpatialReference",
  "esri/dijit/Search",
  "esri/layers/FeatureLayer",
  "esri/InfoTemplate",
  "esri/layers/ArcGISTiledMapServiceLayer",
  "dojo/domReady!"
],
  function(
    Map,
    Extent,
    SpatialReference,
    Search,
    FeatureLayer,
    InfoTemplate,
    ArcGISTiledMapServiceLayer
  )
  {
    var boundingBox = new Extent(-122.3737, 37.454, -121.467, 37.9067, new SpatialReference({ wkid:4326 }));
    /*
    //THIS IS ARCGIS
    map = new Map("map", {
      extent: boundingBox,
      basemap: "streets",  //For full list of pre-defined basemaps, navigate to http://arcg.is/1JVo6Wd
    });
*/ //THIS IS GOOGLE MAPS
    var acBounds = {
      north: 37.90668952,
      south: 37.45395007,
      west: -122.37374882,
      east: -121.46909034,
    };

    var alameda_county = {
      lat: 37.65,
      lng: -121.91
    };

    map_google = new google.maps.Map(document.getElementById('map'), {
     center: alameda_county,
     zoom: 13,
     restriction: {
       latLngBounds: acBounds,
       strictBounds: false,
     }
   });

Is there a way to use ArcGIS with Google Maps without breaking the code?


texts:
I have the following problem:

The edge of the imagemosaic is not fit well, Im using geoserver imagemosaic tool to serving orthophotos through wms server. Is it a CRS, Bounding Box problem?


texts: The north pole is deformed on AuthaGraph world map

texts:
On the AuthaGraph world map the world is mapped on a tetrahedron, so the map near the poles fits more the real sizes of the continents.

But isn't the north pole extremely deformed when projected on the peak of the tetrahedon?

It just doesn't look right, If you compare this:

with:


texts: Download Modis LAI/FPAR product with MODIStools R package

texts:
I want to download the full MODIS archive for the LAI product using the  MODIStools R package.

I am running the command lines below but the output file only contains data from 2014 onwards. Any idea why I do not get the full time series (2000-2015)?

lat <- c(23.6947, 37.0894)
long <- c(60.8786,  79.3074)
period <- data.frame(lat=lat,long=long, start.date=2000,end.date=2014,id=1)
MODISSubsets(LoadDat = period, Products = "MOD15A2",
             Bands = c("Lai_1km", "Fpar_1km", "FparLai_QC"),
             Size = c(0,0))


texts: Fill polygon with range of none-adjacent colors?

texts:
I have a layer in QGIS showing U.S. counties.
I would like to color-fill the polygons in a layer using a range of 5 colors, so that no colors are adjacent to each other.

Is this possible?


texts: Select desired number of cells in raster using values in QGIS

texts:
I have a "likelihood" raster map which ranges from low to high (e.g. 0 to 100), and I would like to select a specific number of raster cells based on these values. So, if I want to select 533 cells, I want to select the 533 cells with the highest values of the likelihood map.

Trying to find the correct number of cells (by looking at the cell statistics or histograms) was not successful, and also I work with large rasters (large countries with a 200m resolution), so trying my luck with different "larger than" expressions in raster calculator is not feasible as well.


texts:
I have been a .NET programmer for 13 years but I have absolutely no GIS experience and I need a starting point.

I have to take some shape files and overlay them on a graphic of a static map. With the overlays I can then show some data for each polygon I have created. I have the data (xml) and the shp files. How can I get the data from the shp files (I assume its lat/long of all the points that make up the area) and then how can lat/long be converted to x,y to be plotted on a web page.

At this point I am not even sure how to open a SHP file and extract the data. Is there a an API can use to help me to do this. I am going to be using .NET Framework 4.5 Visual Studio 2012.


texts: How to create layer from shapefile in QGIS?

texts:
I have a road network shapefile that I want to use to create multiple maps from it, each based on some selection of original shapefile. For example, I want to show all highways with some custom symbology and all bike paths with a different symbology both based on the road shapefile( so they are automatically updated whenever network is modified).

I don't want to create a new shapefile for each of them, as the whole purpose is to map these selections and see the changes as road network is updated.
I think I was able to do this in ArcGIS by creating a new layer, but at least I can't find it in QGIS.

Thanks in advance.


texts: Which elevation data source has the highest precision for Russian Far East?

texts:
If I want to get data on the elevation around the city of Artyrom (region around 132.159633, 43.350116), which elevation data source has the data with the highest precision for that region?

I found

SRTM (Shuttle Radar Topography) mission, which allegedly has a resolution of 30 meters (but I couldn't find the data set for Artyom at their web site , only for Africa).
Routine ASTER Global Digital Elevation Model seems to be even better (10-25 meters precision).

Are there any better alternatives?


texts: Drawing decorated line in ArcGIS Runtime SDK for .NET?

texts:
I'm looking for a way to draw a decorated line in the map, specifically a line with squares or triangles along it, with the shapes being equally spaced along the line and drawn perpendicular to it. Here's an examples of the result I need:

I've tried using a CompositeSymbol, consisting of a SimpleLineSymbol and a SimpleMarkerSymbol, but the markers show on every vertex of the line, instead of equally spaced along it, and always with the same orientation.

Is there a way to create a line symbol that achieves the effect I'm looking for?


texts: How to calculate stream order for vector data without a DEM?

texts:
I have a shapefile which contains the streams that were digitized from a satellite Image. I would like to calculate the stream order for this data. The data does not exactly match the DEM that I have, since the satellite image was of much higher resolution.

Is there any arcscript, code or readymade tool which I could use to calculate the stream orders?

I have Arcgis 10 with spatial & 3D analyst, as well as QGIS.


texts: Distance between sequential points postgre

texts:
My table is as follows

1;"2015-10-02";"POINT(lat,lon) as geometry"
2;"2015-10-03";"POINT(lat,lon) as geometry"
3;"2015-10-04";"POINT(lat,lon) as geometry"

How can I find the distance between two sequential points?

So I'd have id=1 and id=2 distance between them = 99m (distances would be found between [1,2],[2,3],[3,4] and so on

Later on I'd like to aggregate them (if distance < 100m aggregate)

I have not gotten very far with it

This gives me the distance but I don't know how to get the next row's geometry

SELECT st_distance_sphere(t.latlon,next.latlon) from test as t where id=1

Then I tried to read the distance as a additional column but could figure out a correct query

UPDATE test SET dist=ST_Distance(test.latlon, next.geom)
FROM (SELECT latlon FROM test WHERE id = test.id + 1) into b;

Desired result would be

1;"2015-10-02";"POINT(lat,lon) as geometry";distance between 1 and 2
2;"2015-10-03";"POINT(lat,lon) as geometry";distance between 2 and 3
3;"2015-10-04";"POINT(lat,lon) as geometry";distance between 3 and 4


texts: Which flow routing algorithms does ArcGis support?

texts: Other than standard D8 are there support for multiple flow algorithms like FD8, DEMON, Dinfinity etc?


texts: Project world map to Esri EPSG in GeoServer

texts:
What I would like to do is to project world map from EPSG:4326 to other ones in GeoServer, special for the Esri EPSG world projection methods. GeoServer has so many EPSG codes in the demo/srslist, but seems most of them do not work.
For example,from EPSG 4326 to 54052 PROJCRS["World_Goode_Homolosine_Land"], I put the gt-epsg-extension-23.2.jar which mainly support the Esri EPSGs to the GeoServer lib path，it should have done for it's projection, but nothing happens.
So how to make GeoServer support the Esri world map projection, like "World_Goode_Homolosine_Land" 54052, "World_Bonne" 54024 or "World_Winkel" 54019? GeoTools maybe supported the Esri EPSGs, does some errors happen in the GeoServer inside?


texts:
I am very new to using QGIS but what I am trying to do is:

Load a WFS of 'land usages' in the netherlands (PDOK)
plot store locations over the land usages
take a 750 meter radius around the store
see for every store the amount of different landusage within the radius. For instance of the roughly 1.7 square KM -> 300m2 is "highways" and 100m2 is "business park"
Export this to a CSV

What i have reached so far is my step 1, 2 and 3:

I have figured out how i can get the shapes of land usage within the circle and touching it, however i want to know exactly the amount of space for every type of land usage in my circle (and then for every store).


texts:
I'm working with huge .kml files (up to 10 Gb) and need an efficient way to read them into R. Until now I've been converting them to shapefiles via QGIS and then back into R with readShapePoly and readOGR (the latter, by the way, is ~1000 faster than the former). I'd ideally like to cut-out the QGIS intermediary stage as it is cumbersome and slow.

How to read .kml files in directly?

I see this can be also be done with readOGR. Unfortunately, I cannot see how to implement the worked example (after lengthy preparation of .kml file: xx <- readOGR(paste(td, "cities.kml", sep="/"), "cities")). It seems that "cities" here is the name of the spatial objects.

Roger Bivand admits that "How one discovers this name is not obvious, since the KML driver in OGR needs it to access the file. One possibility is:

system(paste("ogrinfo", paste(td, "cities.kml", sep="/")), intern=TRUE)

"

But this does not work for me either. Here's a test .kml file to try it on. With it in my working directory, readOGR("x.kml", "id") generates this error message:

Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv) :
  Cannot open layer .

And system(paste("ogrinfo", "x.kml"), intern=TRUE) generates:

[1] "Had to open data source read-only."   "INFO: Open of `x.kml'"
[3] "      using driver `KML' successful." "1: x (3D Polygon)"

, which I simply don't understand.

Would getKMLcoordinates {maptools} be a valid alternative?

I've also tried this:

tkml <- getKMLcoordinates(kmlfile="x.kml", ignoreAltitude=T)
head(tkml[[1]])
tkml <- SpatialPolygons(tkml,
                        proj4string=CRS("+init=epsg:3857"))

The coordinates are generated correctly, but my attempt to convert them back into a polygon object failed with the following message:

Error in SpatialPolygons(tkml, proj4string = CRS("+init=epsg:3857")) :
  cannot get a slot ("area") from an object of type "double"


texts: OpenLayers 5.3 - Managing lots of layers and "sublayers" depending on their attributes values

texts:
I'm currently implementing a web map application (OpenLayers 5.3, Tomcat 8/GeoServer 2.14.0, Apache)

There is a rising number of vector layers coming from different external WFS services.
Using WMS service is not enough, application is supposed to do more than just showing the data.

For almost every vector layer, I make as many "sublayers" as the number of values an attribute (1 in general, sometimes 2...) can have.

The idea is to limit as much loading time as possible but allowing availability of a lot of data (and "subdata").

=> instead of displaying a map with a legend, you can imagine a legend (it already uses a LayerSwitcher) in which there would be a checkbox for each item (or even subitems) in the legend (if you follow my thoughts) because it needs features that can be used for all kinds of topographic processing, not just images.

So, my question is :

Could OOP be of any help by subclassing OpenLayers objects (ol.source.Vector, ol.layer.Vector), by using "design patterns", polymorphism ? The idea is to have a much cleaner code, easily maintainable.
And if yes, should I use new ECMA standard ("class" word, etc...) or stick to the "old" school OOP JavaScript ?


texts:
I have a postgis table with polygon geometries.

I would like to create an sld which first does an inside buffer, and then a difference between the buffer and the original geometry.

This is basically like cutting a hole out of the polygon....ie first buffer (say...50 meters) and then cut this buffered polygon out of the original polygon.

I can´t seem to get my head around the syntax of using the sld filter explained here

http://docs.geoserver.org/stable/en/user/filter/function_reference.html

<Intersects>
<PropertyName>GEOMETRY</PropertyName>
<Literal>
<gml:Point>
<gml:coordinates>1 1</gml:coordinates>
</gml:Point>
</Literal>
</Intersects>

This is an intersect function which only displays the points which intersect 1,1. I guess a DIFFERENCE function with a buffer would have to be somehow nested...but I don´t know if this is possible.

If anyone can help. i´d be really grateful,

yours,
Rob


texts: How to Batch Export Visible layers / layers in a preset using PyGIS

texts:
I would like to save all layers that are part of a preset in QGIS to an external folder using Python

I have got the following code from another question

from qgis.core import *

suffix = "_Test_save"
pathToFile = "C:/Users/david/Desktop/Batch Vector Save testing Python/"

layers = iface.legendInterface().layers()

for layer in layers:
    newName = layer.name() + suffix + ".shp"
    ret = QgsVectorFileWriter.writeAsVectorFormat(layer, pathToFile + newName, "utf-8", None, "ESRI Shapefile")
    if ret == QgsVectorFileWriter.NoError:
        print newName + " saved to " + pathToFile + "!"

This saves all layers in the workspace to my chosen folder but I cannot figure a way to save only the visible layers or even just ones attached to a preset.

This is working code for QGIS2.18 but if possible I would like a solution for QGIS3.


texts: How to specify from which file duplicates should be deleted after appending two datasets

texts:
I am using python script and ArcGIS Desktop 10.8.1 to synchronize two datasets. There are many (thousands) of duplicate features that I would like to drop in an output. How can I specify that, in the case of identical features across datasets, I want to keep data from dmanfile and delete duplicates from cadfile. I am totally new to python, but here are the relevant parts of the code I have so far:
#input files from user console
dmanfile = input("./DSchemaFix1/D_Man_OG/D_Man_Fields_Complete.shp")
cadfile = input("./DSchemaFix1/CurrentCAD/CurrentCADFiles.shp")

gdf = gpd.read_file(dmanfile)
cad = gpd.read_file(cadfile)

gdf_appended = cad.append(gdf)

gdf_dupdropped = gdf_appended.drop_duplicates(keep='first', subset=['StreetName','Address', 'Apartment','ZipCode'])


texts:
I want to aggregate pixel in raster file like Arcgis(picture).
Is this fuction possible in gdal(python) or geotools?
And I want to add option to select representative value(ex.sum, max, average..)


texts: Comparing two fields and printing result as 1 (if number matches) or 0 (if not) using Python Parser of ArcGIS Field Calculator?

texts:
I have two fields named as "sample no" and "data_all" trying to find out whether "sample no" exist on "data_all" or NOT. Using field calculator python 9.3.
if exist print 1 if not print 0 in check_in field. All field are in string format.
For example see attached image in first row "101" found in "data_all" the check_in can print 1 where as in row 2 should be "0". Beginner in python.


texts: How to refresh layer style correctly while setting to group

texts:
I have almost finished to implement the following idea:

When moving a raster layer to a distinct group load a style from a QML style file.

I'm using this code in the Python console in QGIS:

def isInstanceOfGroup():
    root = QgsProject.instance().layerTreeRoot()
    subchild_list = []
    for child in root.children():
        for subchild in child.children():
            if isinstance(subchild, QgsLayerTreeLayer):
                if subchild.parent().name() == 'MyGroup':
                    subchild_list.append(subchild.layerName())

    layer = iface.activeLayer()
    if iface.activeLayer().name() in subchild_list:
        layer.loadNamedStyle('c:/path_to_style_file/test.qml')
        layer.triggerRepaint()
    else:
        pass

iface.legendInterface().currentLayerChanged.connect(isInstanceOfGroup)

Two things that do not work properly:

When I move a layer to the group it don't sets the style when I release the layer (left mouse button). It sets the style when I click on more time on layer.
After the layer is clicked the style is set but the legend has not changed. It changed until I move the layer within the group one more time.

What do I have to change that after releasing/dropping the layer to the group style/legend are changed immediately?


texts: Return Geometry in a Pandas Dataframe Google Earth Engine

texts:
I have found some sample code that returns features from a GEE image to a pandas dataframe based on specific points in my feature collection.
The challenge is I need the geometry on these points to be returned next to the features in the dataframe so that I can spatially join it to another dataset.
Please advise as to how this can be done.
import ee
import pandas as pd

ee.Initialize()
districts = points_features_collections

# selecting images with a data/time stamp and averaging results
chirps = ee.ImageCollection("UCSB-CHG/CHIRPS/DAILY").select('precipitation').filterDate('2018-01-01', '2018-12-31').mean()
evi = ee.ImageCollection('MODIS/006/MOD13A2').select('EVI').filterDate('2018-01-01', '2018-12-31').mean()

composite = ee.Image.cat([chirps, evi]) #concat multiple images into one

# stores multiple regions as one in a feature collection
dist_stats = composite.reduceRegions(districts, 'mean', 5000)

dist_stats = dist_stats.select(['precipitation', 'EVI'], ['tot_rainfall', 'med_evi'], retainGeometry=False).getInfo()

dtstats_df = pd.DataFrame()
for dist in dist_stats['features']:
   df = pd.DataFrame([dist['properties']],columns=dist['properties'].keys())
   dtstats_df = pd.concat([dtstats_df, df], sort=True, axis=0)

dtstats_df = dtstats_df[['tot_rainfall', 'med_evi']]
dtstats_df

Results:
tot_rainfall    med_evi
0   1.233124    2018.826087
0   1.175122    1761.086957
0   1.233124    2018.826087


texts: C# DotSpatial Distance MultiLineString from Point - weird distances

texts:
I have a shapefile with 1 feature of type multilinestring. When I run the below, I get distances that seem off.
            var test = new DotSpatial.Topology.Coordinate( -95.085489,30.341320);
            //var test = new DotSpatial.Topology.Coordinate((double)line.Longitude, (double)line.Latitude);
            for (int j = 0; j < pg.Features.Count(); j++)
            {
                polygon = pg.Features[j].BasicGeometry as DotSpatial.Topology.MultiLineString;
                line.DistanceToCoast = polygon.Distance(new DotSpatial.Topology.Point(test));

            }

in this example i get a distance of like '99' when the actual is something along the lines of 40miles/64km roughly. I cant work out why its showing wrong numbers.
This works perfectly fine with a shapefile of type linestring. If i can convert the multistring to single that would be fine.


texts: Calculate radius of gyration (average distance between cell and centroid cell)?

texts:
Radius of gyration (in the field of ecology) is a measure of the spatial extent of a habitat patch, and is defined as the mean distance between each cell in the patch and the patch centroid (cell-center to cell-center distance).

Can anyone suggest an efficient way to calculate this metric from a raster where patches have a value 1 and the background has a value of 0?

My current model uses the following series of processes, but is clunky and requires a hefty processing time. See below:

Convert raster layer to polygon to find the centroid of each patch (Raster to Polygon, Feature to Point.
Convert raster layer to point to find cell centers of each cell (Raster to Point).
Find the cell center that is closest to the centroid (Near).
Calculate distance between the cell center closest to the centroid and every other cell center in the patch (Point Distance).
Calculate mean of the resulting table of distances (Summary Statistics)

This is all very clunky and time-consuming given the multiple conversions necessary and the number of patches I need to calculate. I am guessing there is a faster and more efficient way to perform this calculation, as other programs like FragStats can do it very rapidly.


texts:
How to put custom tiles xyz raster files example :

http://blablabla.bla/{z}/{x}/{y}.png

I tried to insert it using :

map.addSource('bla.tile',{
        'type': 'raster',
        'tiles': ['http://blablabla.bla/{z}/{x}/{y}.png'],
        'tileSize': 150
    })

map.addLayer({
        'id': 'bla',
        'type': 'raster',
        'source': 'bla.tile'
    })

it works but it overlapp my feature / other shape that load (since it's a basemap).


texts:
I am writing a Python plugin for QGIS. In my plugin, I can fetch data by a WMS GetMap request but I can't draw the map in QGIS from the response I got from my GetMap call.

Suppose I have a variable like below:

    data = requests.get(http://mysite.com/wms?request=GetMap.....)

Now I want to draw this data in QGIS.  How can I do this?


texts: Import of CSV vs. Join by attributes Batch

texts:
-Using QGIS 3.2-

I am trying to join 110 different CSV's with the corresponding shapefiles. I started to use the 'Join Attributes by Field Value' batch process to quickly do this. First, is there any way to have an autofill when using only 1 shapefile? Or to autofill the Yes/No question on 'Discard records', the only thing that allows an autofill is the export option.

But the issues is that when selecting the folder of various CSV, it imports the data as string not integer, which then creates issues later with 110 shapefiles, as you can't use Graduated symbology. The only way I have found to solve this is to use the 'Add Layer-Delimited Text Layer' which then works fine and imports them all as integers, but this only allows 1 input and then doing each csv before running the batch process.

Any suggestions would be useful or quicker ways to do this. I have tried with Modeler but can't find a way to import the CSV's without the same issue. I have also tried to Merge all the CSV's beforehand, though having some issues with Pandas [https://stackoverflow.com/questions/23343919/how-do-i-merge-two-csv-files-based-on-field-and-keep-same-number-of-attributes-o]

Ultimately I would like 1 shapefile with all the columns of the 110 CSV linked to it.


texts:
Is there an ArcObjects function to get a short name version of an SDE featureclass?

For example if my featureclass is:

FOOSCHEMA.BARLAYER

How do I just get "BARLAYER".

Or is it just a simple case of using string manipulation techniques with your language of choice?

BTW - This is an ArcEngine app.


texts: Execute OpenLayers WPS request using WPS Client

texts:
I am having trouble executing WPS processes with the OpenLayers WPS Client. I can execute the processes in Geoserver, however when I try to execute the process from my OpenLayers test app I keep getting errors in my browsers javascript console relating to JSON and xmlhttprequest.

My JS code for creating the client, geometry and executing the process is below - In the Javascript console I can see the WPS  XML and it all looks well formed and good to go. Is the issue with my code trying to decipher the results? JS console image below.

    runoff = OpenLayers.Geometry.fromWKT('Point(148 -36)');

client = new OpenLayers.WPSClient({
    servers: {
        local: '/geoserver/wps'
    }
});

client.execute({
        server: 'local',
        process: 'gs:PointBuffers',
        inputs: {
            center: runoff,
            crs: 'EPSG:4326',
            distance: 1000
        },
        success: function(outputs) {
            for (var i=0, ii=outputs.result.length; i<ii; ++i) {
            alert(outputs.result[i].geometry.toString());
        }
        }
    });

Thanks Andrew


texts:
I am trying to send my drawn features with WFS-t to DB. This particular layer has two columns in DB ogc_fid(which is autoincrementing primary key) and wkb_geometry (type geom, which is my geometry column).
1
WFS_transactional_node = new ol.format.WFS().writeTransaction(featuresForInsertion, null , null, {
                                gmlOptions: {srsName: "EPSG:3765"},
                                featurePrefix: "test",
                                featureType: 'test_layer',
                            });

In featuresForInsertion my features are drawn points which only have geometry property 'wkb_geometry'.
Feature looks like this:
[ol.Feature]
0: ol.Feature
dispatching_: {}
geometryChangeKey_: {bindTo: ol.Feature, callOnce: false, listener: ƒ,
target: ol.g…m.MultiPoint, type: "change", …}
geometryName_: "wkb_geometry"
id_: undefined
listeners_: {change:wkb_geometry: Array(2), change: Array(2), propertychange:
Array(2)}
ol_lm: {change:wkb_geometry: Array(2), change: Array(2), propertychange:
Array(2)}
ol_uid: 101
pendingRemovals_: {}
revision_: 3
styleFunction_: undefined
style_: null
values_: {wkb_geometry: ol.g…m.MultiPoint}
__proto__: ol.Object
length: 1
__proto__: Array(0)

When I try to execute chunk of code marked #1 I got error:
 Uncaught TypeError: Cannot read property 'wkb_geometry' of undefined

Don't know what am I doing wrong. On some places I have red that geometry property and geometry column name in database has to be same, think I already done it.


texts: What format is a location represented like this?

texts:
While converting an old system, I came across a position column with values in a format like this: 38RQT6410550656

While I've never seen global positioning represented this way, putting this in Google Maps will result in a correct location.  Without knowing what this format is called, I've been unable to find any information on this.

What format is this and how can I convert it to latitude and longitude (or get the location into a SQL Geography column)?


texts: Getting QGIS print composer error due to JavaScript problem?

texts:
I've been experiencing a problem with the QGIS print composer. I am working on a Linux Ubuntu platform (Release 12.04 (precise) 64-bit) and I am using QGIS 2.0.1 Dufour.

I need to export a number of maps I have recently created, in either JPG or PDF format (in both 300 and 600 dpi), however, while I am trying to export them using the QGIS print composer the whole system crashes and shuts down immediately!

A pop out window appears and the the error it gives me is the following:

Java script problem:
The script on this page appears to have a problem. Do you want to stop the script?

Whenever I choose -NO- (Not to stop the script) nothing is functioning, unless I choose the option -YES- (To stop the script) so apparently my QGIS project/ workspace immediately shuts down!

Could you give me any hints on how I could fix this problem?

I have already tried to export my maps using much lower dpi (100 and 150, etc.) but unfortunately it still gives me this error (!)

I have already checked previous posts/ replies and I have to mention that I have checked my labelling already. In QGIS 2.0.1 Dufour there is no 'old' and 'new' labelling. I do use however transparency and shadow in my labels.

I just figured out what the problem is! I've been using as background the Google Satellite OpenLayers Plugin, which uses the EPSG code:3857. My population density raster layer is in WGS84, and I have set the CRS of my QGIS Project (from the Project Properties) to be WGS84. So when I was trying to export it using the Print Composer my whole system was crashing!

What I still have to figure out though is how to make my population density raster look better in terms or pixelization. When I set my Project's CRS as WGS84 (EPSG:4326) my raster image looks absolutely fine but crashes if I try to export it as PDF/JPG, on the other hand if I set the CRS of my project as WGS84 Pseudo Mercator (EPSG:3857), my raster seems to pixelate when I make it large.

Any ideas on how to visualise it properly?


texts: Comparing normalize options of ArcGIS Desktop?

texts:
I am wondering if the tool “rescale by function” is definitely doing the same than the raster calculator with the expression ("raster"-min("raster"))/(max("raster")-min("raster"))*100? (I guess so, but I am not sure about it, therefore I am asking). It is really important, as the raster calculator is not working very stable since the update to 10.5.
This question is related to answers of the following post: Normalizing raster using raster calculator in ArcGIS 10.3.1?

Moreover, I tried both methods with the same result, but sometimes the result grid is not reaching the value 100. However, this is the aim of the normalization.

What would you suggest?


texts: Determine if a coordinate reference system is projected from Proj text

texts:
I'm looking for a reliable way to determine if a coordinate reference system is projected or not based on its Proj text.

As examples I'm looking at EPSG:3857 and EPSG:4326

EPSG:3857: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs

EPSG:4326: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs

Is there a rule I can apply across all Proj-supported coordinate reference systems? For example: any value that is not longlat in +proj= will be projected.


texts: Multi-line and Multi-labels formatting in QGIS

texts:
I am trying to apply different text formatting (bold and italics) to multi-line labels in QGIS. I tried HTML tags as seen below, it show what I wanted in the preview below but it deosn't work on the map.

Using text styling will apply the style to both line, I just want the first line to have the style.

Any way around this?


texts: Calculating values in field to round up to 1 if value is greater than 0 using ArcGIS Field Calculator?

texts: I am prepping vector data for raster conversion and analysis. In order to prep the data I need to have a field that represents data/no data (1/0). I built a model that outputs the necessary features but I need to calculate the output field (based on Shape_Area) so that if a row value is greater than 0 (represented as a decimal number), it needs to be rounded to "1". Field type is double.


texts: Make InfoTemplate moveable but still highlight attributes

texts:
I’m using the esri/InfoTemplate in the Javascript API to identify features.  However, it gets anchored to the mouse click and cannot be moved around.

Based on this answer I used dojo/dnd/Moveable to make it moveable.

However, now I cannot highlight or copy the attributes inside of it.  It’s like Moveable turns it into a graphic or something.

Is there a way to make the InfoTemplate floating but still be able to highlight and copy the attributes?

Thanks in advance for your help.

(The other option I’m considering is using the jQuery Dialog Widget, but I cannot get it to highlight the geometry for multiple features.  Any suggestions there would be great too.  Whichever is easier.)


texts: Locations From image.sample() are Different From Input Data in Google Earth Engine

texts:
I found an issue that the locations of the sampled points from ee.image.sample() do not match the locations of the input points.

Above, the image is extracted MODIS 1km band, and the red points are my sample points uploaded from a CSV file.

From GEE Projection tutorials, "the projection of the input is determined by the output". Since everything displayed on GEE is Mercator, I convert the MODIS as WGS84, which is consistent with my training points. I guess that's the reason why they are perfectly aligned together.

After I run the codes below, the sampled points (black) are so wired.

var m1k_scale = m1k.sample({
  region: ast_test,
  scale: 1000,
  projection: "EPSG:4326",  // this line does not matter after check
  geometries: true
})

Code is here: https://code.earthengine.google.com/5a179d3ba449736c10232a4911adb6f6

How do I fix the issue?


texts: Model Builder Error populating attributes with Calculate Field

texts:
I would like to run a model that iterates over all feature classes in a feature dataset and uses the feature class name to populate an attribute field (see model below).  However, when running the model I get the below error:

Might the problem be in the calculate field expression?  It gives me the option to use "Name" from the iterator (hence the arrow connecting name to the calculate field tool). But I can't get the model to run. The resource cited here has not provided much insight.

thanks in advance

I also tried to split the models in two (see below).  The first one executes no problem.  The second gives me the same previous error above.


texts: How to Use WebGL with ArcGIS API for JavaScript 3.24

texts:
Starting with 3.24 of ArcGIS API for JavaScript we can opt in to render FeatureLayer with WebGL.

According to ESRI This allows to display more data in the map and update the visualization of features more rapidly. To enable WebGL rendering of FeatureLayer, we need to paste the following script in the application prior to loading the ArcGIS API for JavaScript:

  <script>
    var dojoConfig = {
      has: {
        "esri-featurelayer-webgl": 1
      }
    };
  </script>

but looking at this sample I am not really seeing any difference  between having the webgl or not on performance speed. Can you please let me know what I am doing wrong?


texts: Strange structures appear inside dry river in Egypt

texts:
Browsing Google maps site reveal some strange structures inside one of the dry rivers in Egypt near Quesser , what is really interesting is that those structures do not appear on Bing maps .

Searching the internet does not shed light on the subject, also there are no photos present on the site.  What could those structures be and why they appear on Google maps only?

Edit

If those structures have been built somewhere in between the two years window. What could those structures be? Is it possible to build structure like this in a given time span at a place like this or are there more structures like this in the world?

If this structure serves as a bridge, I don't see any roads leading to it.


texts: Making 'make'-command work for compiling QGIS-plugins?

texts:
How can I compile my plugin when the 'make'-command refuses to work in the OSGeo4W Shell?

Can I make the 'make'-command work?

Is there an alternative out there?

I'm trying to build a plugin for QGIS. It's plugin Plugin Builder creates a projectfolder. According to tutorials I have to open the OSGeo4W Shell and compile the resources of my plugin by navigating to the project folder and execute the make-command. However, this doesn't work for me, saying:

  'make' is not recognized as an internal or external command,operable
  program or batch file.

I have a Windows sytem so that's not strange. Yet the OSGeo4W Shell should give me the abbility to use this command....I guesss. So I re-installed QGIS by using the Desktop Install by OSGeo4w in hope that it would configure the libraries correctly. Sadly with no effect.

Am I missing something?


texts: Connecting number parameter to Field Calculator in QGIS Modeler

texts:
I intend to develop a model with field calculator processing using the QGIS Modeler.

How do I include the number input by the user to be as a value in Formula of Field Calculator?

This is the model that I want to make, but I stuck in including number parameter into my next field calculator.

For additional information, below is the interface that I want to have.


texts:
I work in the Mobile networks industry and i took up a task to create a plugin for QGIS using c++/python that does the following:

step 1: Create points corresponding to each mobile tower based on Lat/Long of each tower( this part i have accomplished )
step 2: Further: sectorise: each of these towers would have antennas oriented at different azimuths. so i need to create a symbol for each antenna direction (would in the end look like a flower petal in a flower or inward pointed triangles)
step 3: When i click on any sector, all nearby sectors facing the sector should be highlighted in some way( so i can find the neighbors)

What i have to start with is a big excel file containing the sector name , lattitude, longitude, antenna orientation , etc.

Does anyone have any opinion ?


texts: Our organization is going to be publishing many maps with multiple types of layers on ArcGIS Online through an ESRI institutional account.  What types considerations are there when publishing content in this way?  Specifically we are considering speed for the end user of the maps and also credits used for those layers stored on that account.


texts: Leaflet popup disappear or moved over drawn polygon

texts:
If I would like to popup something over an actually drawn polygon,
then it sometimes disappear or moved to the first point of the polygon.

https://jsfiddle.net/o149mgwj/19/

var drawnItems = new L.FeatureGroup();
map.addLayer(drawnItems);

var drawControlFull = new L.Control.Draw({
    draw: {
        polygon: {
          allowIntersection: false, // Restricts shapes to simple polygons
          drawError: {
            color: '#e1e100', // Color the shape will turn when intersects
            message: '<strong>Oh snap!<strong> you can\'t draw that!' // Message that will show when intersect
          },
          shapeOptions: {
            color: '#97009c'
          }
        },
        // disable toolbar item by setting it to false
        polyline: false,
        circle: false, // Turns off this drawing tool
        rectangle: false,
        marker: true,
        circlemarker: false
        },

    edit: {
        featureGroup: drawnItems,
        remove: true
    }
});

map.on("draw:created", function (e) {
    //var drawn_layer = e.layer;
    var temp = drawnItems.addLayer(e.layer);
    //drawn_layer.addTo(drawnItems);

    var popupContent = 'blabla';

    temp.bindPopup(popupContent, {keepInView: true, closeButton: true, autoClose: false, autoPan: false}).openPopup();

/*  if (e.layer instanceof L.Marker) {
        var popupCoords = e.layer.getLatLng();
    }
    if (e.layer instanceof L.Polygon) {
        var popupCoords = e.layer.getCenter();
    }

    var popup = L.popup()
        .setLatLng([popupCoords.lat, popupCoords.lng])
        .setContent(popupContent)
        .openOn(map); */

});

I have tried .css style manipulation as well, like:

.leaflet-interactive {
    z-index: 1;
}

.leaflet-popup-content-wrapper  {
    z-index: 1000 !important ;
}

Any idea to solve this issue?


texts: FeatureClassToFeatureClass_conversion: How to export feature class to shapefile without losing OBJECTID

texts:
I am trying to automate a workflow which involves exporting multiple feature classes (within a geodatabase) to shapefile format.

My inclination has been to use the FeatureClassToFeatureClass_conversion() tool, which I’ve had success with for similar jobs in the past.

The problem is that all shapefiles outputted by  FeatureClassToFeatureClass_conversion() are stripped of their OBJECTIDs. Once exported, these shapefiles must undergo a validation cycle that requires the OBJECTID be intact.

What I'm looking for is the arcpy equivalent of the export data feature in ArcMap, which does not delete the OBJECTID field (FID field is ok).

When I look through the documentation I keep getting directed back to the same FeatureClassToFeatureClass_conversion tool. I feel like there’s something major I am missing here, but I simply haven’t been able to find a solution in the docs or on the web.

Any suggestions?


texts:
Is there any way to create a list based on the number of characters of the files?
My current list goes like that

 rasterList  = arcpy.ListRasters("*speed*","TIF")

My files are
speed01
speed02
.....
speed01500

I want for example only speed01000 to speed 01500
If I could apply a wild card with 10 number of characters this would be solved easily


texts: How to plot polygon in R from coordinates string?


texts: Bing Maps v8 will not load multiple or complex KML files and allow me to query data within these shapes. Is there a work around for this?


texts:
I'm a beginner in Openstreetmap, and I have some questions I didn't find answer yet.

I created my own server tile through this tutorial:
https://switch2osm.org/serving-tiles/manually-building-a-tile-server-14-04/

Now, I need to do some queries locally, but I noticed that overpass api have a installation, and in its tutorial has the following description:
http://wiki.openstreetmap.org/wiki/Overpass_API/Installation

  NOTE: You do not need a database engine (e.g. MySQL or PostgreSQL); the database back-end is included in the OSM3S package.

So, I have my own server tile running, do I need run this full installation? Or is there a way to I use overpass search from my Postgres (postgis) database?

I'm little confused because it has its own database (overpass)(?) according to main description.

In summary: Make it some sense I run queries from my own tile server database, or I need install overpass database and run queries on overpass api database and so plot on my tile server?

If it is possible, someone has some tutorial to indicate me?


texts: Error bands must have compatible data types; found inconsistent types: Float32 and Float64

texts:
I have an image that I have created which is basically paired image with two bands:
band 1 is NDVI image from Sentinel 2
band 2 is SAR image from Sentinel 1

I have tried to export this image to my drive and I get the next error:

  bands must have compatible data types; found inconsistent types:
  Float32 and Float64.

I have seen here few posts about the same error, but couldn't fix it:

I have tried to change it to int16, and it worked, but i'm afraid I'm losing data. I have tried to use the same code but instead of 16 to put 32 but i'm afraid I'm losing data from the 64 and to be honest I couldn't understand really the different between the different numbers. Also, I couldn't use toUint64().
When I upload the int32 image to QGIS, I got black square with values of 0. I don't really need the visualization but I'm worried that I have gotten values 0 and I don't have any value.

pairedImage = pairedImage.toUint32();

Export.image.toDrive({
  image: pairedImage,
  description: 'imageToDriveExample',
  scale: 20,
  region: geometry
});
print('Paired Image',pairedImage);

My end goal is to understand what are the consequence of this, which data I might lose and how I can keep my data.


texts: How to generate a world file with rotation

texts:
I`m writing code to geo reference some images that I get with a rc plane. I have the central coordinate of the image because its atached to the center of the plane. But I have problems when I open the images + jpw in quantum gis, their center doesn't match a point shape that I made with the coordinates that I assume as the center of the plane.

My doubt is, the 2 last lines of the world file represent the coordinate of the center of the upper left pixel of the image, but if the plane is heading south when the image has taken this is will be the lower right pixel coordinate? What I'm doing right now is moving the four coners of my image to 0,0, rotating it by my heading, and moving it back, am I doing something wrong?

The formulas that i`m using to calculate the first four lines of the world file are those:

A = Cos((PI / 180) * Heading) * XPixSize;
D = Sin((PI / 180) * Heading) * -YPixSize;
B = Sin((PI / 180) * Heading) * -XPixSize;
E = Cos((PI / 180) * p.Heading) * -YPixSize;

EDIT:
I'm changing the aproach, now I'm rotating the image with a program to orientate it to north, but I'm still having problems to georefece it, I have the centroid coordinate in Lat, Lon, both sizes of the original image in meters, and the size in pixel of the new, and the old images, but i'm still having problems to create the worldfile.

Just one detail: when I rotate the image, the program creates a image bigger than the original, to let the rotated image fit in.

My question is now similar to this one: georeferencing aerial photos with only known centroid


texts: Export Sentinel-5P imagery from Google Earth Engine in native resolution

texts:
I want to access SO2 data from Sentinel-5P on Google Earth Engine and get the mean values over a period of two years. According to the documentation (https://developers.google.com/earth-engine/datasets/catalog/COPERNICUS_S5P_OFFL_L3_SO2), the spatial resolution "for most products [...] is 3.5x7km²".
Is there a way of extracting the data with this native spatial resolution to Google Drive?
I tried setting the scale using projection().nominalScale(), but the output was erroneous (the spatial resolution was approximately 100x100km²). This is the code I am using:
var sentinel5p = ee.ImageCollection('COPERNICUS/S5P/OFFL/L3_SO2')
    .select('SO2_column_number_density')
    .filterDate('2019-01-01', '2020-12-31')
    .filterBounds(geometry);

var mean = sentinel5p.mean();
var output = mean.toFloat();

var native_resolution = output.projection().nominalScale();

Export.image.toDrive(
  {
    image: output,
    folder: 'MyFolder',
    description: 'output',
    scale: native_resolution.getInfo(),
    region: geometry
  }
);


texts:
Using Python I have a program that makes a GeoTiff map by joining several maps and converting with rgb2pct.

This works perfect and when imported in QGIS georeferencing is OK.
However, I want also GeoPDF (small size en sending to non experts).
I use:

src_ds = gdal.Open(src)
driver = gdal.GetDriverByName("PDF")
dst_ds = driver.CreateCopy(dst, src_ds, 1)

This gives a GeoPDF also OK in QGis. The maps are 4000x5200 px. and should when printed at 20px/mm (508 dpi) print as exactly 1:25000 fitting on A4.
I have tried a lot of options e.g.:

gdal.SetConfigOption("DPI", "4080")
gdal.SetConfigOption("WRITE_USERUNIT", "NO")

But to no avail.

How do I specify the correct dpi for the pdf. (pdfjam works perfect but geo info is lost)?


texts: Implementing both English & Arabic user interfaces to Esri Geoportal Server?

texts:
I am using ESRI Geoportal Server 1.2.2 and need to implement both English & Arabic user interfaces. For this I am maintaining separate resource file for both languages (gpt_en.properties and gpt_ar.properties).  As mentioned within the Localization help section of geoportal server,  I was able to change the UI texts to a desired language (English or Arabic) by configuring it within the gpt-faces-config.xml. This works fine. Now I am having the following queries.

Is there any setting with Geoportal Server which I can modify so that within the user interface itself I can switch between multiple languages ?

This should include the layout changes also (shifting UI elements left to right for Arabic).

Do i need to implement this programetically?

If so, then where will I get the required references?


texts: Finding points that are within a set distance of other points

texts:
I have a large point file: several thousand.  They are all GPS coordinates, recorded at different times, by different people.  Many of them have unique data.  So, for example, there will be one coordinate with one name, and a different coordinate, 50 meters away, with a different name.

I'd like to select, or otherwise find, all the points in the file that are within a set distance of any other point in the file.  So if the distance was 500 meters, then the end result should be a selection of all points that are within 500 meters of another point.

Basically I need to go through the points and decide which one to keep and what data from each one to keep.  There is no way to do this programmatically, I have to sort it out manually.  But if there is a way to at least programmatically find the ones I need to look at, that would be very helpful.

What is the best way to do this in ArcGIS?


texts: Capturing/overriding mousewheel zoom in openlayers

texts:
So I've created a map in openlayers and I am setting it up so that there are only certain zoom levels a user can see.  I have the code created to handle forcing a user to the next acceptable zoom level when they attempt to zoom in/out.  I have been able to create listener for handling double-clicks (see code below) but for the life of me I cannot figure out how to capture mousewheel events.

The documentation makes it seem like it should be straightforward but I've been banging my head against a wall for more than a day trying to figure this out.  All my googling has turned up plenty of results for disabling the mousewheel but nothing for capturing wheel events.

function init() {
    map = new OpenLayers.Map('map_canvas',mapSettings);
    ....
    ....
    );

    var click = new OpenLayers.Control.Click();
    map.addControl(click);
    click.activate();
}

OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
    defaultHandlerOptions: {
    'single': false,
    'double': true,
    'pixelTolerance': 0,
    'stopSingle': false,
    'stopDouble': false
    },

    initialize: function(options) {
        this.handlerOptions = OpenLayers.Util.extend(
        {}, this.defaultHandlerOptions
        );
        OpenLayers.Control.prototype.initialize.apply(
        this, arguments
        );
        this.handler = new OpenLayers.Handler.Click(
        this, {
        'dblclick': this.trigger
        }, this.handlerOptions
        );
    },

    trigger: function(e) {
        var lonlat = map.getLonLatFromViewPortPx(e.xy);
        curZoom = map.getZoom();
        var newZoom = stepZoomIn(map.getZoom());
        updateMapZoom(newZoom);
        map.setCenter(event.lonlat);
    }

});


texts: How to make Plugin-DataSource Layers Editable in ArcMap(Arcobjects)

texts:
The .Net samples of the developer kit for ArcGis contains an example, that shows how a custom data source(Plugin Data Source) can be added as a layer in ArcMap. It is done by implementing interfaces like IPlugInCursorHelper,IPlugInWorkspaceFactoryHelper etc...It displays the contains of a text file(Points in the example) as a layer in the map. This is not editable as of now.

Would it be possible to make this layer editable using the ArcGis editing tools by implementing some interfaces? In that case, what would be the interfaces that i would need to look at implementing?


texts: Labels not rendering at appropriate resolution for a single polygon across different layers

texts:
I have re-used a single geometry layer and joined it with a lot of tables for regional maps of different variables. Now, I suddenly have an issue with labels for one of the polygons.The issue is apparent on layers saved in different locations, with different names and file types. And that are not re-used across QGIS projects. So essentially the layers (20+) that were not manipulated, re-used or interacted with in any way lost the labels for one particular polygon.

The issue randomly appeared, as I did the maps using one of the layers  just a couple of hours before and labels rendered without any issues (I have the pdf - just can't share it due to privacy of the data). Now they are only rendered if you zoom in to the extent >1:250000 (see images). I have checked label rendering at different scales, it is disabled. The issue appears even if I load a month-old layer into an empty project and label using any of the columns.

I also don't have this issue if I open any of the layers in QGIS 2 (label renders).  I have tried re-booting my system, loading any of the layers into an empty project, disabled all non-core plugins - nothing changes. The most bizarre/ludicrous thing is that even layers that were not touched for over a month now do not render the label for this one polygon in an empty project (they most definitely did in the past - I still have the pdfs). So is there some kind of "memory" in QGIS that remembers the geometry and translates it into use/processing of the layer that I can reset? I'm beyond certain that it's not an issue with the data for reasons mentioned above (different file types, file locations, layers not being re-used from one project to another).


texts:
I am making a plugin and what I want to do is display a preview of image in widget. I have previews saved as SVG files. I found a way to show it in plugin window but I must convert them to PNG first. Is there any easy way to convert from SVG to PNG in python/pyqgis?

I found something about cairo, but I don't get how to use it in my plugin code. Anyone can help?


texts:
There are news reports saying that the Sendai earthquake a couple days ago has shifted the earth on its axis and moved the island 8 feet.

Last year, there were similar reports with the earthquake in Chile.

Does this affect GPS devices at all?  Is an inaccuracy introduced?  How does GPS still work if the earth has shifted on its axis?


texts: Viewing 3D relationships of layered points and DEMs by displaying absolute height for both in QGIS?

texts:
What are the limits of viewing points and rasters together in QGIS 3D (either in-app or using qgis2threejs) in comparison to ArcScene?

Is using GRASS NVIZ the solution? (see end of post)

I am using QGIS 3.4.3. I am an archaeologist and I would like to appropriately 3D view the Z relationships between (1) total station-derived points (with XYZ attributes), which I took on multiple superimposed excavation layers, along with (2) DEM or TIN rasters. These ts vector points and DEM/TIN rasters should be superimposed like a layer cake, because they are excavated surfaces that were documented sequentially as dirt was removed.

When I tried qgis2threejs (2.3.1) the DEMs/TINs are anchored way below my points when I use any vertical exaggeration (for example, .5), which is needed to see my points in three dimensions. If I don't use any vertical exaggeration, everything is flat. I'm assuming the DEM is anchored at 0 masl, whereas my points are over 3200 masl (z values). (Note that I followed the plugin's documentation and converted all file and project CRMs to 3857.) See Image:

I simply want to see the DEM displayed using its cell (Z) values so I can see its true relationship to the total station points, such as is possible in ArcScene. Here is an example of this in ArcScene (not the best example, but it shows how there is a DEM floating between a cluster of points, at its appropriate height):

When I use the built in QGIS 3D viewer, it seems I am only able to view a raster clamped to a generic place in space. My points will drape over the raster, but I need to see them in their appropriate XYZ location. If choose "Absolute" for the Altitude Clamping, the points are then moved below the DEM raster (while also shown draped on the DEM surface...):

I am confused by this, because the 3D viewer (in settings) wants/requires you to chose one of your available rasters for the 3d image, but then it doesn't seem to recognize its Z position. For points, however, it allows you to display them using their "absolute" altitude (Z) in the layer properties, but these points can't be shown in relation to the DEM because the DEM is not visualized at its "absolute" altitude. (note: in settings, I tried selecting no raster (the blank line at the top of the drop-down list of rasters) and when I do this, the points go way above the DEM (rather than below as before), but the model is useless to navigate--everything is tiny or disappears when you zoom, and the view jumps everywhere when you try to turn the model.)

Can neither QGIS 3D view nor the qgis2threejs plugin show rasters and vector shapefiles together in their absolute positions like ArcScene can?

If so, it is good to know that this is a limitation of QGIS and I should stop looking for ways around it (I respect that the 3D viewer is newish).

Or is it that I am just not understanding how to appropriately adjust settings for the rasters?

If it is a limitation of QGIS, are there any open source or affordable software options that I can use to easily view the superposition of multiple points and raster layers together in 3D?

Bonus would be to also be able to click on vector points to identify their attributes: most important for my need is to be able to review and explore the data rather than to create a publishable image. I've migrated nearly completely to QGIS from ArcGIS, but I may have reached a wall with this.

Having done further research to find a solution/alternative, it seems that I should be able to use NVIZ to visualize in 3D within QGIS to visualize several layers of different kinds at once, and NVIZ appears to be more sophisticated than QGIS's 3D view or qgis2threejs. But I've not yet mastered how to use it: the log after running NVIZ ends with "Loading resulting layers; "Algorithm 'nviz' finished" but no window pops up to show the 3D data as the process should (apparently) do.


texts: How to create and visualize groundwater plume models?

texts: My water department has asked me about visualization of groundwater plume models. I have no idea where to start. All the links refer me to Cameo/Aloha but these are for Atmospheric modeling as far as I can see. Has anyone any experience with point source plumes in groundwater? I guess the models are similar to those from atmospheric contamination models but I also need to understand which variables are necessary for a successful model.


texts: Can't get CRS transformations to work with scalie

texts: No matter what I do I can,t seem to be able to transform several shape files (all vector) to a CRS that works. What is recommended for British Columbia for forestry purposes is  NAD83  BC Albers.  When I use that in both the settings-Project Properties area and project the layers individually I don't get the work on the composer screen. The size info etc. show normally but nothing comes on the screen.  With WGS84 everything looks fine on the canvas but measuring tools measure in mm and the composer scale bar is way out to lunch. This is qgis 1.8.  Any suggestions?


texts: How to determine which polygons, if any, points fall within?

texts:
I am a amateur at GIS and need some help. I have a group of shapefiles of various areas and an Excel spreadsheet of addresses I have geocoded to points. I want to determine whether each point falls within the boundary of a shapefile, and which feature within the shapefile it falls within.

For example I have:

Shapefile Zone: polygons Zone #1, Zone #2, Zone #3, etc.
Shapefile Area: polygons Area #1, Area #2, Area #3, etc.
Shapefile Address: points Address #1, Address #2, Address #3, etc.

For my results I would like it to list:

 Address           Falls within feature
Address #1     Zone #2, Area #1
Address #2     Does not fall within any feature
Address #3     Zone #3

I know how to incorporate all the polygon features into a shapefile but not how to have it identify what polygon features of the shapefile each point falls into.

I am using ArcGIS and Quantum GIS.  So in summary my issue is taking coordinates and determining if they fall within certain polygon shapefiles I have.  The goal in the end is to start with a list of geocoded addresses (points) and end with a determination of which (if any) polygon's each point falls in.


texts: I have about 1600 fire hydrants that I need to divide in to groups of 10 by nearest neighbor, this process will be used to send out crews to conduct hydrant inspections. I have tried using the Grouping Analysis tool but an error reads no variation in any of the Analysis Fields.


texts: Group points by expression to create pie charts in QGIS

texts:
Is the any way to group multiple points by attribute to make pie charts that shows types by locations?

I have a layer with groups of points with two fields (group and type). Every group of points is exactly in the same location.

What I want to do is to show a pie char in every location showing as many parts as types is in the group.

I've been trying out with count as @Kazuhito suggested in the expression constructor of the diagrams creator of the layer, but the charts are blank.


texts: Querying / seting up PostGIS (raster) table to efficiently get all bands at once?

texts:
I have created a PostGIS raster table from raster2psql.  I have use cases where I might have bands sizes of 114 to 670 bands inside a raster (The number is consistent across a given dataset.)

My problem is there doesn't seem to be a good way to pull out my data on all bands.  I have created a table with all the band information and ran a cross join to get all the bands out, but it can get very slow when I am pulling out all 670 bands of data.

SELECT ST_Value(rast, band_id, (SELECT ST_SetSRID(ST_Point(146.1066, -39.00381), 4326))) AS b1, rid FROM rf_raster cross join rf_bands where rid = 226

(where rid is my simplification to get the correct tile as I am importing my data tiled.)

This takes almost 10 seconds when I am looking for something that will give me a sub second response.

I have been unable to find any simpler or more efficient way to get all of the data out across all bands for my pixel.

I would like to know if there is a known approach for this, or alternatively an option during load that will allow the data to get stored in one bands as the majority of my use cases will want all of the data.


texts:
I've downloaded some maps from copernicus, e.g. this map: http://marine.copernicus.eu/services-portfolio/access-to-products/?option=com_csw&view=details&product_id=BALTICSEA_ANALYSIS_FORECAST_BIO_003_007

I want to maps to be shown on top of each other, but I can't make the colors transparant.

I only want to show the arrows from the "top map", Is there a way to make the gray part transparent?

When I look under symbology I can't choose anything else than single band color.


texts: TRMM 3B42RT product has no Coordinate Reference System?

texts: When I download TRMM precipitation product 3B42RT.2016010100.7.7day and when opening it in QGIS the raster has no CRS and is seen in another place with a smaller resolution, I already tried reprojecting and assigning it an CRS and it continues the same.