texts: Performing Supervised Classification of Houses in Africa using ArcMap?

texts:
I am doing a supervised classification in ArcMap to classify land cover types in a study area in Africa. I am using RapidEye satellite imagery (Planet Labs) and they have 5 bands: blue, green, red, red edge and Near infrared.

I can classify soil and forest cover (see Classified Image) successfully but I'm unable to successfully separate out houses in the classification. I only want to classify the houses that have Iron sheet roofs (they are the small white dots circled in red on the satellite image). However, these houses are being misclassified as soil and road pixels (see classified image).  Ideally, I want to classify 4 land cover types: soil, forest, house, and paved road.

Can anyone suggest a better way to separate out the spectra from human-made surfaces such as the iron sheet house roofs and paved roads? I would prefer to stick to supervised classification if possible, but am willing to try other classification methods. I tried object-based classification (segmentation) in ArcMap I couldn't get the 16 bit RapidEye image to classify properly in ArcMap and it kept showing a black square. And the unsupervised classification methods (e.g. ISO cluster and Class probability) had terrible results in ArcMap.


texts: Is it possible to group geoJSON objects/polygons in a layer?

texts:
In the leaflet.js documentation an example with layers of markers is documented. I would like to create a layer of polygons in GeoJSON format. Is this possible?

I've defined a variable for each GeoJSON polygon, called route1, route2 etc. My .js file looks like this:

var map = L.map('map', {
    center: [55.676098, 12.568337],
});

L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
    attribution: '&copy; OpenStreetMap contributors'
}).addTo(map);

//============
//Create layer
//============

var Southroutes = new L.layerGroup([route1, route2, route3, route4, route5]);

L.geoJSON(Southroutes).addTo(map);


texts: Is there an EPSG coordinate system with Longitude, Latitude that uses international feet for the elevation (Ellipsoid)?

texts: In QGIS am entering data using latitude, longitude and elevation in international feet.  Is there a standard CRS for this?


texts: Trying to Create Tanaka Contours in QGIS

texts:
I am following a tutorial with which to create Tanaka contours from: Tanaka Contours.

I used contour with the default 10 increments setting. Below are the raster and resulting contours.

Following this I used V.split to break up the segments and used max 2 vertices.
I then used this equation in the advanced python calculator to get azimuth:

At which point I styled the resulting calculated layer with this expression:

Here is the result of that:

Clearly, I'm doing something wrong. I just have no idea what that would be. Can anyone shed some light?


texts: Viewing images with relative path through Attributes Form in QGIS

texts:
I work with Sw maps (field data collector) that generates shapefiles in which a field  links to images through relative path. Originally I had non problem using Evis plugin, now discontinued.
Now I try using widgets in Attributes Form.
This is the path where the shapefile is stored: D:\DOCUMENTI\RELAZIONI\sovralluvionamento\shape e vettoriali\New layers sovralluvio\Layers 2020\lanche Shapefiles
This is the Relative path in the field _Foto: \Photos\lanche_20201005_153029157.jpg
I open layer Properties and work in Attributes Form making the steps below, but when I try to view images by Identify Features does not work:


texts: Gram-Schmidt pan-sharpening in open source Python

texts:
I am looking to use the Gram-Schmidt pan-sharpening method in Python but I can't find any libraries that have this as an option. I found this, but I don't understand where to even go after reading it https://www.int-arch-photogramm-remote-sens-spatial-inf-sci.net/XL-1-W1/239/2013/isprsarchives-XL-1-W1-239-2013.pdf

I know you can do this in ArcGIS but I am trying to do everything open source.


texts: How i compare two objects ol.geom.Polygon?

texts: I have two objects ol.geom.Polygon and I need to compare if this two objects are equal. For example if this objects have the same coordinates, these objects are equal but if the coordinates are different these objects are different. I haven't any idea how I implement this, and if have some method compare two Polygons.


texts: Google Earth Engine Timelapse Error: Image collection must have at least one image to create video

texts:
I am learning to make timelapse video in google earth engine. But i am getting an error as i run the task.
Here is the report
Task details: jakarta

State: Failed

Started: 7m ago (2020-01-10 10:00:45 +0700)

Runtime: 19s

Id: P63GZE2VVQ5KZ7K2AEF4G3BR

Error: Image collection must have at least one image to create video

var image = ee.Image(landsat.filterDate('2014-01-01','2019-12-31').filterBounds(point).sort('CLOUD_COVER').first());
var years = ee.List.sequence(2014,2019,1)
print(years)
//Print the image to the console

print('A Landsat scene',image);

//Define vis parameter

var trueColor = {

  bands: ['B4','B3','B2'],

  min: 6000,

  max: 13000,

};

//Add the image to the map

Map.addLayer(image,trueColor,'True Color Image');
// Combine all data in single collection
var peta = ee.ImageCollection('LANDSAT/LC8_L1T')
.filterBounds(geometry)
.filterDate('2018-01-01','2020-01-01');
var timelapse = peta.map(function(img){
return image.visualize(trueColor);
});
print(timelapse)
var coll4Video = timelapse.map(function(img){
    return image.multiply(512).uint8();
});
Export.video.toDrive({
    collection: coll4Video,
    description: "jakarta",
    scale: 30,
    framesPerSecond: 2,
    region: geometry
});

https://code.earthengine.google.com/847652634730f535132b40f7edcbdd29


texts: create symbology categories automatically

texts:
I am using ArcGIS 10.2.2 for Desktop.

I'm creating a model that takes an Excel file with coordinates.

input = Table

input excel

make XY event
copy feature

output = Shapefile

Now I want to automatically add the shp and symbolize by category with a specific field.

Does a way to do this exist with
ArcPy as script added to the model ?  If so, how to do it? Or does a tool to exist to do this?


texts: QGIS expression to check if a an attribute value of a feature exist in another attribute column

texts:
I have a shapefile with two fields 'Name' and 'CountyFacilityID'. I would like to create an expression to select all features where Name exists in the CountyFacilityID column for any of the features.
I tried array_contains( "CountyFACILITYID" ,  "NAME" ) but it didn't work as it is not considering FacilityID as an array


texts: ArcMap not recognising CSV file headings?

texts:
I can't get my maps to work because of an issue I'm having with my CSV files.
I'm trying to import coordinates and heights of wind turbines, and radius for a viewshed analysis and it works on the original file but whenever I edit the file at all, such as changing the radius column figures from 30000m to 5000m and try and display my XY coordinates in the new file, ArcMap 10.2.1 isn't recognising my columns and instead gives me the option of lots of 'fields' to use instead. It starts from 'field 7' so I've worked out that it's not recognising my text but I have no idea why, especially when I haven't changed my text from what it is in the original file which works fine! Can anyone help me out?


texts: How do I get back my latitude / longitude after coercion

texts:
I'm using PostGIS. When I enter the following, you can see that the input point is transformed:

=# SELECT ST_ASEWKT(ST_GeographyFromText('POINT(-33.7832527413259  151.120353207011)'));
NOTICE:  Coordinate values were coerced into range [-180 -90, 180 90] for GEOGRAPHY
                     st_asewkt
----------------------------------------------------
 SRID=4326;POINT(-33.7832527413259 28.879646792989)
(1 row)

Firstly I don't understand why the point is transformed (it's for a point in Sydney Australia so it's a real lat/lon) nor can I work out how to get the original lon value back (~123 is an odd size difference)

Any suggestions (probably a bit of a noob question as this is my first use of a GIS system)


texts: How to set m parameter of clusterR function in R?

texts:
I want to manage a clustered computation on raster and thus use the "clusterR" function in R (package 'raster').
However, there's a tuning m parameter to set, but the only explanation about this parameter is

  m : tuning parameter to determine how many blocks should be used. The number is rounded and multiplied with the number of nodes.

But which value must be associated to this parameter ? How to decide it ?


texts: Print composer: extent of map altered when reopened

texts:
I am preparing a greater set of maps within one project. I save every finished map in the print composer separatly to reopen it again later and do some final adjustments if necessary. It worked fine untill recently the print composer does not reopen the saved map extent but always the recent view of the editor map canvas. That´s a huge pain.

Is this a known problem and how can it be solved?


texts:
I've been browsing the new ArcGIS Online credits policy, but I don't understand very much how much money this service would cost to my company.

I've read two webpages:

http://www.esri.com/news/releases/12-2qtr/arcgis-online-will-change-how-you-think-about-mapping-and-gis.html
http://gis-elektrika.blogspot.com.es/2012/06/arcgis-online-pricing-what-is-service.html

but I haven't drawn a conclusion.

In my company:

GIS web traffic (with ArcGIS Server): 4 people, who use 0.2 Mbps of the bandwidth
Vector information: 20 GB
Raster information (satellite imagery): 100 GB

I'm trying to guess the monthly bill, but I'm not able. Any similar experience is welcome.


texts: Extracting/Exporting coordinates from polygons (shape) to text?

texts:
Is there any well working way to extract the X and Y coordinates of a polygon from shapefile to some sort of text (preferably csv)? The whole process should be somehow done automated through a (python-) script, since there are a lot of polygons. For now it doesn't matter if there is a solution in ArcGIS 10 or somethin hidden within the gdal-libraries or any other OS-GIS.

OpenJump GIS is able to show the coordinates of any object within a shapefile (which could be copied by hand). But as far as I know its not possible to use this function automated.


texts: Create a georeferenced raster from a matrix

texts:
I am trying to create a WGS84 raster from a matrix like so:

from osgeo import gdal
import numpy as np

test = np.random.random((64, 128))
nx = test.shape[0]
ny = test.shape[1]

xmin, ymin, xmax, ymax = [-180, -90, 180, 90]

xres = (xmax - xmin) / float(nx)
yres = (ymax - ymin) / float(ny)
geotransform = (xmin, xres, 0, ymax, 0, -yres)

dst_ds = gdal.GetDriverByName('GTiff').Create('Z:/spotter/output.tif', ny, nx, 1, gdal.GDT_Float32)

dst_ds.SetGeoTransform(geotransform)
srs = osr.SpatialReference()
srs.ImportFromEPSG(4326)                # WGS84 lat/long

but srs.ImportFromEPSG(4326) returns 6 and isn't being set properly.

g = gdal.Open('Z:/spotter/output.tif')
g.GetProjection()

returns empty brackets, ''


texts: GDAL 2.x method for determing if an object is a raster or a vector

texts:
What is the correct method to determine if the resulting object is a raster and/or a vector from the result of a gdal.OpenEx call?

The "old" way (GDAL/OGR Determine if dataset is raster or vector) was to open a file with either gdal.Open or ogr.Open and observe if the result was None to infer the type.

Is it possible to directly query something about the resulting Dataset object to determine the primary GIS type of gdal.OpenEx?


texts: How to find accurate latitudes and longitudes data for cities?

texts:
I want to put the coordinates of cities in a spatial db and then find cities from a given city at some given distance. I am hoping these functions would be readily available in a spatial db like PostGis. First, am I right in assuming this?

The problem I am facing though is this - I do not know where to store these coordinates from. I have this with me - http://download.geonames.org/export/dump/ and it has a 290 mb file (allcountries.zip) with coordinates of all cities but I am not sure how accurate it is. I am going to use this data to build something important so I want to know if someone here uses something more accurate or concise.

If the cities are much farther apart, just the latitudes and longtitudes won't do right? Will need something like spatial ref Ids also? Please suggest the right approach.

Also, given so much info, how does one proceed to find cities from a given city and given distance?


texts: The button icons in the Measure dialog box disappear!

texts:
My development environmnet is vs2008 c# + AE 9.3.
I use the follow codes to implement the measure tool:

        ICommand cmdMeasure;
        cmdMeasure = new ControlsMapMeasureToolClass();
        cmdMeasure.OnCreate(MapControl.Object);
        MapControl.CurrentTool = cmdMeasure as ITool;

But When the Measure dialog box shows,the button icons is disappear.As shows in the picture.I can't solve this problem. Please help me, please!!


texts: Sedimentary Basins GIS Database Australia

texts:
I'm currently working with a place on Australia and I can't find the a shapefile polygon of the Northwest Australia Sedimentary basins.

Can someone that already works with this current dataset can send me a link to download it?


texts: How can I test for exclusive access to the scratch gdb?

texts: I have an application that uses the scratch geodatabase. Upon completion of our work, we delete the scratch geodatabase. The next time our app runs, scratch gets recreated automatically. How do I test for exclusive access to scratch prior to attempting the delete? During some recent debug activities, I had ArcMap open and was consuming some of the feature classes in the gdb. This caused an error when the delete process ran.


texts: Calculate data from a set of raster files

texts:
I need to make some calculations with data from raster files saved in my postgis database. I need, build a map,  using the average from a set of these raster files, for example.

Besides, I need to make others similar operations like the max value of a set of rasters, among others.

I did'nt see nothing to do operations like it directly on PostGIS (http://postgis.net/docs/manual-2.1/RT_reference.html), there are functions to do it? Besides, I'm worried with the performance, because  if I have a lot of raster files, maybe can be better solve these calculations with R, by example, or not?


texts: How do I export a line shapefile from a network downstream from a point in ArcGIS 10.1?

texts:
I'm using the National Hydrological Dataset's flow lines to trace downstream movement of water is a freshwater diversion from the Mississippi river in Louisiana.  I've gotten the trace to run using the Utility Network Analysis toolbar. I now want to export the trace as a shapefile to create a map.  I've already tried right clicking the flowline layer and exporting but there is no option to export traced features, just those that are selected, all, or those within the viewing frame.

I'm using ArcGIS 10.1


texts: Snapping Agent does not work with ArcGIS 10

texts:
I'm trying to create snapping agent, I'm using the standard code from ESRI ArcObject Library, this code works perfectly on VB6/ArcGIS 9.3, but not on VB.net (3.5 SDK) and ArcGIS 10.

The property "SnapAgentCount" is empty :

pSnapEnv.SnapAgentCount = 0

=========================

Public Sub SetBufferSnapClass()
  On Error Resume Next
  Dim pApp As IApplication, pMap As IMap, pFeatLayer As IFeatureLayer
  Dim pEditor As IEditor
  Dim pSnapAgent As ISnapAgent
  Dim pSnapEnv As ISnapEnvironment
  Dim pEditLayers As IEditLayers
  Dim pMySnapAgent As BufferSnapPrj.BufferSnap 'use VB6 sample
  'Dim pMySnapAgent As BufferSnapVBNet.BufferSnap 'use VB.Net sample
  'Dim pMySnapAgent As BufferSnapCS.BufferSnap 'use C# sample
  Dim pUID As New UID
  Dim Count As Integer, Count2 As Integer

  pUID = "esriEditor.Editor"
  Set pApp = Application
  Set pEditor = pApp.FindExtensionByCLSID(pUID)
  Set pEditLayers = pEditor
  Set pSnapEnv = pEditor
  Set pMap = pEditor.Map
  'Find custom snap agent and set is featureclass property
  For Count2 = 0 To pMap.LayerCount - 1
    If UCase(pMap.Layer(Count2).Name) = "POLES" Then
      For Count = 0 To pSnapEnv.SnapAgentCount - 1
        Set pSnapAgent = pSnapEnv.SnapAgent(Count)
        If pSnapAgent.Name = "Buffer Snap" Then
          Set pMySnapAgent = pSnapAgent
          Set pFeatLayer = pMap.Layer(Count2)
          Set pMySnapAgent.FeatureClass = pFeatLayer.FeatureClass
        End If
      Next Count
      Exit For
    End If
  Next Count2
End Sub

If I activate "use classic snapping" under options on the Editor toolbar it works!

Is this the only way to do it because I don't want to use the standard Editor ToolBar?


texts: How to calculate sums for all fields in a table?

texts:
Possible Duplicate:
  are there any methods can choose all field and make the SUM for each fields or I must do it one by one?

Are there any methods that can calculate the summary statistic table for all the fields existing in a table with summary type  SUM

I have a feature class with about 300 fields and I need an automatic method to sum all these fields once or must I choose one by one?


texts: Pictures with isobaths to a 3D Model in a Browser

texts:
I have pictures of lakes with isobaths (*). The result should be a 3D model in a browser.

I tried to make a vector image, but this results in a SVG. I can not import it.

How do I make a layer of the images with the isobaths? Which format is needed?

I know how to get from the layer / map with contour lines to a 3D model using Qgis2threejs.

(*) I also have data from one (Lowrance) plotter of many lakes. Can I import such data files and get a layer?


texts:
I'm new to GEE. I'm currently working on NDVI data analysis. So this is my code for MODIS NDVI. I already run the NDVI scale factor function and do the image collection, Divide by 10000, in images there inside ImageCollection to get real NDVI values. Now that I'm interested to plot the chart, but I got some error to be like,

Error generating chart: No features contain non-null values of
"system:time_start".

var NDVI = function(image) { return image.expression('float(b("NDVI")/10000)') };

var collection = ee.ImageCollection('MODIS/006/MOD13Q1'); var col = ee.ImageCollection(collection.filterDate('2017-07-01', '2018-12-31')); var modisNDVI = col.map(NDVI); print(modisNDVI)

// Chart a single year mean of SB # since 1981 var TS1 = ui.Chart.image.series(modisNDVI, geometry, ee.Reducer.mean(),500, 'system:time_start') .setOptions({ title: 'NDVI 1‐Year Time Series', vAxis: {title: 'NDVI'}, }); print(TS1);

https://code.earthengine.google.com/e7405c083d417b42b8a2a2ae3d3166e9


texts:
I am trying to import WMS from geoserver link to QGIS 2.8.4 & the latest 2.12.1:
http://geoportal.asig.gov.al/Services/host/host.ashx?url=http://localhost:8080/geoserver/asig/wms&

QGIS get the request and show the layers of the workspace, and also the get info.
My problem is that the layer is not visible in the view.

It works fine with version 2.2:


texts: "Missing dependency. This algorithm cannot be run" with QGIS + GRASS in Windows 7?

texts:
Windows 7, OsGeo4W pack installed including QGIS 2.4.0 and GRASS.

In QGIS when I try to execute a GRASS geoprocessing algorithm I get this popup:

  Missing dependency. This algorithm cannot be run :-(
  This algorithm requires GRASS GIS 7 to be run. Unfortunately, it seems that GRASS GIS 7 is not installed in your system, or it is not correctly configured to be used from QGIS
  Click here to know more about how to install and configure GRASS GIS 7 to be used with QGIS

The link doesn't help. I get the same message at my computer at work with QGIS 2.2.0

The GRASS plugins are activated under geoprocessing settings.

Do I need to configure something?

When I run MSYS I get this:


texts: Geoserver styling line feature with border in conjunction

texts:
I've used SLD to style two type of roads with the border in Geoserver. The question is how can I remove the border of a road when another road or street connects to it. As shown in the image, when roads are in the same layer they are good in conjunction (2) but, roads in different layers are drawn as (1).

This is the simplified code I'm using for styles:

<!--First layer-->
    <se:FeatureTypeStyle>
    <se:Rule>
      <se:Name>Motorway</se:Name>
      <se:Description>
        <se:Title>Motorway</se:Title>
      </se:Description>
      <se:LineSymbolizer>
        <se:Stroke>
          <se:SvgParameter name="stroke">#94622F</se:SvgParameter>
          <se:SvgParameter name="stroke-width">12</se:SvgParameter>
          <se:SvgParameter name="stroke-linejoin">round</se:SvgParameter>
          <se:SvgParameter name="stroke-linecap">round</se:SvgParameter>
        </se:Stroke>
      </se:LineSymbolizer>
    </se:Rule>
    </se:FeatureTypeStyle>

    <se:FeatureTypeStyle>
    <se:Rule>
      <se:Name>Motorway</se:Name>
      <se:Description>
        <se:Title>Motorway</se:Title>
      </se:Description>
      <se:LineSymbolizer>
        <se:Stroke>
          <se:SvgParameter name="stroke">#F8C967</se:SvgParameter>
          <se:SvgParameter name="stroke-width">11</se:SvgParameter>
          <se:SvgParameter name="stroke-linejoin">round</se:SvgParameter>
          <se:SvgParameter name="stroke-linecap">round</se:SvgParameter>
        </se:Stroke>
      </se:LineSymbolizer>
    </se:Rule>
    </se:FeatureTypeStyle>

And the other style:

<!-- Second layer -->
<se:FeatureTypeStyle>
<se:Rule>
  <se:Name>Link</se:Name>
  <se:Description>
    <se:Title>Link</se:Title>
  </se:Description>
  <se:LineSymbolizer>
    <se:Stroke>
      <se:SvgParameter name="stroke">#000000</se:SvgParameter>
      <se:SvgParameter name="stroke-width">5</se:SvgParameter>
      <se:SvgParameter name="stroke-linejoin">round</se:SvgParameter>
      <se:SvgParameter name="stroke-linecap">round</se:SvgParameter>
    </se:Stroke>
  </se:LineSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>

<se:FeatureTypeStyle>
<se:Rule>
  <se:Name>Link</se:Name>
  <se:Description>
    <se:Title>Link</se:Title>
  </se:Description>
  <se:LineSymbolizer>
    <se:Stroke>
      <se:SvgParameter name="stroke">#FDFCF8</se:SvgParameter>
      <se:SvgParameter name="stroke-width">4</se:SvgParameter>
      <se:SvgParameter name="stroke-linejoin">round</se:SvgParameter>
      <se:SvgParameter name="stroke-linecap">round</se:SvgParameter>
    </se:Stroke>
  </se:LineSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>


texts: ajax $.post not working in bootstrap framework application using leaflet 1.20

texts:
I have a web application using Bootstrap and leaflet.  My jquery ajax call does not work.

<!-- jQuery -->
    <script src="js/jquery.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.2.0/dist/leaflet.css"
  integrity="sha512-M2wvCLH6DSRazYeZRIm1JnYyh22purTM+FDB5CsyxtQJYeKq83arPe5wgbNmcFXGqiSH2XR8dT/fJISVA1r/zQ==" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.2.0/dist/leaflet.js"
  integrity="sha512-lInM/apFSqyy1o6s89K4iQUKg6ppXEgsVxT35HbzUupEVRh2Eu9Wdl4tHj7dZO0s1uvplcYGmt3498TtHq+log==" crossorigin="">
</script>

var service_ajax_script="admin_insert_new_incident_ajax_post.php";
 $.post(service_ajax_script,data, processResponse_insert_new_incident).error(errorResponse_insert_new_incident);

I get a javascript error on the $.post call

  Unable to get property 'lat' of undefined or null reference


texts: Circle turns into ellipse after converting it into raster in ArcGIS Pro?

texts: I have a polygon layer that contains a circle and an irregular polygon and I want to convert it into a raster in ArcGIS Pro. When I do that, the result is a raster containing the irregular polygon and an ellipse shape, not circle! I checked the projection and it is the same and the irregular polygon raster looks fine with no distortion. I need the circle to maintain its shape with no distortion. I am not sure what the problem is.


texts: How to find elevation of multiple points on a map on ArcGIS 9.3?

texts:
I am working on the sewerage system of a city. I have the x and y coordinates of the station locations stored in EXEL format.
How can I use this data/file to extract the elevations of the stations ?
please help on this regard. Thanks.

Ps : there are almost 2000 of such station locations so its not possible to
find location manually.


texts: Selecting a polygon within polygon where part of its boundary is the same. PostGIS

texts:
I would like to know how can I select a A_polygon within B_polygon, but part of the boundary of the A_polygon touch the B_polygon boundary. In Postgis 2.0, I tried few options but they didn´t work (st_contains, st_containsproperly, st_intersect, etc.).

Thanks!!


texts: Button to turn off all layers in ToC at once?

texts:
I have created a map that has a Table of Content that i use to turn on and off desired layers. Is there a way to create a 'Clear' button that will untoggle the selected layers? I have a clear button that clears other selections but I am stuck. I am using ArcGIS API for JavaScript 3.17.

    var myLayerList = new LayerList({
        map: map,
        showLegend: false,
        layers: [
        waterFeature,
        volleyball,
        trashcan,
        tennis,
        table,
        soccerField,
        shadeStructure,
        restroom,
        ramada,
        pool,
        playground,
        pathway,
        parkSign,
        parking,
        park,
        light,
        horseShoe,
        grill,
        drinkingFountain,
        dogPark,
        dogBag,
        discGolf,
        communityGarden,
        bikeRack,
        benches,
        battingCages,
        basketball,
        ballfield]
    }, "layerList");
    myLayerList.startup();

       query("#clearQuery").on('click', function (evt) {
           //reset the definition expression
           selectedLayer.setDefinitionExpression('1=1');
           map.graphics.clear();

       });


texts: KML title and description to generate lettered legend on map

texts:
Let's say I've exported a KML (from My Google Maps) with a list of waypoints like:

  <Placemark>
    <name>Bachledzki Wierch 8a</name>
    <description>tel: , 606 426 336</description>
    <styleUrl>#icon-1602-DB4436</styleUrl>
    <Point>
      <coordinates>
        19.9706636999999,49.3048297,0
      </coordinates>
    </Point>
  </Placemark>

Seemed simple, yet I was unable to find an online tool to auto-populate a legend with labels A, B, C, etc. using those points.

Any suggestions?

I went so far as to assign custom raster images to the icons of each Placemark, to attain alphabet letters.

However, no print, export nor even screenshot configurable in https://www.google.com/maps/d manages to show the <description> field also in the legend, only the <name> field alone (without the vital contact info I need to print out).

Is there any tool that dynamically generates the legend table, showing both name/title and description for each placemark, automatically lettering them, and ideally using the KML feed or My Google Map URL to stay updated? (Although I can manually export a new KMZ/KML after every change, if I must.)


texts: Aggregating pixels of raster dataset using ArcMap

texts:
*I am fairly new to working with raster data in ArcMap. *

I have a raster dataset like in the picture I have uploaded, and you can assume that each individual pixel of the raster has a value which is given in red. What I want to do is aggregate the pixel cells up to the resolution that I want such that I can add the values associated with the individual pixels. In the picture, the original 4x4 raster would be aggregated up into a 2x2 raster, however what I am not sure about is how you could tell ArcMap to add together the cells that you want to have been added.

One possible solution I am thinking of (but haven't had an opportunity to try) is to generate a 2x2 fishnet over the area and try to aggregate the pixels that are contained within the fishnet. I am not sure if there is a simpler way to go about this though.


texts: How to export bigger images from TimeManager?

texts:
Whilst I think 'TimeManager' works very well, is it possible to define the output scale, so that the output provides better quality data when exporting?

There are no options in its interface where I can define the output scale and size, it´s only possible to select the folder for exporting.


texts: Least cost path: single source point, multiple target points

texts:
I have a single source point in EPSG:3857, and a set of points, also in EPSG:3857. I calculated a slope layer from SRTM (in EPSG:3857) in the extent of the complete set of points. I would like to use this layer as a friction layer for calculating least cost path. I would like to do this in a way that one single action provides a set of paths, from the source point to the every destination point.

So far I tried using Least Cost Path and r.cost + r.drain and I'm able only to calculate one single path. (In the case of r.drain from closest destination point to the source point.) I am unable to produce a set of paths no matter what I try. I would welcome instructions on how I could calculate multiple cost paths, using slope layer only as cost. I am attaching the points used,for review: https://1drv.ms/u/s!Ar4Fhb0r6aPcrDPF4rlLZlin4262?e=adYYtP

Please note that I edited the friction surface (slope layer) and removed larger water bodies from the extent, in order not to interfere with the calculation.

UPDATE: Solution behind this link r.cost multiple destinations is a working one> however my previous attempts to use it failed. In this particular case i believe that CRS was the problem - I had changed CRS from the EPSG:3857 to EPSG:4326, and the whole process started running as intended.


texts: Automatically update and reclassify project layer from Excel data

texts: I have a project in Qgis that gets its data from a locally stored excel file (linked). Is there a way to automatically update the linked data? What is happening now is that when I change some rows in the excel file, I have to go back to the project "delete" and "classify" the selected data. I would like to see this automated. I have very few (none) experience with Qgis.


texts:
I'm trying to regrid and interpolate vector values from WAM model output.

I got WAM model netCDF output in rotated grid, I need to interpolate it to another grid which is some variant of LAEA projection.

For scalar values I used SCRIP (Spherical Coordinate Remapping and Interpolation Package) to produce remap source and destination addresses and coefficients. Then I used the result .nc file to make interpolation in python (i.e. to make final nc files in output grid).

Now what should I do to regrid vector? Should I rotate it before regridding? I suppose interpolating u,v vector components the same way I did with scalars isn't a way to go.

I thought that I could use python cartopy.vector_transform, but I'm not sure how to specify my source Coordinate Reference System (https://github.com/SciTools/cartopy/blob/master/lib/cartopy/vector_transform.py)

Are there some tools that would let me do that?


texts: Update a PostgreSQL row with last user and timestamp

texts: I would like to track who is the last user who updated the rows of a PostgreSQL table (v9) and when. This webpage explains how to do it with a trigger regarding the timestamp (I did not try it yet), I was wondering if something similar could be done to keep the user name.


texts: Calculating line length to both sites in QGIS

texts:
Is there a function or a plugin for QGIS that works like this?

I have a line, for example, 7 km
I click on that line at any point
A popup or something gives me the distance to the left an to the
right, e.g. 3 km and 4 km.

This function is available in Locus, an Android App some of you might know.


texts:
We use Garmin 60CSx hand units loaded with a custom .img file for our project site created years ago. I need to add some POI and trail data (currently in GPX format) to the .img file, and create an updated .img file.

I did most of what I need in mapwel, but then ran into the license issue (can't create .img without a license, and I don't have a garmin unit hady I can link a license to).

I was hoping a there might be a QGIS based (or other free) solution?


texts: Using degree symbol in Label Expressions of ArcMap?

texts:
I am trying to use the labeling process to display latitude and longitudes for a set of data points.  To make the labels appear formal, I wish to add the degree symbol (°) to the labels.  My python syntax goes as follows:

[lat] + "," +" " + [long] and the result is 30.392634, -91.118229.

However, when I attempt to insert the symbol as follows:

[lat] + "°" + "," +" " + [long] + "°" I keep receiving an error.

I am not a code wizard.


texts: Importing CAD polyline symbology into same polyline but converted to feature class?

texts:
I'm working with a CAD drawing (DWG), and I've exported the polyline layer into a file geodatabase. When I add the exported polyline layer to ArcMap, and try to import the symbology from the original CAD file it doesn't do anything.

Is this some type of limitation with CAD files?

I've tried saving the CAD polyline symbology out as a layer file and importing it, and I've also tried importing it directly from the CAD polyline layer in the ArcMap TOC.

It seems like this should work because when I attempt to import the symbology it matches the Linetype, Color, and LineWt fields that the symbology is based on.


texts:
I am trying to align road names in a row, or column as much as possible in QGIS. I know it can be done in Adobe Illustrator with a mapping plugin, but I don't have the $$ for that.

I tried something like this but it didn't didn't seem to help.

This is an example:

It doesn't need to be exactly like that, but I'd like to do something similar.


texts: How to programmatically execute an overpass query?

texts: I am working in QGIS using a gejson obtained from an overpass turbo query. After having defined some layer configurations and operations, I would like to update the geojson file with more up-to-date information from OpenStreetMap but without repeating the operations and configurations. I know that I could manually do the overpass turbo query again and overwrite the gejson file, but I am looking for some automated way. Maybe the easiest way is to create an script and run it, or (from what I have read -and if I am not wrong) even using QGIS' toolbox, but unfortunately I do not know where to start in both scenarios.


texts:
I installed QGIS by using OsGeo4W64. I can use pyqgis PyQt5 version in PyCharm. However, when I write scripts in python console in QGIS, it does not accept. I looked the version of QGIS. It says developper version 2.99 and PyQt5.9.

When I write in python console:

from PyQt5.QtCore import *

I get this error:

Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\Python36\lib\code.py", line 64, in runsource
    code = self.compile(source, filename, symbol)
  File "C:\OSGEO4~1\apps\Python36\lib\codeop.py", line 168, in __call__
    return _maybe_compile(self.compiler, source, filename, symbol)
  File "C:\OSGEO4~1\apps\Python36\lib\codeop.py", line 99, in _maybe_compile
    raise err1
  File "C:\OSGEO4~1\apps\Python36\lib\codeop.py", line 87, in _maybe_compile
    code1 = compiler(source + "\n", filename, symbol)
  File "C:\OSGEO4~1\apps\Python36\lib\codeop.py", line 133, in __call__
    codeob = compile(source, filename, symbol, self.flags, 1)
  File "<input>", line 1
    from PyQt5.QtCore import *


texts: Where can I find administrative boundary data for Mexico?

texts:
The USA has states, counties, and cities.

How are Mexico's territories split up, hierarchically?

It also has states and cities, but does it have an intermediate-level political unit?

Where might I find sets of boundary data for such units?


texts:
I am trying to implement QgsTasks into a PlugIn to keep its GUI responsive while running. I have studied the docs at https://docs.qgis.org/3.16/en/docs/pyqgis_developer_cookbook/tasks.html, which unfortunately does not cover such a case in its examples and my Python skills are obviously too low to adapt these examples to my usecase. Also I have studied similar questions like Rewriting QgsTask abstract class? and How to use Threads in PyQgis, mainly to keep UI active? and Usage of QgsTask and QgsTaskManager and How do I maintain a resposive GUI using QThread with PyQGIS.
However, from these docs I dont understand how to implement it properly to run a function of a PlugIn as a task with all its benefits.
Currently, I am focusing my QgsTask experiments on QgsTask.fromFunction(). I have narrowed down my code to:
# imports ...

MESSAGE_CATEGORY = 'My Plugin'

class MyPlugin():
    def __init__(self, iface):
        # standard content by plugin builder

    def add_action()#standard
        # standard content by plugin builder

    def unload(self):
        # standard content by plugin builder

    def do_some_work(self):
        QgsMessageLog.logMessage("starting worker",MESSAGE_CATEGORY,Qgis.Info)
        QgsMessageLog.logMessage("before var",MESSAGE_CATEGORY,Qgis.Warning)
        inputlayer_numberoffields = self.selectedlayer.fields().count() # Function started from class_task crashes here, can not read variable
        QgsMessageLog.logMessage("after var",MESSAGE_CATEGORY,Qgis.Warning)
        # do heavy work

    def maplayerselection(self):
        self.selectedlayer = self.dlg.MyQgsMapLayerComboBox.currentLayer()

    def run(self):
        if self.first_start == True:
            self.first_start = False
            self.dlg = MyPluginDialog()
            self.maplayerselection()
            self.dlg.StartButton.clicked.connect(self.start_work_as_task) # See below
            #self.dlg.StartButton.clicked.connect(self.do_some_work) # Everything works fine. Can be started multiple times. Gui not responsive while running
        self.dlg.MyQgsMapLayerComboBox.currentIndexChanged.connect(self.maplayerselection)
        self.dlg.show()
        result = self.dlg.exec_()

    #class_task = QgsTask.fromFunction('Do something', do_some_work)
    def start_work_as_task(self):
        QgsMessageLog.logMessage("start_work_as_task before starting worker",MESSAGE_CATEGORY,Qgis.Warning)
        function_task = QgsTask.fromFunction('Do something', self.do_some_work())
        QgsApplication.taskManager().addTask(function_task) # Starts worker function and runs correctly, but does not bring any benefits (a responsive Gui), only disadvantages like crash on second start
        #QgsApplication.taskManager().addTask(self.class_task) # Starts worker function but does not run correctly. Worker function can not read variables from other functions
        QgsMessageLog.logMessage("start_work_as_task running after starting worker",MESSAGE_CATEGORY,Qgis.Warning)

My "working" implementation (function_task) unfortunately does not bring the expected advantage of a responsive GUI. What am I doing wrong here?


texts: Use field calculator to return the word after "unit"?

texts:
Working on ArcMap Desktop 10.5; the file in question lives in a file gdb. I have a polygon layer with a field of full property addresses (string) from which I need to extract ONLY the unit number, to be populated in a new blank field STUNIT (string). The addresses are all different lengths depending on presence of street direction, etc. so my addresses, for example, could look something like this:

1 BOXER ST UNIT 7A FARMINGTON

945 WILD TURKEY XING UNIT 116 TURTLE ISLAND

52 W CLAIRMONT DR UNIT J17 EASTHAVEN

I have already performed a selection to return only records which contain the word "UNIT", about 4000 records. My goal is to populate my STUNIT field using the python parser in field calculator, with ONLY the "word" directly following UNIT. I have tried variations of the split function which looks something like this

!AddressField!.split("UNIT")[0]

but, without fail, get the  following error messages:

Whitespace is not allowed at this location
This row contains a bad value (for both the shapefile itself and the field I tried to populate)

I have checked for spaces within/outside of the function but none exist. I have also tried a variant where I use find and replace to add a * to the end of the word "UNIT" and use the * as the delimiter in the function, but get identical results. Can a word in a string field be used as a delimiter for the split function in Arcpy? If so, what am I doing wrong/if not, is there another workaround that does not require a return on the nth object?

I have several years experience with ArcGIS but relatively new to python.


texts: Difference in length of lines computed with GeoPandas or in QGIS

texts:
So, first of all, here is a test file: https://we.tl/t-xqo5KyRlqD

The column length was added using QGIS (v 3.10 A Coruña), field calculator and adding parameter $length.

If the file is opened with geopandas (v 0.6.1), the property length outputs this:

a.length
Out[8]:
0    1581.729679
1     899.177689
2      38.054220
3      47.333848
4     189.591771
5     275.946388
dtype: float64

the values obtained by qgis are:

a['length']
Out[9]:
0    1580.830737
1     898.686067
2      38.033291
3      47.307854
4     189.489982
5     275.796306
Name: length, dtype: float64

As you can see there is a difference of a few centimeters.

Has anyone else experienced this?


texts: Specifying number of columns and rows in a raster file

texts:
ArcGIS 10.2

I want to produce a raster file with a specific number of rows and columns - 300x300. This needs to be reproducible on multiple data sets/locations - so fixing the extent of the file won't work.

I have tried changing the grid size which then changes the number of rows and columns but it is too awkward to make it create a 300x300 raster.

Is there a simple way of specifying these?


texts: Automatically display any metadata credits for non-service layers in ArcGIS Pro?

texts:
By default, ArcGIS Pro displays credits for service layers in the bottom-right of the map frame.  This can also be added to a layout as dynamic text (in which case the default bottom-right version of the credits text disappears - allowing the user to manage the location appearance themselves).
Is there any way to get the credits (eg, stored in the image or mosaic metadata) for non-service layers to appear dynamically on the map as layers are added/removed e.g. using the "dynamic text" feature?
I have a few local imagery layers that we often use as basemaps, and I need to make sure they are credited correctly.  Rather than hard-coding all of the credits for all of these layers on the layout, I'd like the layout to automatically display credits for only the layer(s) that is actually on the map.  I would assume that the "Credits" field in the metadata would be the right place the enter the data, but I can't find any way for ArcGIS Pro to use this in "dynamic text" or otherwise.


texts: Make NetCDF Raster Layer tool in ModelBuilder - Cannot export as geotiff

texts:
I am attempting to iterate through thousands of .nc files to convert them into geotiffs using the Make NetCDF Raster Layer tool. I am using ModelBuilder to accomplish this. The iterator works fine, but there is no option in the tool to export as geotiff. Presumably because when you use the tool on individual .nc files it adds the raster into the table of contents, and from there you can make the decision to export. This works fine when you're converting one or two files, but not thousands.

In ModelBuilder, how might I export each .nc file as a geotiff after each iteration?

Tools such as Copy Features or Raster To Other Format don't work because I can't use the Make NETCDF Raster Layer's outputs as inputs to these other tools.

What am I missing?

Below is a picture of my model.


texts: Using Raster calculator gives ERROR 000539

texts:
I'm new with ArcGIS. I would like to do a calculate of NDWI. So I'm using Arctoolbox => Spatial analyst tools => Map Algebra => Raster calculator.

But when I'm trying to perform it, I get this error :

Executing: RasterCalculator "Float("LT05_L1TP_196030_19990113_20180215_01_T1_sr_band2.tif" - "LT05_L1TP_196030_19990113_20180215_01_T1_sr_band5.tif") / Float("LT05_L1TP_196030_19990113_20180215_01_T1_sr_band2.tif" + "LT05_L1TP_196030_19990113_20180215_01_T1_sr_band5.tif")" D:\Users\paulc\Documents\SIG_ZHM\NDWI\1999_01_13_NDWI.tif
Start Time: Thu Oct 24 15:42:34 2019
Float(Raster(r"LT05_L1TP_196030_19990113_20180215_01_T1_sr_band2.tif") - Raster(r"LT05_L1TP_196030_19990113_20180215_01_T1_sr_band5.tif")) / Float(Raster(r"LT05_L1TP_196030_19990113_20180215_01_T1_sr_band2.tif") + Raster(r"LT05_L1TP_196030_19990113_20180215_01_T1_sr_band5.tif"))

ERROR 000539: Error running expression: rcexec()
Traceback (most recent call last):
  File "<expression>", line 1, in <module>
  File "<string>", line 2, in rcexec
  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\__init__.py", line 21, in <module>
    from arcpy.geoprocessing import gp
  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\__init__.py", line 14, in <module>
    from _base import *
  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py", line 598, in <module>
    env = GPEnvironments(gp)
  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py", line 595, in GPEnvironments
    return GPEnvironment(geoprocessor)
  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py", line 548, in __init__
    import weakref
  File "D:\Programmes (x86)\Python\Lib\weakref.py", line 14, in <module>
    from _weakref import (
ImportError: cannot import name _remove_dead_weakref

Failed to execute (RasterCalculator).

How can I fix this?

I have already tried to change the wayfolder for a shorter way, without space or special character, but it's still like there is a problem with the wayfolder.


texts: show a Collection of LineStrings with labels

texts:
I use the following peace of code to show multiple LineStrings which have a point as the last one, along with a label:

var strokeColors = [...];//"#FFAACC" kind-of elements
var linesLayer = new OpenLayers.Layer.Vector("Lines Layer", {
    styleMap: new OpenLayers.StyleMap({'default':{
        pointRadius: 6,
        labelYOffset: -15,
        labelOutlineColor: "white",
        labelOutlineWidth: 3,
        label: "${label}"
    }})
});
var feats = [];
for(var j=0;j<lines.length;j++){
    var points = [];
    var feat;
    for(var i=0;i<lines[j].length;i++){
        var p = new OpenLayers.Geometry.Point(lines[j][i].x,lines[j][i].y);
        if(i==lines[j].length-1){
            feat = p;
        }
        points.push(p);
    }
    var lineString = new OpenLayers.Geometry.LineString(points);
    var lineFeature = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Collection([lineString, feat]));
    lineFeature.style = {
        strokeColor: strokeColors[j%4],
        strokeOpacity: 1.0,
        strokeWidth: 6
    };
    lineFeature.attributes = {
        label: lines[j].lab
    };
    feats.push(lineFeature);
}
linesLayer.addFeatures(feats);
map.addLayer(linesLayer);

This shows the lines, with the correct color for each one although the label is not shown.
Such label, though, is indeed shown if I comment out the lineFeature.style={...} lines. In this case, though, the lines are all black.
I'm quite new at OpenLayers, so I'm not sure: what am I doing wrong?

For reference, I started out with this example.


texts: ArcPy cursor: RuntimeError: An invalid SQL statement was used

texts:
I'm trying to iterate through polygons in a feature class to perform zonal statistics on a raster mosaic.

I found inspiration from Iterate through features to use selection as input for ExtractByMask for my code but I get a "RuntimeError: An invalid SQL statement was used. [SELECT OBJECTID, Shape, Group FROM GROUP_RINGS_prj]" message.

Here is the code I use:

import arcpy, datetime

from arcpy import env
from arcpy.sa import *

arcpy.env.overwriteOutput = True

arcpy.CheckOutExtension("Spatial")

env.workspace = "D:/PROJECT.gdb"

aoi_prj = "GROUP_RINGS_prj"
forest_prj = "FOREST_prj"

## Stats by group
with arcpy.da.SearchCursor(aoi_prj, ["OID@", "SHAPE@", "Group"]) as cursor:
    for row in cursor:
        print(datetime.datetime.now().strftime("%Y-%m-%d %H:%M") + ": Processing: " + str(row[2]) + "...")
        zs = ZonalStatisticsAsTable(row[1], "Group", forest_prj, "D:/Projects/Results/ZS_FOREST_" + str(row[0]) + ".dbf", "NODATA", "MEAN")
        row = cursor.next()

It results with:

Traceback (most recent call last):
  File "D:\Projects\Scripts.py", line 87, in <module>
    for row in cursor:
RuntimeError: An invalid SQL statement was used. [SELECT OBJECTID, Shape, Group FROM GROUP_RINGS_prj]

Do I miss something obvious in the code?


texts:
I'm currently using an OSM dataset of San Francisco and I want to calculate the angle of elevation of each road segment using x and y coordinates given by this dataset.
I used this formula and I get wrong data.
the formula:

dLon = (long2 - long1);
y = Math.sin(dLon) * Math.cos(lat2);
x = Math.cos(lat1) * Math.sin(lat2) - Math.sin(lat1)
        * Math.cos(lat2) * Math.cos(dLon);

angle = Math.atan2(y, x);

angle_degree = Math.toDegrees(angle);
rt = (angle_degree + 360) % 360;
ang = 360 - rt;

Ps: I converted longitude and altitude coordinates to radians to use this formula.

Have you any other suggestions please?


texts: Sorting Identify feature results by DATE field in ArcMap?

texts:
I'm using ArcMap 10.3.  When I use the Identify tool, I often have many results and would like to sort those results in the Identify window.  If I right-click on the layer name or features in Identify results, I can "Sort Ascending."  This would accomplish the goal in most cases...but I have set the display field for this layer to use a date field, and I would like to sort the results by date values chronologically.  When I sort ascending, it sorts the date values by month, like so:

1/1/2019
2/1/2014
3/1/2016
etc.

But this is not actually chronological.

Any ideas?

The data I'm using is a very large feature class stored on my organization's network, which I am not able to edit.


texts: What GIS software did you purchase to work with Tiger data?

texts: It looks like in Tiger line file the user must have mapping or Geographic Information System (GIS) software that can import TIGER/Line data. Has anyone worked with the TIGER/Line data. What GIS software did you purchase? Please advice the steps that I need to follow to map the data.


texts: Unexpected query layer results: Why does unioning with DUAL fix it?

texts:
Simple Query:

I have a query that connects to a table in a work order management database (Oracle 12c; non-GDB).

select
    wo.wonum
from
    maximo.workorder wo

The query returns 428 records in Toad and 428 records in a query layer (in ArcMap).

This result is expected.

Complex Query:

If I change the query so that it joins to a related table:

select
    cast(rownum as number(38,0)) as rownum_,
    wo.wonum
from
    maximo.workorder wo
left join
    maximo.wfassignment a
    on wo.workorderid = a.ownerid

the query returns 1048 records in Toad and 428 records in the query layer.

This result is unexpected. The query layer ought to have returned 1048 records, just like Toad.

Analysis:

I understand that query layers often have a hard time with queries that are not 1 to 1 with an underlying table.

I don't know for sure, but I think query layers like to have a unique ID that comes from a column in a real table.
Sure, with simple 1 to 1 queries, rownum can often do the trick as a unique ID. But for complex queries (with joins that propagate-out additional records), rownum seems to be problematic.

A Solution:

Through trial an error, I came up with a solution that works with the joined table in the query layer:

select
    cast(null as number(38,0)) as rownum_,
    null as wonum
from
    dual
where
    1<>1

union all

select
    cast(rownum as number(38,0)) as rownum_,
    wo.wonum
from
    maximo.workorder wo
left join
    maximo.wfassignment a
    on wo.workorderid = a.ownerid

The query returns 1048 records in Toad and 1048 records in the query layer.

This result is expected.

Question:

Why does unioning to the dual table make the complex query work properly in the query layer?


texts: Calculating positional accuracy in QGIS?

texts: How to you compare two layers in QGIS to get the positional accuracy?


texts: Can we use procedures in a Query layer (ArcGIS Desktop 10.1 & Server 10.1)?

texts:
I have one basic question that.. Can we use procedures in Query layer (ArcGIS Desktop 10.1)??

Currently I am using query layer for ArcGIS Desktop 10.1 and its working fine . My DBA person told me that its difficult to modify query for each time.. As per discussion he told me that for large database its difficult to use query layer he suggested to use procedures..

I searched on Google and ArcGIS help..but there is no such information..

We are using Sql Server 2008 r2 , ArcGIS Desktop/Server 10.1..

So any help/links will be highly appreciated : )


texts:
I'm trying to update a KML file using a network link and a python script that grabs and parses data from a csv file.  The python script runs and creates the KML code when I run it on it's own but the KML file containing the network link doesn't seem to be able to run the script.  The python script and data file are stored on my computer and not on a web server and I'm wondering if this is the problem.  For my purposes I would need to run these files from a computer and not a web server in the field so is this possible?  I've included the code.

The KML file:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<NetworkLink>
    <name>Test Points</name>
    <Link>
        <href>addPoints.py</href>
        <refreshMode>onInterval</refreshMode>
        <refreshInterval>60</refreshInterval>
    </Link>
</NetworkLink>
</kml>

And the python script:

#!/Python27/ArcGIS10.1/python

import urllib2
from genshi.template import TemplateLoader

def collect_latest_fires():
     f = open('data_file.csv')

    for line in f:
        fields = line.split(',')
        latitude = fields[0]
        longitude = fields[1]
        altitude = fields[2]
        coords = '%s, %s, %s' % (longitude, latitude,altitude)

        yield {
            'Name': 'Wildland Fire at %s' % coords,
            'Description': 'test',
            'Coordinates': coords
            }

loader = TemplateLoader(['.'])
template = loader.load('GenshiTemplate.kml')
stream = template.generate(collection=collect_latest_fires())

kml = stream.render(method='xml',encoding='utf-8')

print 'Content-Type: application/vnd.google-earth.kml+xml\n'
print kml

The data file is just a csv file containing latitude, longitude and altitude.


texts:
Background:
At 3.14.16, using the 64-bit network installer, under Windows 10, I am unable to load any NetCDF files.
For example, this instructional blog post:
https://opengislab.com/blog/2020/10/10/wind-vector-mapping-and-animation-in-qgis
has a link to its sample netCDF data
I have unsuccessfully attempted to load this .nc file using the following procedures:

Drag & drop the file from Windows File Explorer into QGIS
Layer > Add Layer > Add Mesh Layer...
From the QGIS Browser Panel

In every case, QGIS responded that the netCDF file was "...not a valid or recognized data source.", as shown in this screenshot:

Efforts to find a solution:

I confirmed that the downloaded NetCDF file is valid using gdalinfo filename.nc. Although the output is too long to paste here, nothing in it indicated any sort of data error. Here are the first 5 lines:

Driver: netCDF/Network Common Data Format
Files: roms_hiig_e366_7434_fd44.nc
Size is 512, 512
Coordinate System is `'
Metadata:

Confirmed that the gdal version supports netCDF, using gdalinfo --formats.  The results show that the netCDF format is supported:

Supported Formats:
...
netCDF -raster,vector- (rw+s): Network Common Data Format
...

Conducted an OSGeo4W Advanced Install and enabled all netCDF-related utilities and libraries; the results shown in this screenshot:

Problem:
Despite my attempts, QGIS will still not load any .nc files, responding every time that they are not a valid or recognized data source.  What am I missing?
Update:
Using 2.18.28 I am able to successfully load the raster versions of the .nc file, but not the mesh versions.  Still no success with either raster or mesh versions at 3.14.16.
Update #2:
Although QGIS will not allow me to load the netCDF file at all, I am particularly interested in accessing the mesh netCDF data, not the raster version.  The screenshot below (taken from Cyril Mikhalchenko's answer) of a netCDF file in QGIS shows the mesh data outlined in red.  Note that the mesh data has a different icon than the raster data.


texts: How to extract the study area from a netCDF by a shapefile boundary with Python?

texts: I have a global size netCDF document, the variable is three dimensions, including time. lat and lon. I have a shapefile boundary for my study area, both of them have same projection. How can I extract the study area from the netCDF by the shapefile boundary?


texts: Correction required to Landsat level 2 product while using it for time series analysis

texts:
I want to do time series land use change analysis using the level 2 usgs landsat product between the period of 1990 and 2016. However the algorithm that has been used to do surface reflectance computation for Landsat 8 (LaSRC) and Landsat 5 (LEDAPS) are not the same.

Is it possible to do comparison between the two products without considering their difference in algorithm for surface reflectance computation?

If not how can I do a correction to these data?


texts: Calculating area weighted average of attribute in one layer by shape in another using ArcGIS for Desktop?

texts:
For a project I am working on I would like to intersect fire station response districts with income data to determine the median income per response district. However the borders of the layers obviously do not line up.  What is the best method to go about manipulating the data to have the output show the median income based on the response districts?

I am using ArcMap 10.2.2 for this analysis. I have a polygon shapefile with median income information and a polygon shapefile of fire stations first in response areas.


texts: What kind of hardware configuration is needed for fast map services?

texts:
I have been trying to figure out the best way to have fast map services. So far i have done lot of changes on the process side like scale rendering, analysis, projections, SDE data layer indexing, seperating map services etc. I have found some improvement.

I am at the point where I need to figure out the best hardware configuration that will provide fast map services. I have gone through some documentation from ESRI and it seems lot of information but hard to get develop clear understanding. Being a developer, I am looking for some solid/simple ideas on what i should be asking my Server team. This is the last option that i would like to explore.

Appreciate any feedback.

Thanks
Jay


texts: occasionally empty search cursor looping through a raster list with arcpy

texts:
I'm looping through a raster list, to export cell counts (from "Count" field in the table) to a text file, I'm only interested in cases where the field "Value" = 1, so I have included this in my search cursor (inR is from the raster list):

Rows = arcpy.SearchCursor(inR, '"Value" = 1', "", "", "")

However, some rasters in the list do not have value = 1 in the table, in this case, I want to return 0 for this count. I've tried to include this in the following loop through the search cursor

for row in Rows:
    countR = row.getValue('Count')
    if "countR" not in locals():
        countR = 0

#append count to list to export later
value_list.append(countR)
del(countR)

When the search cursor is "empty", the get.Value line does not return any value and the object is not created, however, the following line does not work, the idea is that if countR does not exist, then it will be given the value of 0 for this raster in the list (inR).

Edit: this is where I went wrong, the above is not correct, when the search cursor is empty (like an empty list) , there is no loop and none of the statements within that loop take place.

Any help would be appreciated, or alternatives.
Thanks


texts: ArcObjects: Does an IEnumElement that was returned from IGroupElement3.Elements() maintain the z-order of the GroupElement?

texts:
I want to read graphics elements (TextElements and RectangleElements) from a GroupElement object (IGroupElement3) and put them into another in the same order as they were added to the original.  The original graphics were built and added to their GroupElement in an ArcMap ScreenDisplay context, so the first graphic added has the lowest z-order, the next has the next highest, etc.  My idea is to use the Elements() property of the original GroupElement to get the set of elements as an EnumElement object (IEnumElement) and then to loop through the IEnumElement, adding each element to the new GroupElement.  This technique, though, will only work for me, if the elements in IEnumElement are retrieved in the same z-order as they had in the original GroupElement, i.e. lowest first to highest last (FIFO).  I saw this post and got a bit worried about the idiosyncrasies of IEnumElement operations.  Does anyone know if IEnumElement will maintain the original z-order of the graphics?

As context and in response to Kirk's comment below, I will say that I am doing this to get around a bug in ArcGIS for Server 10.1, where an ESRI optimized Map Service cannot handle annotation that has nested grouped graphics (see this post).  Each piece of our annotation contains a GroupElement that itself contains multiple Group Elements.  Each of these Sub Group Elements contains a set of Rectangle Elements and Text Elements.  The workaround for the bug is to put all of the graphic elements into the containing GroupElement of the annotation without their own grouping.  Because the z-order of the graphic elements within a Sub Group Element is important to maintain and because there are multiple Sub Group Elements, I want to take each Sub Group Element in turn and read its graphic elements into the annotation's GroupElement.  This will avoid the bug.  Otherwise, the Map Service simply won't draw the annotation.

Code is being implemented in C# in a web app.  I do not have access to the server and app, so I cannot test my idea.  Nonetheless, I am being asked to come up with a solution.  Others will just have to test it.  Thanks for any help you can offer, folks.


texts: Add data from secure solr server to GeoServer

texts:
I used solr plugin for connecting with solr from GeoServer. After creating solr datastore, I couldn't list any layer from solr. From log it looks GeoServer couldn't connect with solr because it asking for credential.
Solr is behind keycloak authentication. So, what is the way to connect with secure solr server.


texts: Scale bar in QGIS shows incorrect measurements

texts:
I am mapping change in share of land used for agricultural use by nation. For some reason when I add the scale bar it displays incorrect measurements (see screenshot attached. I am pretty sure the Indian Ocean from Madagascar to Perth is greater than 5km.
Could this be an issue with the shp file I am using? is there any other info/settings/screenshots I need to provide to get to the bottom of this?


texts: How to reclassify a very large land cover dataset?

texts:
Consider the NLCD2001 Land Cover dataset for Alaska (download link). I need to reclassify this dataset so that only pixels of value 41, 42, and 43 are preserved; all other pixel values should become NoData (or 0, if necessary).

This seems like a simple task, only requiring one call to the Reclassify tool. Unfortunately, every call results in a vague and unhelpful error message:

Executing: Reclassify "D:\ak_nlcd_2001_land_cover_3-13-08_se5.img" Value "0 40 0;41 41;42 42;43 43;44 255 0;NODATA 0" "D:\alaska_reclassified.tif" DATA
Start Time: Thu Jan 03 09:23:13 2013
ERROR 999998: Unexpected Error.
Failed to execute (Reclassify).
Failed at Thu Jan 03 09:23:13 2013 (Elapsed Time: 0.00 seconds)

How can I go about reclassifying this raster dataset? I am using ArcCatalog 10.0, Build 4000, with the Spatial Analyst extension enabled.


texts: Are ESRI spatial views regenerated whenever they are queried?

texts:
If a spatial view contains data "joined" from multiple tables, will all the tables be queried whenever a query is executed against the spatial view?

We have some spatial views and whenever we run a query against some of them, the query can take over an hour to run. We're talking about a basic "select * from xyz" query.

Update - We are not using versioning and the geometry is stored as st_geometry.


texts: I have updated from version 2.6 to 2.12. I have opened and saved my project in the newer version. Now it runs really slowly. For example every time I zoom in or out or pan the map I have to wait 20-30 seconds while it redraws everything. A colleague has had a similar problem in the past upgrading 1.8 to 2.2 (or something like)


texts: QGIS Time Manager with Graduated symbols

texts:
I have a csv file with lat/long, site name, and a temperature field (I have this for something like 105 sites, but am just trying to get one site to work for now). Each row has a different date/time.

I am trying to get time manager to animate them in order with color or size changes based on mean temperature.

I get this error after I add the layer to time manager and hit ok (works fine if I don't have graduated symbols).

2017-03-27T10:26:42 0   Layer extents(datetime.datetime(2013, 6, 10, 0, 0), datetime.datetime(2016, 11, 3, 0, 0))
2017-03-27T10:26:42 0   Trying to create time interpolated layer with interpolation mode: Linear interpolation (point geometries only)
2017-03-27T10:26:42 2   An error occured while trying to add layer test to TimeManager. Cause: 'Traceback:Traceback (most recent call last):\n  File "C:/Users/justin/.qgis2/python/plugins\\timemanager\\timevectorinterpolatedlayer.py", line 53, in __init__\n    qgs.setLayerColor(self.memLayer, qgs.getLayerColor(self.layer))\n  File "C:/Users/justin/.qgis2/python/plugins\\timemanager\\qgis_utils.py", line 116, in getLayerColor\n    symbol = renderer.symbol()\nAttributeError: \'QgsGraduatedSymbolRendererV2\' object has no attribute \'symbol\'\n'Traceback (most recent call last):
          File "C:/Users/justin/.qgis2/python/plugins\timemanager\timemanagercontrol.py", line 635, in createTimeLayerFromRow
            self.iface)
          File "C:/Users/justin/.qgis2/python/plugins\timemanager\timevectorinterpolatedlayer.py", line 76, in __init__
            raise InvalidTimeLayerError("Traceback:" + traceback.format_exc(e))
        InvalidTimeLayerError: 'Traceback:Traceback (most recent call last):\n  File "C:/Users/justin/.qgis2/python/plugins\\timemanager\\timevectorinterpolatedlayer.py", line 53, in __init__\n    qgs.setLayerColor(self.memLayer, qgs.getLayerColor(self.layer))\n  File "C:/Users/justin/.qgis2/python/plugins\\timemanager\\qgis_utils.py", line 116, in getLayerColor\n    symbol = renderer.symbol()\nAttributeError: \'QgsGraduatedSymbolRendererV2\' object has no attribute \'symbol\'\n'

2017-03-27T10:26:49 0   Cleaning up interpolated layer test

My version: QGIS version 2.18.0 Time Manager version 2.3.2


texts: Generating plan sets using different layer configurations

texts:
I am working on a flood modelling project that will generate a very large number of plan sets.  Each set will have several plans - say a general arrangement plan and say 5-10+ sheets tracking along a intercourse. Each set of plans will be generally the same, except with a different "results" layer turned on. For example Set 1 covers the 100year flood extent, Set 2 covers the 50year flood extent, etc.

As the model develops, options tested, refinements made, etc, there is the need to reprint the drawings with the updated results layers shown.

Can I do the following with QGIS?:

Set up a template composer titlebox
Define a set of plans along a river reached for example
Set up a layer configuration then save the layer configuration for later reuse.
Print out the set of plans.
Change the layer configuration Then save for later reuse. Repeat this for all results.
At a later date, update the results files, and regenerate all the drawings using the saved layouts.

Any pointers would be appreciated.


texts: Marker layer not responding to events in OpenLayers

texts:
I have multiple layers in OpenLayers: three vector layers, one google map layer, and a marker layer. I registered feature selected event to all three vector layers (which works fine, but btw is that a good practice to register events one by one?). When I registered the click event for marker layer, it doesn't respond.

var marker = new OpenLayers.Marker(position, icon);
marker.events.register('click', marker, function(e){
    // Do something...
});
markerLayer.addMarker(marker);

I wondered if it was caused by the problem of layer order. I tried setting ZIndex for layers, but it didn't work.


texts: How to get an idea to use ArcGIS tools in toolbox?

texts: I want to see the definition of any tool in ArcGIS tool box and How to enable to see the procedure to use them and option to edit the tool?


texts: Stop ArcMap from probing missing data sources on launch

texts:
When migrating a map from one environment to another (say, from an existing client environment to our development environment) we're often given MXD documents that represent the map.  These documents are often connected to SDE data sources.

Generally it is not too much effort to load the data into our own database, launch the MXD, wait for it to finish not finding any data, and re-path the layers.

However, if the map document has dozens or even hundreds of layers, it can be a long wait.

Is there any way to stop ArcMap from even trying to load those layers?  A flag somewhere that says "I know the data are missing, just skip that step"?

This applies to both ArcGIS 9.3.1 and 10.


texts:
Is there support for maps from Portal for ArcGIS inside the Configurable Map Viewer (CMV)?

If so, how should one reference a portal map?


texts: Comparing field names and field formats for featureclass using ArcPy?

texts:
I have a strict data model which needs to be enforced for a project. For all featureclasses which exist, I need to check if the fields which are present conform to the data model. I want to do this in python. An example:

The Schema:

`Field1 must called Field_01 and the format is Text with length 255`

`Field2 must called Field_02 and must of Format Int`

`Field3 must called Field_03 and must of Format Date`

If my Featureclase to be tested has 20 fields, I need to loop through all fields describing their formats and compare to the data model.

If they are wrongly named or formated the correct field should be added and the the attributes copied. The old field should then be deleted.

Everyone has these tasks but I have never seen a script to really tackle the problem. Is it worth the trouble writing it?


texts: Layer not visible after deleting from attribute table QGIS

texts:
I'm a newbie for QGIS and trying to learn.
I was editing the attribute table in which process I deleted some rows. Then the layer became invisible in the project. After trying a lot I decided to redo the project. To do so, I started a new project and reloaded the shapefiles from the zip file. But out of three layers the problematic shapefile still is not visible.
What should I try next?


texts: Checking where each value comes from ArcGIS weighted sum?

texts:
I have five raster layers: all of them have values of 0 or 1 (boolean)

Via weighted sum function, i can check the total values on each cell (0-5).

If there is a cell with a value 4, how can i check which source layer had a zero ?

Is there a way i can create a table having all values from different layers so that I can check which layer got zero and what constraints the weighted layer has?


texts:
I'm using an enterprise db to store my data and I'm writing a python tool that allows me to interact with that data in ArcMap.  However, all my layers someone have "OTHER" for the symbologyType (not sure why).

What I need to do is to change the symbol type for points in each FC.  It is fine for now to just use a single feature symbol type, but of course I can't do that when I've got the unsupported symbology type.

How can I create my own layer symbology?  Once I've got something I know I can apply it using ApplySymbologyFromLayer_management()

I'm  probably missing something obvious here, but if someone could help point it out I'd appreciate it!

Edit (just to be clear, I know I can change the symbology from the layer properties, but I want to be able to script it and control it from a python tool):

Here are the features

Here is the symobology reference

Here is the layer properties


texts:
can a loadend event be added on the baselayer? I made a code which would get all the loaded tiles but will be invoked when the map is finished loading all the tiles?

I tried using Events.register and Events.on but to no avail and i'm not sure anymore how I would be able to achieve it.


texts: transpose large netCDF with GDAL, NCL, NCO or CDO

texts:
I have a large netCDF file (444GB) that I would like to transpose. The file is flipped with latitude on the x-axis and lon on the y-axis. See pictures of one band below.

Not correct

Correct: I transposed this using raster package in R but my 444GB file is too big and the process has been running for 30 hours now non-stop. Thus, it is too slow to accomplish this task. How can I achieve the same task using GDAL, NCL, NCO, or CDO?

An example file can be gotten from here
link to files


texts: Identifying overlapping lines within layer

texts:
I am trying to identify the overlapping lines within a layer that consists of polygons of land parcels.

I have already converted my data to lines and exploded those lines.
Indeed, I have run a "no duplicates" rule with the Topology checker and it identifies the overlapping lines (shown as red in the image below). But I do not know how to select the data identified by the Topology Checker.

When I run "intersect" on the layer, it seems to return all my data, including the non-overlapping portions. Is there any built-in tool that can help me here? If not, I assume this would be a straightforward SQL query?


texts: Input connector for GeoEvent that gets data from website that requires login credentials

texts:
I am trying to figure out a way to set up GeoEvent so that it polls a website that requires logging in, and then downloading the data.

Is there a way that GeoEvent can do this automatically?

I'm sure that I'm not the first one to attempt something like this with geoevent.

Does anyone know where I could find an input connector that will do this (and how to set it up)?


texts: Trouble trying to zoom to graphic (ArcGIS 9.3.1, VBA)

texts:
I am writing an application where one of the things it does is create a point then creates buffer (which is a graphic) at the specific point, what I want to do is when the buffer has been created, is to zoom to the extent of the buffer.

I have tried the following code but it doesn't seem to work

Dim penv2 As IEnvelope
Set penv2 = New Envelope
Set penv2 = pActiveView.extent
Dim pArea As IArea
Set pArea = pElement.Geometry.Envelope
penv2.CenterAt pArea.Centroid
pActiveView.Refresh

I've also tried

Dim penv2 As IEnvelope
Set penv2 = pElement.Geometry.Envelope
pActiveView.Extent = penv2
pActiveView.Refresh

But nothing happens. Any ideas on where I am going wrong?

Thanks


texts:
I am using GeoServer, OpenScales Flex 3 for my web-mapping application, is there any source for the Flex OpenScales API to display the maps.

additional from a comment

I am working on a project to display the weather data in online. I have loaded point and polygon shapefiles into PostGIS and created a PostGIS store in GeoServer. Using Adobe Flex 3 and OpenScales i have designed and displayed the both shapefile as WMS and WFS. Now i want to display animated GIF in the map. any idea....

thanks in advance..


texts: cartodb runs out of space *after* shrinking the data in the tables?

texts:
I try to work in CartoDB with data I import from CSVs (or xlsx, see below). The data is 24.1 MB in ASCII CSV, 10 MB in xlsx.

I spent quite some time shrinking my data's size, and I was happy to upload less than 25 MB (the limit of my free academic account). I am puzzled by what happened next. I could delete two longish string columns (latitude and longitude, as cartodb georeferenced it automatically). I could convert a column of years to numbers from strings, which should only shrink the size of the table. I could convert a column of dates string to date, which should shrink it further. But when I would do one final operation I need, the conversion of an intensity measure of my temporal heat map from string to number, which can only shrink the size further, THEN cartodb complains that I am over the limit of my account? I spent hours deleting my tables and importing them again, twice in xlsx where I thought numbers will be numbers from the get-go, but that import even fails completely. I would rather not pay for an upgrade until I understand what is going on and why it is necessary.

I have also mixed feelings about going over the limit because of the created_at and updated_at columns, which cartodb creates automatically and does not let us delete…

Any thoughts on how to work around this? Any experience with this behavior?


texts:
I have adapted someone else's VB code to convert lat long to OSGB for UK locations. In essence my code converts a Google API location returned from a text search, into Eastings and Northings that can then be checked against the OS using (e.g.) StreetMap.

My conversions are only ball park correct, and I think I need to incorporate the Helmert Conversion, to get more accurate transformation.

Is there a VB savvy person out there who might be able to help me, if I posted up existing VB code?


texts: I would like to use OpenLayers to access a Wms, which is protected by a password. Unfortunately, I find no solution to this problem. My problem is in particular that I want to prevent that password from publishing in the source code of the page. I use OpenLayers 4. Can someone give me an advice?


texts: ogrinfo works on a gdb, but ogr2ogr cant open the same file gdb

texts:
GDAL 2.2.3

ogrinfo "Source_Rock_Geochemistry.gdb"

produces a list of contents which is correct.
However,

ogr2ogr -f "PostgreSQL" PG:"host=xxxxx dbname=atlas user=atlas password=yyyy ACTIVE_SCHEMA=psd"  "Source_Rock_Geochemisty.gdb"

produces:

FAILURE:
Unable to open datasource `Source_Rock_Geochemisty.gdb' with the following drive
rs.
  -> `JP2ECW'
  -> `FileGDB'
  -> `OCI'
  -> `SOSI'
  -> `PCIDSK'
  -> `netCDF'
  -> `JP2OpenJPEG'
  -> `PDF'
  -> `DB2ODBC'
  -> `ESRI Shapefile'
  -> `MapInfo File'
  -> `UK .NTF'
  -> `OGR_SDTS'
  -> `S57'
  -> `DGN'
  -> `OGR_VRT'
  -> `REC'
  -> `Memory'
  -> `BNA'
  -> `CSV'
  -> `NAS'
  -> `GML'
  -> `GPX'
  -> `LIBKML'
  -> `KML'
  -> `GeoJSON'
  -> `Interlis 1'
  -> `Interlis 2'
  -> `OGR_GMT'
  -> `GPKG'
  -> `SQLite'
  -> `ODBC'
  -> `WAsP'
  -> `PGeo'
  -> `MSSQLSpatial'
  -> `OGR_OGDI'
  -> `PostgreSQL'
  -> `MySQL'
  -> `OpenFileGDB'

etc

Using OSGeo4W, and used setup to add gdal_filegdb library. I have ogr_FileGDB.dll in the gdalplugins directory.
QGIS open the gdb fine.


texts: Why attribute fields for features appear greyed?

texts:
I added an excel in an attribute table using join opperation; I added the csv excel into geodatabase using import table opperation. The joined fields appear into attribute table, but when I right-click on a feature, and click on attribute, the attributes fields on the right side appear greyed.
For an other layer, the attribute fields for feature appear blacked.

What can I do in order to make attribute fields for the first layer to appear blacked like in the second case?


texts: Registered Spatial View ObjectID field error

texts:
I am creating a spatial view in postgresql (geodatabase) and adding auto incrementing objectid field. I tried the following two ways to create it but in both cases once I register the view to the geodatabase I get the following error to load the table "Could not load from the data source. If you correct the problem , press the refresh button to reload the data. Possible problems can include bad network connection, invalid field etc. Item not found in this collection."
   CREATE OR REPLACE VIEW gismgr.ap_bg_vw AS
     SELECT nextval('ap_seq'::regclass)::integer AS objectid, ap.*, str.shape
       FROM ap_bg ap
       LEFT JOIN attribute_vw str ON str.attri_num = ap.attri_number

CREATE OR REPLACE VIEW gismgr.ap_bg_vw AS
     Select next_rowid('gismgr', 'ap_bg_vw')::integer AS objectid, ap.*, str.shape
       FROM ap_bg ap
       LEFT JOIN attribute_vw str ON str.attri_num = ap.attri_number

What am I missing?


texts: Downloading large areas of OpenStreetMap data with QGIS OSM plugin?

texts:
I have OpenStreetMap data loading failure problem. I want to use the Download OpenStreetMap data tool in QGIS. I want to select the extent from map canvas like shown below:

.

For me, the osm-data usually works when the data downloaded map was less then 1:160000 scale. But when it is bigger than 1:320000 scale (including 1:320000), QGIS always gets infinite loading circle rainbow (OS X user).

Does anyone have an idea on how to get it to work?

GIS Software : QGIS
Hardware : Mac
OS : OS X 10.9.2


texts: Index to speed up similarity comparison when all the lines are along a same x-axis?

texts: When comparing similarity of linestrings with ST_HausdorffDistance (or another type of similarity function), is there a way to use an index to speed up the search for similar linestrings?


texts: Unable to transform features into projection, Google Earth Engine

texts:
I have the following code with which I try to export the MODIS NDVI index.
I have rescaled the collection with the appropriate scale factor and code runs without errors.
When I try though to download one of the available images, I get "Error: Projection error: Unable to transform
features into projection ".

Does this error means that I must project my collection?

Isn't possible
to download it without projection?

var geom = /* color: #98ff00 */ee.Geometry.Polygon(
        [[[100.06705522119341, 35.64726167759787],
[100.06705522119341, 26.242933904292144],
[115.62369584619341, 27.028556729687192],
[114.83268022119341, 36.28746466243914]]]),
    modis = ee.ImageCollection("MODIS/006/MOD13Q1")
.filterBounds(geom)
.map(function(image){return image.clip(geom)})
.filter(ee.Filter.calendarRange(4,6,'month'));
var modisNDVI = modis.select("NDVI");

var scaleNDVI = function(img){
  return img.multiply(0.0001)
}
modisNDVI = modisNDVI.map(scaleNDVI);

var batch = require('users/fitoprincipe/geetools:batch')
batch.Download.ImageCollection.toDrive(modisNDVI, "Folder", {scale:250});


texts: Extracting categorial data from neighboring polygons from st_intersects

texts:
For each polygon in an sf object, I need to extract data on a single variable from all of the neighboring polygons. I have made a reprex below.
So far I have managed to get a list of the neighboring polygons using st_intersects,
demo(nc, ask = FALSE, verbose = FALSE)

nc <- nc %>%
  mutate(polygon_id = row_number())

neighbors <- st_intersects(nc, nc)

For instance, polygon 5 (Northampton county) has the following neighbors:
neighbors[[5]]
[1]  5  6  9 16 28

I need the name from each of these neighbors (and do this for each polygon)
names(nc)
 [1] "AREA"       "PERIMETER"  "CNTY_"      "CNTY_ID"    "NAME"       "FIPS"       "FIPSNO"     "CRESS_ID"   "BIR74"      "SID74"      "NWBIR74"    "BIR79"
[13] "SID79"      "NWBIR79"    "geom"       "polygon_id"

nc[c(6,9,16,28),5]
       NAME                           geom
6  Hertford MULTIPOLYGON (((-76.74506 3...
9    Warren MULTIPOLYGON (((-78.30876 3...
16  Halifax MULTIPOLYGON (((-77.33221 3...
28   Bertie MULTIPOLYGON (((-76.78307 3...

I am struggling to do two things:

Remove 'the diagonal', that is the polygon itself (here, polygon 5) from its list of neighbors
Extract the names of all its neighbors (Hertford, Warren, Halifax, and Bertie counties) into N character vectors, since the number of neighbors varies. Alternatively I can make do with pasting them into a single character vector separated by something that allows me to split them afterwards.


texts: Counting number of vertices of object on vector layer PyQGIS

texts:
First of all, I want to say that I know that similar issue was raised before, but it didn't provide satisfying solution.

I need to get the number of vertices of every object on vector line layer.
Basing on this article: https://joseguerreroa.wordpress.com/2014/07/28/contar-y-extraer-nodos-vertices-para-vectoriales-de-linea-o-poligono-mediante-pyqgis/

I did this code:

layer = qgis.utils.iface.activeLayer()
feat = layer.getFeatures()
for feature in feat:
    geom = feature.geometry()

n = 1
ver = geom.vertexAt(0)
points=[]

while(ver != QgsPoint(0,0)):
    n +=1
    points.append(ver)
    ver = geom.vertexAt(n)

print n

And as the result I get number of vertices, but only of the last object. I guess I'm missing one while loop on the layer (to get number for every object), am I right? But I don't know how it should look.

I know that there is 'Vertices counter" plugin, but it doesn't work (doesn't even start) in my case (QGIS 2.12, Win 8.1). And I need it to be done in Python.

By the way, don't you think guys, that it is ridiculously hard to get number of vertices while it is so easy to get to coordinates of every vertex?

EDIT:
@nwduncan ( @ArMoraer too) suggested fixing up an indentation, and it was good clue. I noticed that Python console need refreshment, because sometimes it can't handle indentations. Hope it will help other beginners. The final code is:

layer = qgis.utils.iface.activeLayer()
feat = layer.getFeatures()
for feature in feat:
    geom = feature.geometry()
    n   = 1
    ver = geom.vertexAt(0)
    points=[]

    while(ver != QgsPoint(0,0)):
        n +=1
        points.append(ver)
        ver=geom.vertexAt(n)

    print n


texts: Synced CSV File Google Drive - Not Filling out Georeference field for visual

texts:
I Have a JS account on Cartodb with the sync option for data.

I have created code to upload CSV file to Google Drive of all login activity of our Google Accounts for the last day. If I select this document as a data source without adding sync option, it converts the ip_address column I have to the co-ords using Georeference via IP Addressing.

If I select the sync option instead for the table data, the data syncs correctly but I can't see where to setup the georeference column for the map view. The Georeference section in the top right drop down is greyed out.

Please tell me I haven't upgraded our account without this feature working...


texts: gdalwarp ignoring multiple srcnodata values?

texts:
I'm trying to resample an in image in the MODIS sinusoidal projection. There are several fill/ NoData values that I want to exclude in the resampling. The data are unsigned 16-bit integer values. A sample source image can be downloaded here.; I'm using the ET_1km layer in the 2014 image: MOD16A3.A2014365.h11v05.105.2015034131802.hdf.

Because the source is an HDF4 file, I initially use gdal_translate to built a VRT.

gdal_translate -of vrt -ot UInt16 HDF4_EOS:EOS_GRID:"/path/to/file/MOD16A3.A2014365.h11v05.105.2015034131802.hdf":MOD_Grid_MOD16A3:PET_1km ~/Downloads/temp.vrt

Then, I use gdal_merge.py (because I really want to merge multiple VRTs to build a global mosaic) to output a GeoTIFF.

gdal_merge.py -of "GTiff" -o ~/Downloads/temp.tiff ~/Downloads/temp.vrt

Finally, I use gdalwarp to resample/ reproject the image. The target projection here is a global EASE-Grid 2.0. Note I have multiple srcnodata values that I want to map to a single NoData value in the output.

gdalwarp -t_srs "EPSG:6933" -r bilinear -tr 1000 1000 \
-te -17367530.450 -7301459.170 17336469.550 7314540.830 \
-srcnodata "65535 65534 65533 65532 65531 65530 65529" \
-dstnodata 65535 -multi -wo NUM_THREADS=6 -ot UInt16 \
~/Downloads/temp.tiff ~/Downloads/temp_warped.tiff

Unfortunately, the warped file has resampled the srcnodata values. It has set the correct output NoData value (65535) but there are still unmasked values from the srcnodata array and they have contaminated adjacent, resampled pixels. These values are much higher than the expected range, so they're pretty obviously affected by these unmasked srcnodata values.

Reading the array in with GDAL/NumPy, I can verify that I'm asking gdalwarp to mask the right values; the three highest are among my srcnodata values and nothing else comes close:

>>> np.unique(arr)[6300:]
array([18227, 18228, 18230, 18250, 18258, 18259, 18268, 18271, 18275,
       18278, 18281, 18282, 18288, 18292, 18299, 18302, 18304, 18306,
       18315, 18319, 18320, 18322, 18326, 18338, 18341, 18352, 18355,
       18365, 18373, 18385, 18389, 18435, 18465, 18479, 18504, 18535,
       18552, 18555, 18556, 18559, 18561, 18566, 18572, 18594, 18614,
       18622, 18637, 18640, 18735, 18738, 18845, 18867, 18868, 18906,
       19100, 65530, 65533, 65534], dtype=uint16)

Is there something special about specifying multiple srcnodata values? I don't often use more than one. I guess until I figure this out I'll use nearest-neighbor interpolation and manually re-map these values.


texts: My SRTM tiles have their elevations ranging from sea level i.e. 0m to 5,300m in Tanzania. My problem is that when I mosaic any two or more tiles, the elevation  displayed on the Table of contents changes and the range becomes unbelievably high e.g. 0 - 65,000 and so the mosaic can't represent the terrain in my country.


texts:
I'm attempting to rasterize a layer of a raster by using the different features inside a shapefile(In this case the different features are lines).

The problem I am running into is that RasterizeLayer does not like it when I pass it a feature rather than the layer. My code is below:

line_ds = ogr.Open(r"Lines.shp")
lyr=line_ds.GetLayer()

for feat in lyr:
    gdal.RasterizeLayer(
                        target_ds,  # raster file
                        [1],  #My raster band
                        feat, #The feature in the shapeful
                        burn_values=[0] # my burn values
                        )

This is a fairly standard piece of code that I have used before, but only when using whole shapefiles rather than the individual features.

Also I am trying to invert the rasterization, but RasterizeLayer doesn't seem to have an option for this, I have tired adding in:

options=["INVERSE=TRUE"]

and

inverse=True

does anyone know if there is a way to make it work?


texts: How to provide a query point as input to a PostGIS query?

texts:
Let's say I want to write a query, which returns all the coffee shops within 100 meters of a (lat, lon) pair, provided by the user.

Right now I take the lat and lon from the user and then create a point using the following functions:

ST_Transform(ST_PointFromText('POINT (-74.1 40.2 )', 4326),900913))

But I am not sure if this is the appropriate way to go if I later want to use ST_DWithin(input_point, coffee.geom, 100)) to retrieve the data of interest.


texts: ArcGIS runtime error "Polygon Geometry is null"

texts:
I have created a Feature service using Point, Line, Polygon representation. I have used dataset that is provided by default in ESRI military Feature Template. I am using Advance feature symbology in ArcGIS Runtime, That feature service is working perfectly fine in ArcGIS Runtime in Offline mode. but when i added my custom representation in the area, it generated the error showing that "Geometry is Empty" while creating the feature layer in arcgis runtime. This error is only for polygons, custom added symbology is perfectly working fine in offline mode for point and line.

Environments:
ArcGIS Runtime API for Java 10.2
ArcGIS Server 10.4.1
ArcGIS Desktop 10.4.1


texts:
I'm currently trying to plot a heat map of a large data set, where each position element has an additional attribute that corresponds to a count of occurrences (let's call it ni).

I want these counts to be taken into account in the density estimate. I guess an easy approach would be to duplicate each of the elements ni times. However, as the data set is pretty large already, I would like to avoid duplication.

Is that possible in QGIS without much data pre-processing?


texts: spatial join with the same merge rules for multiple fields in a single feature class

texts:
I have a polygon feature class where each polygon represents distribution range of a species, and I have over 90 species here where each species representing a single polygon.The attribute table also contains several binary numeric fields that indicate species conservation status-- EN, CR, VU, NT, LC, etc (1 if the species is classified in a certain status 0 if not). I also have a 10*10k grid. I want to count number of polygons (species) overlapping with each grid cell. And, I want to sum um the 1s in conservation status fields for each grid cell to enumerate the number of species belonging to each conservation status in each grid cell (so that I can create species heat/hotpot maps).

Spatial join tool is the approach I tried, but, this only allows me to run a merge rule for a single field. I want to run "sum" merge rule for seven fields in the species distribution feature class. I could run each field separately for the same merge rule and create multiple feature classes through spatial join tool, and then join all these tables via "make query table" tool (via a very long SQL expression) or iterate join table tool to join all feature classes generated by Spatial join tool.

Is there a suitable tool that satisfy my need? I am not very savvy on python scripts and that's why I need to support with existing tools and the model builder. I am using Arcmap 10.6


texts: v.clean batch process within QGIS 2.10 (PISA)

texts:
I get an error message when I try to create a batch for v.clean operation..

Algorithm v.clean - Toolset for cleaning topology of vector map. starting...
local variable 'filename' referenced before assignment See log for more details

And I don't really get why...
Here a screenshot of my setting:


texts: Spatial Join for coregistered polygon data from different dates

texts:
I have three separate feature datasets of 125 polygons that contain plant respiration, incident sunlight, and soil moisture data collected on three different dates. The polygons are perfectly coregistered/georeferenced; they are simply separate copies of the same dataset. The data should have been entered in one instance of the dataset, with one record per date, but this is what I have to work with.

I want to overlay these datasets and display the mean of the data from the three dates in one record? What tools can be used for this? I have thought of using Merge and then Spatial Join, but it looks to be very time-consuming.


texts:
Possible Duplicate:
  gdalwarp in a bash shell for loop

I have several modis images (.hdf) from which I want to use only the one band (NDVI) and create a ".tif" image.
I have already finished all the preprocessing and I ended on the command below:

gdal_translate -of GTiff $input documents/test.tif

When I run it, I got the answer: "Too many command options"

BUT when I use the command "echo" and run the model by copy/pasting the result of the "echo" command:

gdal_translate -of GTiff "HDF4_EOS:EOS_GRID:"documents/modis_images/PullDir/0302579596islumc/MOD13Q1.A2011289.h19v04.005.2011307201911.hdf":MODIS_Grid_16DAY_250m_500m_VI:250m 16 days NDVI" documents/test.tif

it works fine.

What am I doing wrong???

Thank you!


texts: Is it possible to set a reference scale in QGIS?

texts:
It's a little tricky to pick label and feature styles (line thickness, colours, etc) in the map canvas because they don't reflect what I would see in my print composer which is at a different scale because of paper size and such.

I haven't found any options in the QGIS options or project properties.


texts: Get non-masked values of multiband numpy masked array

texts:
I am working on a multiband image with python.

I imported my image as a masked numpy array of shape (bands, rows, cols) using rasterio. The mask is the same for all bands.

I would like to get the spectra of all non-masked pixels. The result could be an array of shape (bands, rows).

For now I am doing:

output = []
for band in range(array.shape[0]):
    output.append(array[band][array.mask[0]==False])
output = np.asarray(output)

Is there a more direct way to do it?


texts:
In QGIS 2.14.3 added a csv file as a layer. Attempt to add a virtual field like shown in the screenshot below (same result with "field_14" || ' ' || "field_10" || "field_11"):

The field is created but contains only NULL values:

If not a bug, what am I missing?


texts: I am new to QGIS. The version I am trying to get used to is v3.6. I have been trying to sort this table in map layout but still ending up as displayed in the table below. Need help to sort in ascending order.


texts:
Im a self taught ArcMap user working in a small business, so no one to bounce problems off.

My aim is this: I would like to be overlay different surfaces, manipulate them, and display them. The image below has been made in MapInfo:

Its a mine dump (LIDAR) with a section of the new design (CAD) projected over the top. NOte that it intersects with the natural surface, and has a backing elevation grid.

My investigations/experimentation thus far have been this:

Using Sketchup to make design surfaces
Importing the image into ArcScene
Placing and orientating the design using 3D Editor functions.

So far so good, but when I try and edit/manipulate the design in ArcScene or ArcMap, it appears not to have any attribute table/geometry associated with it. When I try and save the design in Sketchup as CAD I get the same problem.

I would be happy if anyone could provide some basic steps to get toward my goal. Any answer with more detail would be fantastic.


texts:
Can I get clazz of a segment in Java? For example,

RoutingResultSegment rrs = graph.lookupSegment(path[j])

How can I get rrs's clazz?


texts: Saving map to more than one location at same time

texts: Is there a setting where when saving a map document it will automatically save to the pc hard drive and a removable hard drive at once, or do I have to save them separately?