texts: Assertion Error, Trying to add .tif to group layer

texts:
So I am trying to add a layer to a group, but running into problems most likely because of the file is a .tif. I have tried quite a few different iterations of this and looked at a few solutions but nothing seems to work, any ideas? I have also tried entering a [0] behind the listlayers command

targetGroupLayer = arcpy.mapping.ListLayers(mxd, "15MinMaps", df)
for row in cursor:

       Sel = (row.getValue(field))
       for dirpath, dirnames, filenames in arcpy.da.Walk(r"Z:/IMAGES/MAPS/15_Min_Thematic_Maps",topdown=True, followlinks=True, type="TIF"):
           for filename in filenames:
               if Sel in filename.upper():
                print filename
                fullpath = (dirpath + "/" + filename)
                print fullpath
                Fname = (dirpath[36:] + " " + filename)
                result = arcpy.MakeRasterLayer_management(fullpath, Fname)
                layer = result.getOutput(0)
                arcpy.mapping.AddLayerToGroup(df, targetGroupLayer, layer, "BOTTOM")
               else:
                   pass

I keep on receiving this error.

  Traceback (most recent call last):
    File "C:\Users\sorrell\AppData\Local\ESRI\Desktop10.2\AssemblyCache{DE572FA2-3589-48E1-8D3E-6E2C0CB31129}\NewOMSIUA_addin.py", line 117, in onMouseDownMap
      arcpy.mapping.AddLayerToGroup(df, targetGroupLayer, layer, "BOTTOM")

  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\utils.py", line 181, in fn_
      return fn(*args, **kw)

  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\mapping.py", line 88, in AddLayerToGroup
      assert isinstance(target_group_layer, Layer) and target_group_layer._arc_object.isGroupLayer

  AssertionError

It will add in the layer but will not add the layer into the group.
Edit: I just sliced off the .tif at the end of the name just to make sure the .tif was not messing anthing up in the name. It did not work


texts: Create serial field following alphabetical order with QGIS using graphical modeler

texts:
I have a field with names, a string field, and I want to create another one with serial content following the alphabetical order.

I have this:

|Field1|

|  B   |

|  C   |

|  A   |

|  D   |

And I want to reach this:

|Field1| Field2 |

|  A   |    1   |

|  B   |    2   |

|  C   |    3   |

|  D   |    4   |

The MMQGIS plugin offers a tool to sort Shapefiles, but is this operation not possible directly in the field calculator?
I'm very interested to know how to make this to make a model in the graphical modeller


texts: Upgrading PostGIS and PostgreSQL but running upgrade to PostgreSQL it errors?

texts:
I want to upgrade

  PostGIS（2.0.4 ---> 2.2.3）

and

  PostgreSQL (9.2.4  ----> 9.6)

so

First I upgrade PostGIS

1、install PostGIS 2.2.3 on postgresql 9.2.4
2、alter EXTENSION postgis   2.0.4 ---> 2.2.3

Second I upgrade PostgreSQL by using pg_upgrade

1、Install PostgreSQL 9.6 and PostGIS 2.2.3
2、Running pg_upgrade

But it's error:

could not load library "$libdir/postgis-2.0"
error:could not access file "$libdir/postgis-2.0" have not file or dir

so I guess it seem in the older PostgreSQL (9.2.4) have some function must using PostGIS 2.0.4

  but in PostgreSQL 9.6 I haven't installed PostGIS 2.0.4

So

If I want to upgrade what should I do?


texts: Is there a function to select a region of a map for further processing with Python?

texts:
I would like to select a map's region in QGIS for further processing with python console.
Ideally I would like to select the region with a mouse drag (like Gimp crop function) and then e.g. analyze the elements inside that area using Python, take a snapshot the selected area and others stuff like these.
Is there a prebuilt function in QGIS that allows me to do that? I want to achieve this for many tasks, mainly to export the data, these are three examples:
1 Get the RELATIVE COORDINATES of attributes inside the selected area
What I need for an application is to get
coordinates relative to the selected area and not only the "geographical" CRS of the attributes.

E.g. if I have the attribute "DILLINGHAM" inside the selection (the image is from Alaksa data set Airports) I need to have the image coordinates of the label and the name field e.g. (X,Y, "label"):
(210,150,"ST "DILLINGHAM")
(200,350,"PORT HEIDEN")
...
So I would like to retrieve the position of the attribute relative to a simple reference system (my selection), where the 0 is a corner of my selection
2 Make a better clipper
I would like to use this function even for make a better clipper. Raster->Extraction->Clipper. When I work with may raster files I would like that QGIS allow me to clip only the rasters that are into my selection and not to show me all the list of other rasters that are not inside the selection as actually does.
3 Get a snapshot of the selection


texts: How to create a point grid within a polygon layer?

texts: Want to generate a point layer, that contains the maximum points in a polygon layer. all points should have the distance of 6 meters between each other. how can i do it?


texts: Export picture marker symbol in legend in ArcGIS

texts:
I used a picture marker symbol (from JPG file) in order to represent a point layer with unique values symbology.

this is the symbol in the map:

My problem is when i export the map to a JPG file, the picture marker symbol became Blurry.

This is the resolution:


texts: Adding Basemaps from Google or Bing in QGIS

texts:
ArcGIS Desktop has the option of using basemaps from ArcGIS Online.
Does QGIS have any such options?


texts: Using The Labeling Engine API vs. The simple labeling interface API in QGIS 3

texts:
I am working on a project where I am to label city maps. I want to label roads and buildings with text, and some point locations with symbols where I use SVGs and TrueType font.
As labeling result, I want NO labels to be suppressed due to overlapping: all labels must be visible.
I also want to be able to use SVGs and TrueType font, besides plain text.

So far I have tried with using the simple QGIS interface API, e.g. for labeling roads:

roads = project.mapLayersByName('layer_name')[0]
iface.setActiveLayer(roads)
roadsSettings  = QgsPalLayerSettings()
roadsTxtFormat = QgsTextFormat()
roadsTxtFormat.setFont(QFont("Univers LT Std 57 Cn"))
roadsTxtFormat.setColor(QColor(255, 255, 255, 255))
roadsSettings.setFormat(roadsTxtFormat)
roadsSettings.fieldName = "ROADNAME"
roadsSettings.placement = 3 #Curved: 3 Straight: 2
roadsSettings.placementFlags = roadsSettings.OnLine
roadsSettings.repeatDistance = 45
roadsSettings.enabled = True
roadsSettings = QgsVectorLayerSimpleLabeling(roadsSettings)
roads.setLabelsEnabled(True)
roads.setLabeling(roadsSettings)
roads.triggerRepaint()

I am wondering if this is the best method, to add labels one by one for each vector layer, using QgsVectorLayerSimpleLabeling. With this method I can also add SVG symbols using the QgsSvgMarkerSymbolLayer class.

Another method would be to use the Labeling Engine API, e.g. using the QgsLabelingEngineSettings class. However, I am not familiar with it, and haven't found many examples of others using it. Furthermore, I don't know if I can use SVG with the Labeling Engine API.
Also, I don't know if one or both of those methods automatically suppresses labels, which I don't want.


texts: Generating approximate polygon for circle with given radius and centre (without using shapely)

texts:
I am given center and radius (in km), I want to generate coordinates for the circle.
Every example on GIS.SE uses Shapely.
Is there any way to do it in python without using Shapely?


texts: How to combine two rasters based on the relationship to a polygon mask?

texts: I am looking to combine two single-band, 1-bit rasters of the same spatial extent based on their relationship to a polygon (mask). The image shows a polygon displayed with a cross-hatch and the two input rasters (Raster 1 & Raster 2) as well as the desired output raster (Raster 3). I need to keep the Raster 2 cells that are covered by the polygon mask otherwise keep the Raster 1 cells.  This seems like it could be accomplished using Con or map algebra with a mask, although I have not been able to find a solution.  How can I combine two input rasters based on their relationship to a polygon (or mask)?


texts: How do I install mdenoise in GRASS 6.4.3?  I've already successfully installed r.denoise, and have downloaded mdenoise from wget http://www.cs.cf.ac.uk/meshfiltering/index_files/Doc/mdsource.zip. How do I proceed now?


texts: No results for PostGIS TIGER geocoder extension

texts:
Similar to this question, my TIGER geocoder extension in PostGIS isn't returning any results. It seemed to all install correctly, so I imported DC, and:

psql -d geocoder -c "SELECT g.rating, ST_X(geomout) As lon, ST_Y(geomout) As lat, (addy).* FROM geocode('1731 New Hampshire Avenue Northwest, Washington, DC 20010', 1) As g;"

... from the command line returns:

rating | lon | lat | address | predirabbrev | streetname | streettypeabbrev | postdirabbrev | internal | location | stateabbrev | zip | parsed
--------+-----+-----+---------+--------------+------------+------------------+---------------+----------+----------+-------------+-----+--------
(0 rows)

Unlike that other question, I have a repeatable case, since I'm trying to set this up in a Dockerfile. Can anyone see what might be wrong here? Is there a step that I've messed up?

Ubuntu (Trusty), PostgreSQL 9.3, PostGIS 2.1 (installed 'manually', i.e. not as an extension), attempting to use TIGER 2013 data.


texts:
I have published the Utility Network dataset and I would like to do small changes for feature templates in ArcGIS Online. Is this possible and how?
Currently, the only way I see it is to republish the data. If I try to do changes for feature templates in Pro through the portal it will not be applied on service. I don't see any option for edits in ArcGIS Online even though I am the owner of the data and I enabled edits when I was publishing the dataset. How could I do this changes? This seems an as simple task, however, I don't seem to have a clue how to do it and not to republish the data.


texts: Google Earth Engine chart error: No features contain non-null values of “year”

texts:
I'm trying to plot a chart from a collection I have created. While the data from this collection maps fine, I can't seem to produce a chart for it. Here is the code:

var l5_coll = ee.ImageCollection('LANDSAT/LT5_L1T_TOA');
var f1 = ee.Filter.dateRangeContains('1986-01-01','1998-08-31');
var f2 = ee.Filter.dateRangeContains('1998-10-15','2019-12-31');
var f3 = ee.Filter.dateRangeContains('f1','f2');
var f4 = l5_coll.filter(f3);
var merged_collection = ee.ImageCollection(f4);
// filter the ImageCollection with the boundary of the selected country
var iC = merged_collection.filterBounds(selectedCountry.geometry());
iC = iC.map(function(img){
    var year  = img.date().format("Y");            // get the acquisition year
    var CC = img.get('CLOUD_COVER')
    return img.set('year', ee.Number.parse(year)).set('clouds', ee.Number.parse(CC)); //
    });

var iC_FC = ee.FeatureCollection(iC);
var iC_FC_size = iC_FC.size();
var options1 = {
    title: 'Landsat Mission 4-8 - GEE image availability',
    hAxis: {title: 'Year'},
    vAxis: {title: 'Image count'},
    colors: ['red']
};

var histogram = ui.Chart.feature.histogram({
    features: iC_FC,
    property: 'year',
    minBucketWidth: 1
}).setOptions(options1);

//panel.widgets().set(0, histogram);
print (histogram);[codelink][1]


texts: Batch "Save as" layers w.r.t their geometry type in QGIS?

texts:
We have 100's of dgn files. We have successfully "assigned" coordinate system to those dgn files in batch by using "on the fly" + custom CRS. Now we have to save each dgn's geometry (Point, Linestring, Polygon) in WGS84. Manually we can do that. Right Click -> Save Us -> Projection: WGS84 & add suffix "Point, Lines, Areas" to each layer. But this method will take a lot of time to do that. What i would like to do is

1) Based on the File name, the layers has to be batch saved to a respective folder. I have read this and tried. How to batch "Layer save as"-process in QGIS?
But it takes the layer name (here: elementsPoints, elementsLineString) instead of the original file name (042641hd). I would like to have 042641hd_Points, 042641hd_Lines etc..

2) While doing so, how to save all the files in WGS84 ?

This code works perfectly. Reading the file name, not the layer name.

 from qgis.core import *
 import os
 pathToFile = "D:\\Dummy\\"
 trs = QgsCoordinateReferenceSystem()
 trs.createFromId(4326)
 layers = iface.legendInterface().layers()
 for layer in layers:
     dgn_pn = layer.dataProvider().dataSourceUri().split('|')[0]
     dgn_fn = os.path.basename(dgn_pn)
     dgn_fn_wo_ext = os.path.splitext(dgn_fn)[0]
     geom_name = {0: 'Points', 1: 'Lines', 2: 'Polygons'}
     geom_type = layer.geometryType()
     newName = dgn_fn_wo_ext + '_' + geom_name[geom_type]
     ret = QgsVectorFileWriter.writeAsVectorFormat(layer,pathToFile + newName,'utf-8',trs,'ESRI Shapefile')
     if ret == QgsVectorFileWriter.NoError:
       print newName + " saved to " + pathToFile + "!"


texts: Node demand Allocation in Water Distribution Network

texts:
I am completely new to this QGIS. I have been given a task to automate node demand (amount of water needed). I have a "XYZ" district data set which include:

district shp files,
village road shp files,
Highway Road shp files,
elevationpoints shp files.
I have a populations file of that district too.

Now

  node demand=(population region of area) * (Average liter of water consumed by a person in a day ).

I need to write a python code so that it can automated and save man power and time.

How should I start step by step in QGIS to achieve this goal?


texts: Handling "exact" scale close to layer's minScale/maxScale in ArcGIS js api

texts:
We deliver web apps for our customer based on common platform which in turn is developed on top of ArcGIS JS API 3. Customers publish their map layers to get whatever maps they need.

Customers have controls to enter "exact" scale to zoom map on the screen and also they have Print function where they enter wanted scale. These scales typically are "nice round numbers" like 1000, 5000, 25000, etc.

The issue they have (and thus we have) is when they publish map layers using either minScale or maxScale where minScale/maxScale are "nice", too. At these scales visibility of layers is undetermined. Sometimes they are visible and sometimes not.

The issue lays in math. When projected on fixed number pixel grid (either on screen or on paper) it's not possible to get scale "nice" due to math calculations in projection. Say if map.setScale(5000) is called then actual scale may be something like 5000.000000056016 or 4999.99999995425, it will also depend on what x-y pixel grid of the map on the screen will be. If some layer has min or max scale 5000, it's a random luck if it will be displayed or not.

To demo it, here is live app: https://codepen.io/anon/pen/wrXyKL

My questions are: How would you handle such situation? Is it issue with esri JS API or it's by design? Are there guidelines for proper setting of minScale/maxScale when publishing maps?

Update 2017-10-16. Esri support logged a bug for this case: BUG-000108793 - setScale does not zoom exactly to the given scale.

Update 2018-01-15. Status of BUG-000108793: Not in Current Product Plan.
Public Explanation: No plans for implementing this.


texts:
I'm not a cartographer, but want to use a map for my project from world atlas book.
I scanned the map, but no matter how carefully it is scanned, it's perspective is slightly distorted and it's noticeable because of longitude and latitude lines present. If I could tear the page, I can get desired result, but that's not an option.

Nice tool I use after scan is Scan Tailor which has "dewarp" function, that places grid on top of scanned image, and by defining and arranging arbitrary control points it can restore orthogonal transform of that grid. Here is image I found with Google, that can perhaps be more clear:

However I'm not satisfied with the result of this function, and can't seem to find any similar tool for the task. I expected to find Gimp plugin or standalone tool, but couldn't find it. I saw suggestion about panorama tool Hugin, but can't manage anything useful by myself.

So the question, is there any preferably free tool for Windows or Linux, that can let me define grid like in screenshot above and change it to orthogonal perspective?


texts: Script to get coordinates of selected polygons (country borders) - in QGIS

texts:
I'm new to qgis, I just need to retrieve from the selected polygons their coordinates list.

I want to use python's console with a script.
I'm using QGIS v3

This is a sample of my bare attempt to do so:


texts:
I have a layer with several polygons making up a division together. They all have attributes with population.

Is it possible to add up the population in a merge so I don't have to use a calculator every time the data is updated?


texts: Question Regarding Interpretation of Openlayers BBOX in 4326 Projection

texts:
I have a BBOX strategy in my Vector layer, which is sending HTTP GET Requests to my server in order to get the features I wish to display. The projection of the layer is EPSG:4326, so it is my understanding that the bounding box should contain the coordinates of the lower left corner and the upper right corner in longitude/latitude format.

It appears that the bounding box extends beyond the current view of the map on all sides. This makes sense as a way to allow for small lateral shifts of the map view without the need for a new data request. However, for some zoom levels I am also getting numbers outside of the range of -180 to 180 degrees for longitude and -90 to 90 degrees for latitude (e.g., -453). Am I correct in assuming that these still represent degrees, and that I should just compute their value modulo 360 or 180, etc?

I just want to make sure that I am understanding what OpenLayers is providing for the BBOX, since I have so far been unable to find it written down anywhere.


texts:
I have created a new plugin in QGIS3 with PyQt5 using Plugins Builder and when i want to add my code in module.py gives an error

the code used is

    layers = self.iface.legendInterface().layers()
    layer_list = []
    for layer in layers:
            layer_list.append(layer.name())

    self.dlg.comboBox.addItems(layer_list)

the error message is

  AttributeError: 'QgisInterface' object has no attribute
  'legendInterface'  Traceback (most recent call last):   File
  "C:/Users/REDADRISSI/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\reda\module.py",
  line 187, in run
      layers = self.iface.legendInterface().layers() AttributeError: 'QgisInterface' object has no attribute 'legendInterface'


texts: Resource title internationalization using GeoNetwork harvesting process from GeoServer metadata

texts:
We have GeoServer layers with associated metadata (ISO 19139) in three languages (es, en, fr). GeoNetwork makes the harvesting process correctly but, when we need to internationalize the title of the metadata source, we found that the title appears to be only in one language (we have not way to change between those three metadata languages). The title value is recognized from the GeoServer dataset title (not from any metadata field)

If you creates the metadata using the next option, Contribute > Add new record > Dataset > Template for Vector Data in ISO19139, we found that the option for manage the title of the metadata resource is available in multiple languages.

For the harvesting process, we have installed the next plugins to GeoServer:

csw
csw-iso
inspire
metadata

Is there any option to add internationalization of the title to the metadata source?


texts:
I am using Arcmap.
I have always defined the projection before starting a map.
I have created a map in WGS 1984  and it is complete. They now want the map in GDA94 Zone 50.
When I change the projection in the coordinate system it just seems to give me degree's minutes seconds and won't work.
Normally I would always just create a new map with the new projection and drag everything in.
I am time poor and there is a lot in this map.
Is it possible to change the projection without making a new map?
When I go into Coordinate system > and define the MGA projection there doesn't appear to be one from WGS to GDA. Just from GDA to WGS...


texts: Simple join returns too many features in Google Earth Engine

texts:
I have to filter a Featurecollection with a certain threshold. This threshold is defined in a different Featurecollection. I want to use a simple join to filter the collection. However, if I do it it returns more then I expect. What am I doing wrong?

var threshold5 = threshold4.filter(ee.Filter.lessThanOrEquals('x',0.7))
print('threshold5:',threshold5)

// next a function is needed to sum and find the minimum. The minimum is saved, toghether with the bandname
var unweighted = function(img){
  var uni = img.reduceRegions({
    reducer: ee.Reducer.sum().unweighted(),
    collection: grid,
    scale:500}).map(function(feat){
      var id = ee.String(feat.get('system:index')).cat('-').cat(ee.String(img.get('system:index')));
      var date = ee.String(img.get('system:index'));
      var bandNames = img.bandNames().map(function(name){return ee.Number.parse(name)});
      var values = ee.Feature(feat).toDictionary(img.bandNames()).values();
      var array = ee.Array.cat([values, bandNames], 1);
      var min = array.reduce(ee.Reducer.min(2), [0], 1);
      var key = ee.String(min.get([0,1]).toInt());
      var value = min.get([0,0]);
      return ee.Feature(feat.setMulti(ee.Dictionary.fromLists(['Minimum', 'value', 'id'], [key, value, id])));
    });
    return uni;
};

var C = B.map(unweighted).flatten();
var joinfilter = ee.Filter.stringContains({leftField:'id',rightField:'id'})
var join = ee.Join.simple().apply({
  primary:C,
  secondary:threshold5,
  condition: joinfilter
});
print(join)

link to full code


texts: Error while converting raster into vector in QGIS

texts:
I am using QGIS 2.18.23 and trying to convert a raster file (.tif) into a vector file (.shp). But I am getting an unusual error:

  2018-08-28T12:41:38   1   Traceback (most recent call last):
              File "D:/QGIS2~1.18/apps/qgis-ltr/./python/plugins\GdalTools\tools\widgetPluginBase.py",
  line 88, in onFinished
                self.base.onFinished(exitCode, status)
              File "D:/QGIS2~1.18/apps/qgis-ltr/./python/plugins\GdalTools\tools\dialogBase.py",
  line 208, in onFinished
                msg = unicode(self.process.readAllStandardError())          UnicodeDecodeError: 'utf8' codec can't decode byte 0xcd in position
  463: invalid continuation byte

I thought it was because the location directory of my files was in Cyrillic (Russian) but I changed that and it still showing the same error.


texts:
I am seeing that code completion in both PyScripter and PyCharm is not complete, compared to the code completion you get in the interpreter window. In PyScripter, if you add arcpy to the code completion IDE options, you will get all the options, but having this added, causes errors in the program, for some reason. Thats why I am testing with PyCharm. In PyCharm the issue is the same, in the editor window I am unable to see all the options I see in the interpreter window while typing. Anyone know why or how to fix?

Edit:

Interpreter config

Example


texts: The labelling of openstreetmap is hardly readable in QGIS. It has nothing to do with the zoom level. How can I change it to a readable layout?


texts:
I would like to reclassify a raster with the following code:

#RBR reclassification to USGS burn severity values

arr = np.array(RBR_MultiplyBy1000_Int)

level1 = (arr >= -500) & (arr <= -251) #-2 Enhanced Regrowth, high (post-fire)
level2 = (arr >= -250) & (arr <= -101) #-1 Enhanced Regrowth, low (post-fire)
level3 = (arr >= -100) & (arr <= 99) #0 Unburned
level4 = (arr >= 100) & (arr <= 269) #1 Low Severity
level5 = (arr >= 270) & (arr <= 439) #2 Moderate-low Severity
level6 = (arr >= 440) & (arr <= 659) #3 Moderate-high Severity
level7 = (arr >= 660) & (arr <= 1300) #4 High Severity

levels = [level2, level3, level4, level5, level6, level7]
reclass_values = [-1, 0, 1, 2, 3, 4]

RBR_reclassed_arr = np.where(level1,-2, arr)
for level, val in zip(levels, reclass_values):
  RBR_reclassed_arr = np.where(level, val, RBR_reclassed_arr)

But when the reclassification is finished, I get the following raster values:

It seems to me that some values are not reclassified because I have the min value of -650, normally should be -2 the min value.


texts:
I want to use maping services in my website and I am confused about the options that are provided. I try to do a comparision between features, accuracy and most important cost.

I am total newbie and I keep reading and searching but I can't find a definite answer. From what I managed to collect so far there are 4 major players providing Javascript API. Google, Bing, Yahoo and MapQuest. I believe that in order to use them for comercial use I must purchase an enterprise license. Unfortunately the cost is unknown and nowhere can be found definite numbers in dollars without contacting them.

From what I managed to find it seems that Google costs $10.000 per year while MapQuest around $2500. But I could not find anything about Bing and Yahoo.

So, roughly, how much each provider charges for enterprise usage of their maps?


texts: Attribute Table missing After Raster Calculator?

texts:
I want to remove zero value pixels from MODIS LST raster images and apply a moving window that can only substitute the missing values and leave the other original values with out alteration.  I have tried this  raster Calculator command from (Filling NoData gaps in raster using ArcGIS Desktop?)

Con(IsNull("raster"),FocalStatistics("raster",NbrRectangle(5,5,"CELL"),"MEAN"),"raster")

However the resulting raster image does not have attribute table. Since I have many raster images I want to do this work in ModelBuilder, this is just a process to check before going to ModelBuilder. Some of the rasters have many zero values(missing values) and I am not sure whether this affects the focal statistics or not.

What should I do?


texts: unknown parameter: -conf Error in osm2pgrouting

texts:
I was just going through the following tutorial HERE.

I have extracted all the files succesfully using the below commands:

cd ~/Desktop/pgrouting-workshop/
tar -xvzf data.tar.

But when i run the following command:

osm2pgrouting -file "data/sampledata.osm" \
                          -conf "/usr/share/osm2pgrouting/mapconfig.xml" \
                          -dbname pgrouting-workshop \
                          -user user \
  -host localhost \
                          -clean

I get an error as follows:

unknown parameter:  -conf

What am i doing wrong ??


texts: Is there any online viewer which displays the polygons assuming great circle lines for the edges?

texts:
My question is similar to this one: Are there any online WKT editors? The links given in answers have been very useful to me.

However, it seems that when the tools in question display maps, they assume the WKT describes a geometry and not a geography.

By this I mean that they assume the geometry is on a Cartesian coordinate system, and not a geographic coordinate system.

This causes the edges of the polygon to just connect the vertices with the shortest distance on the map, and not great circle distances on the map.

Is there any Viewer which displays the polygons assuming great circle lines for the edges, instead of assuming that edges are in Cartesian space?


texts: Understanding geohash and its associated rectangles

texts:
If I decode geohash sj8101b0858n85202hbh0j I get rectangle defined by min latitude, min longitude, max latitude, max longitude.

My understanding is that if I decode first part of any hash (e.g. sj8101 in above example), I'll always get larger rectangle than what I had got with full hash. In other words, all the rectangles got by any hash (e.g. sj8101???????) will always be inside of the large rectangle that we get by shorter length hash (e.g. sj8101). Please can someone verify if my understanding is correct.


texts:
I have to develop an article entitled as "GIS IN ASSESSMENT OF BUS TRANSIT SYSTEM ACCESSIBILITY CONSIDERING GRADES". I'm still at an early stage of development of the research project, but I have realized that there are very few methods to assess the accessibility of transit networks. The academic literature bring the distance of 400 m (5 minutes walk) as the maximum appropriate distance to be traveled by the user to walk to access the network.

However, there is no method to consider the grades of the land, reaching up to 100 m, depending on the inclination.

Based on the above, with the data, the idea would be create a kind of 400m buffer around each bus stop (but considering the slopes). Then add the uncovered areas and identify the area percentage that doesn't have service (disregarding any cutting centers and the like).

I have no ideia about how do it. Somebody can give me a light?


texts:
I have been struggling with zoom to layer functionality with event listeners. The code is working and zoom to layer whenever it is loaded but the problem is that once it is loaded, i can not zoom or pan to other areas, and if i have more than 2 layers loaded with event listeners then it become messy. How do I remove or deactivate the event listener as soon the layer is loaded...Here is the code

var HSlay06 = new OpenLayers.Layer.MapServer('<b>Human Settlement 2006</b>',

                "http://localhost/cgi-bin/mapserv?map=/var/www/html/mapfile/Human_Settlement2006.map",
                {
                    map: "/var/www/html/mapfile/Huma_Settlement2006.map"
                },
                {
                    strategies: [new OpenLayers.Strategy.BBOX()],
                    eventListeners: {
                        'loadstart': function (evt)
                        {
                                map.zoomToExtent(HSExtent);
                        }
                    }
                },
                {
                    transparent: true,
                    numZoomLevels: 22,
                    opacity: 0.5,
                    visibility: false,
                    isBaseLayer: false
                }
            );


texts: How do I draw an EllipticArc (or any other Segment) in a Dynamic Layer?

texts:
I am trying to draw an EllipticArc (or any other Segment for that matter) in my Dynamic Layer using the ArcObjects C++ API. For something that seems like it should be straightforward, I am having a very hard time figuring it out.
So far I have taken these steps:

Create the EllipticArc itself. I have confirmed that I have created one and that its geometry is correct.
Cast the EllipticArc to a PointCollection so it may be drawn by DynamicDislay.

The problem seems to be that the PointCollection I create contains 0 points, and I am not sure how to solve this problem.

Here is what I have so far:

PointCollection4Ptr  finalform(CLSID_Polyline);
IConstructEllipticArcPtr arcCon(CLSID_EllipticArc);

/*Code to construct arc omitted, it was rather lengthy.
  I have confirmed that the arc was correctly constructed
  and that the object exists*/

IEllipticArcPtr arc = arcCon;

//Cast to a PointCollection so we can draw it
IPointCollection4Ptr    pointcol = arc;

finalform->AddPointCollection(pointcol);

std::cout<<"before pointcount\n";
long pc;
finalform->get_PointCount(&pc);
std::cout<<pc<<std::endl;
std::cout<<"after pointcount\n";

pDynamicDisplay->DrawPolyline(finalform);

The code outputs that the pointcount is 0.

Am I completely missing something here? I feel like this should be straightforward, but I have had no luck drawing any Segment on my Dynamic Layer. How is this supposed to be done? Can it be done? Is there a solution for drawing Segments on non-dynamic layers that I will have to use? (I hope not...)

Any input is appreciated!


texts: Calculate distance of points along a route QGIS

texts:
I have a line layer and a point layer, I need the distance between the first and the last point measured along the line.

How can I do that using QGIS? Do I need to know linear reference? I don't have any knowledge on PostGIS.


texts: How to use GeoJSON from Geoserver in Leaflet?

texts:
Is it possible to consume the GeoJSON from Geoserver as a 'dynamic' service in a Leaflet application?

So far I have only seen how to consume a static GeoJSON file.

Being able to construct GeoJSON from what GeoServer publishes means we can publish PostGIS data to a Leaflet app without having to re-build a GeoJSON file.

The URL from GeoServer looks like this:

http://servername:8080/geoserver/dps/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=dps:Schools_Current&maxFeatures=50&outputFormat=application%2Fjson

...and the GeoJSON itself looks like this (for a single feature):

{"type":"FeatureCollection","totalFeatures":221,"features":[{"type":"Feature","id":"Schools_Current.521","geometry":{"type":"Point","coordinates":[-105.02726842,39.66184512]},"geometry_name":"geom","properties":{"school_name":"DSST: College View High School","abbreviation":"DSST:CV HS  ","elem":0,"mid":0,"high":1,"schnum":521,"classification":"Charter                  ","school_level":"High                     ","current_config":"9-10      ","final_config":"9-12      ","b_elem":0,"b_mid":0,"b_high":0,"label_x":-105.025346737628,"label_y":39.6620286090456}


texts: Several questions about using spatial data?

texts:
If you have spatial data for SQL server, can you use the spatial data (both geometry and geography) in another application for instance ESRI ArcGIS?
Is spatial data a standard that every GIS application can use it? For instance same spatial data can be used for SAGA-GIS, ESRI ArcGIS, Oracle Spatial, PostGIS without doing some convert or some edition in the data.
What system does spatial data use in SQL server? I heard that it use GPS? True? If yes, is there different version?


texts: Categorized style won't display in QGIS2.2

texts:
I'm a qgis novice trying to put together a building characteristics map. While 44 out of 46 of my layers have their data categorized and displayed correctly, two layers will not display different colours. Instead I am getting the same colour all over my map, which is the colour assigned to an extra unvalued category that appears at the bottom of my list, as shown in the screenshot.

Any ideas?

Thanks in advance


texts:
I am trying to remove custom draw controls from my OpenLayers application which I create like this:

var drawControls = {
     polygon: new OpenLayers.Control.DrawFeature(polygonLayerFreehand, OpenLayers.Handler.Polygon),
     select: selectControl,
     box: new OpenLayers.Control.DrawFeature(boxLayer,
          OpenLayers.Handler.RegularPolygon, {
            handlerOptions: {
                sides: 4,
                irregular: true
            }
        }
    )
};

and which I add to the map like this:

for(var key in drawControls) {
            _map.addControl(drawControls[key]);
            }

I now would like to know how I can remove this custom control. I found examples for removing the standard OL controls like e.g. this

var ovMapControl = _map.getControlsBy("CLASS_NAME", "OpenLayers.Control.OverviewMap")[0];
_map.removeControl(ovMapControl);

or

var ovMapControl = _map.getControlsBy('displayClass','olControlPanZoomBar')[0];
 _map.removeControl(ovMapControl);

but what is the 'displayClass' or the 'CLASS_NAME' in the case of custom controls like my 'drawControls'?


texts: Reading *.lyr file in QGIS when no access to Arc2SLD or ArcGIS for Desktop?

texts:
Does anyone know how to open .lyr files in QGIS without having access to ArcGIS or to Arc2SLD?

Perhaps there is a plugin or open source program that could do it.


texts: Network Analyst directions window options

texts:
I have created a vehicle route problem with multiple route zones with one depot in each zone. Each zone has a pickup route that delivers to the depot in the zone. Some addresses have special instructions for where to pickup the item from their property as well as a phone number.

My question is whether or not there is a way to make any special instructions or any other information like a phone number appear in the directions window to be printed out for the driver?

I'm using Network Analyst in ArcGIS 9.3.1.


texts: How do I add a column in an attribute table using QGIS graphical modeler?

texts:
I have started to make a model in QGIS 2.2 graphical modeler. I have made a buffer around a polyline and used it to clip a polygon layer. So far i t works.

But the next step is to add a new column to the clipped polygon layer, and get that column to include rownumber? I have done this outside of the model before, but I don't understand how to make it work inside the model? I tried using the algorithm 'Field calculator' but it doesn't work.

How do I use the field calculator inside a model?

EDIT: Is there any other way of adding a column with rownumbers to the attribute table inside the model? I got the tip to use the 'Advanced Python field calculator' in an answer below, but I don't understand how to use it.


texts:
I'm working with two datasets: a set of precincts and a set of census block groups. The census block groups include water; the precincts don't. I would like to trim the census block groups to get only the land area of the census block groups (for a later calculation).

To do this, I find all the precincts that intersect the census block group, and calculate their intersections. I then union all of the precinct intersections together. The end result would, ideally, be the land area of the census block group. However, this is not the case. Rather, the intersections return a GeometryCollection of assorted LineStrings, MultiLineStrings, and Polygons. Attempts to union this collection are unsuccessful (the end goal would be to union it all into a polygon). Here's a rough example:

The translucent red/pink area would be the census block group, the light purple off to the right would be the water area of the census block group, and the blue, orange, and red areas would be precincts (land only). The aim is to get the areas of the translucent figure that intersect with the blue, orange, and red polygons, and then union those areas together to get the land area of the census block group.

I'm currently using GeoTools, a Java library built on the JTS implementation the OpenGIS standard, but I can use/translate a PostGIS query. I would also be open to any suggestions on better ways to do this (I'm sure there are a few).

The actual shapefiles can be obtained from the Harvard Dataverse Database (MD precinct map), and the census website (MD statewide census block group map).


texts: GEE: extracting ERA5 daily temperature and precipitation for different points

texts:
I'm struggling at finding a way to extract daily average temperatures and total precipitations for different points (an imported table as FeatureCollection), throughout a selected period of time (few years). At the moment, I am trying 2 options:

https://code.earthengine.google.com/dce98ed8676655aa41b8ad5f820f6eae
https://code.earthengine.google.com/de3052ead7a94c8a1b498da8b45f67e1

In the first one i get what i want but I need to change the structure of the outcome, since there are as many columns as the number of days analysed. What I want to obtain is a table with columns for the date, the sector ("settore"), the avrg temperature and the total precipitation.
Which is what i get in the secondo code, more or less, except that for each day I get the same tempertature and precipitation values, probably an overwriting problem.
I also tried to use only the ReduceRegions function on the selected dataset:
   var startDate = ee.Date('2014-10-01');
   var endDate = ee.Date('2014-10-10');

   var dataset = ee.ImageCollection("ECMWF/ERA5_LAND/HOURLY")
                                   .filterDate(startDate, endDate)
                                   .select('temperature_2m');

   var reducedTemp = ee.FeatureCollection(dataset.map(function(img){
       return img.reduceRegions({
              collection: tos,
              reducer: ee.Reducer.mean(),
              scale: 30,
              crs: 'EPSG:4326'});
        }));

The problem here is that I get 24 data (per sector) for a single day and I'm not capable to reduce them to a single record per day.
Thanks in advance for your help!


texts: Assigning an NTA code to a point feature class from a polygon feature class

texts: I have a point feature class and a polygon feature class (NTA - Neighborhood Tabulation Areas).  I want to assign each record in the point feature class an NTA that it falls into.  Also, neither of these feature classes has a common field.


texts: QGIS, shifting text somewhere inside the map

texts: Could someone help me how do I shift text level somewhere inside the map area where I find some comfortable space and insert an arrow to understand what is the label for.


texts:
Good day can i ask something about geoserver 2.2.1?
I have my maps then i want to see the largest cities before the small cities but i don't have population instead i have my PLACE column its not a numbers its a text example

NAME                PLACE          ADDRESS
Ayusan Norte        Village        VIGAN
Barangay VIII       Village        VIGAN

Then i want to create a big point to see all bigest cities
How can i do that thanks..

God Bless !


texts: Changing GeoJSON feature draw order with Leaflet

texts:
I have county polygons in GeoJSON format. Obviously, some of the counties share an edge.

When a county is hovered over, the stroke and fill change to a red color.

The problem is that the stroke of some of the polygons is covered by the one next to it.

Is there a way to reorder the features so that the feature that is hovered over moves to the top?

I've seen that there's a bringToFront method, but that is for a layer, not a feature.

Any ideas?


texts: How to create Great Circle Mapper style range rings in QGIS?

texts:
I'm trying to figure out how to create a range ring from some location (e.g. Broome Airport "YBRM") in QGIS that looks like something in Great Circle Mapper. The issue is about how the range ring behaves around the poles.

I want to be able to show a base map in the QGIS drawing. I suspect it would be something from the OpenLayers plugin.

For example, if I want to draw a 4500 nautical mile range ring around YBRM, in Great Circle Mapper, it looks like this:

But when I try to get this kind of image in QGIS, even after playing around with the different projections, reprojecting the layers etc, I can't seem to get something that looks correct.

I would think that, as a test, if I create something in QGIS (e.g. 4500 nautical mile range ring around Broome (YBRM)), I should be able to import it into Google Earth and have it look like a perfect circle of 4500 nm radius around Broome.

Would someone please help me understand how I can get a Great-Circle-Mapper-style range ring nearby a pole (north pole or south pole) in QGIS?

Update:

I think the issue is about forcing the lines to continue east of the 180 degree line. At the moment, when the points get too far east (past 180 degrees), the points will jump all the way to the left / west.. looks like this:

So how do I make the dots continue right / east as it should do.

Another update:

I seem to get the correct shape when I create a circle in Google Earth using that measuring tool, saving it as a kml, importing that to QGIS, convert to points, add coordinate columns as an attribute, save as CSV, add 180*2 to all 'x' coordinates < 0, then import the CSV into QGIS as points. I can then join the dots up to make a line using the SAGA tool "Convert Points to Line(s)".

This option is not idea as I can't control how many points are generated when making the line. I need a way to create it purely using QGIS where I can control the number of points used, like the normal buffer tool.


texts: Will the OpenLayers Plugin be updated for QGIS3?

texts:
Upon searching for the OpenLayers plugin, it shows that this plugin is incompatible with version QGIS 3.0. Will this be updated? Is there another way to add Google imagery or any other aerial imagery other than through this plugin?

I noticed the OpenStreetMap layer I had been using with QGIS 2 is still working now that I am using QGIS 3, but the Google Satellite layer no longer appears.


texts: Pixel correlations from two raster datasets in R

texts:
I am having trouble calculating the pixel by pixel correlation coefficient between two datasets. My current code takes in two folders full of rasters and creates two independent raster stacks. These rasters all have the same cellsize and extent. I then try and take the correlation coefficient (spearman in my case) between the column values of those rasters.

library(raster)

r <- raster()
raster1 <- list.files(path = "data/List1", pattern = "*.tif$", full.names = T)
raster2 <- list.files(path = "data/List2", pattern = "*.tif$", full.names = T)
l1 <- stack(raster1)
l2 <- stack(raster2)

list1Values <- values(l1)
list2Values <- values(l2)
corValues <- vector(mode = 'numeric')

for (i in 1:dim(list1Values)[1]){
  corValues[i] <- cor(x = list1Values[i,], y = list2Values[i,], method = 'spearman')
}

corRaster <- setValues(r, values = corValues)

However at the correlation for loop it gives six error messages saying

In cor(x = list1Values[i, ], y = list2Values[i, ], method = "spearman") :
  the standard deviation is zero

Ignoring that and continuing on, the last line errors out saying

Error in setValues(r, values = corValues) :
  length(values) is not equal to ncell(x), or to 1

My initial guess was that since the datasets have a lot of NA values (In this case it is a lot of open ocean that there is no data for), that could cause problems, so I added the

use = "complete.obs"

parameter to the cor function. This errors saying

Error in cor(x = list1Values[i, ], y = list2Values[i, ], method = "spearman",  :
  no complete element pairs

My guess is that this last error is telling me the matrices it created don't line up, and no non-NA cells match. I have no clue how this is possible because I have been working with these rasters for years and they certainly line up. Other than that, I don't know why this isn't working.

This question is not a duplicate of Correlation/relationship between map layers in R? in any way. First I am not using point data, but instead raster. I am also interested in a simple pearson and/or spearman correlation coefficient NOT cross correlation nor spatial correlation. I'm also not using two layers, but two sets of hundreds of layers (making the statistical analysis of the correlation valid). Lastly, this code is doing fundamentally different things than that post and I am asking for specific help with the errors arising.


texts: Are points similar to nearby points using R?

texts:
I am new to spatial statistics.

I am trying to determine if points close together are more or less similar. Specifically, I have a series of lat/long points for alligators nests. At some nests, one male contributed to the nest and at other nests more than one male contributed to the nest. I am to see if singly sired nests are more likely to be found near other singly sired nests or if multiply sired nests are more likely to be found near multiply sired nests. I do not need a detailed step by step guide to solve this problem. I just need someone to point me in the direction of where I should start with R.


texts: Why can't I import my script from the python console?

texts:
i am working with the qgis python console.
I usually store all my python scripts into ~/Scripts/python
I do have set the PYTHONPATH to ~/Scripts/python in my .bashrc
However, I can not manage to import my sripts from the console inside QGIS.

Here is my error when I try to import a script called Create_Figures_2D

import Create_Figures_2D
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 309, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: No module named Create_Figures_2D

How do I set up the PYTHONPATH for pygis ?


texts: Getting value of pixel and its 8 surrounding pixels from points using QGIS

texts:
I have a point Shapefile layer and a land cover raster layer.

For each point, I want to get the value (land cover) of the pixel it falls into and also of the 8 surrounding pixel.

Is there a tool in QGIS that can do this?


texts: Adding dynamic text feedback for QGIS plugin?

texts:
I am building a plugin using Qt Designer which will initially allow users to select features for a chosen polygon layer and then when a feature is selected on the canvas, the area is printed out in some sort of display widget.

For comparison, the Coordinate Capture tool (shown on the left in the image below) allows users to select on canvas and then print the coordinates in the boxes shown.

How could I connect selecting features on canvas to displaying the area in the text browser?

I am using the following guides for reference:

Creating the UI and first logic
Building a Python Plugin

The following is what I have in code so far. If I move the code from print_area() to run(), I can print the total area in the text browser. But can't seem to connect it correctly so that whenever a layer is chosen from the combo box, the text browser get's updated.

def run(self):
    layers = self.iface.legendInterface().layers()
    layer_list = []
    for layer in layers:
        self.dockwidget.comboBox.clear()
        self.dockwidget.show()
        layer_list.append(layer.name())
        self.dockwidget.comboBox.addItems(layer_list)
        selectedLayerIndex = self.dockwidget.comboBox.currentIndex()
        selectedLayer = layers[selectedLayerIndex]

def print_area(self):
    for feat in selectedLayer.getFeatures():
        geom = feat.geometry()
        self.dockwidget.textBrowser.setText(str(geom.area()))

    selectedLayerIndex.selectionChanged.connect(run)


texts: How to clip a raster with a mask in QGIS?

texts: I am trying to clip a raster using a virtual raster as mask layer in QGIS. It doesn't create a file. Could anyone explain how I should proceed to do that?


texts: How to use two different Python versions (3.4 and 2.7) for QGIS scripting?

texts:
I´m intending to learn scripting with python in QGIS, but I have a couple of questions.

I'm using Python 3.4 for learning which is installed in my laptop, but QGIS is using Python2.7

How could I work with both together?
Creating an enter in the PYTHONPATH like C:..........python27 (wherever it is into QGIS directory) and adding  a shebang    #!.....python27   at the begining of my scripts?

Is there another way to work with both versions ?

I´m using PyQT and the same question again. One designer in python3.4 installed and another one into the QGIS directory.

How do you work?


texts: QGIS: multiple values in a single field of the attribute table

texts:
This is my first question on this site: it is probably already been exposed many times, but try to forgive me if I could not find it. Secondly, English is not my native language, I will try to be as clear as possible.

I am creating an archaeological map with a simple point shapefile. But I need to be able to enter multiple values in a single field of the attribute table. For example, an archaeological site can belong to different phases, in my case "Achaemenid" and "Sasanian". How do I do this thing, making sure that QGIS consider "Achaemenid" and "Sasanian" two different attributes even if they are in the same field?


texts: Getting all pixel values from raster image in ArcGIS Desktop?

texts:
I am using a CHIRPS raster image on ArcGIS 10.6 and there is no attribute table, I need the pixel values as it is the individual rainfall data for the stations to perform further statistics on.

How can I get all the pixel values? W

hen I use the identify icon it the pixel value does come up, however it is impractical to do this for an entire country.


texts: Changing cell size of raster in QGIS during extraction (clip)

texts:
I want to be able to tweak a raster to be exactly 1mtr cell size during export to bmp or tif. at the moment it's approx 1.19

In Global Mapper the process is clear -
I would just simply change the 'Sample spacing' to '1' on X and Y axis:

I can see QGIS reference it as Pixel Size:

I've looked at 'Align Raster' - but that seems to require resampling the current raster to a new raster layer and for some reason it seemed to mess with the output raster more than i'd like (darkened).

Is there any way to change cell size within a gdalwarp (clip) process?


texts: Identify Tool for JS API similar to the tool in ArcGIS Desktop?

texts: As documented in my earlier questions, I am having trouble connecting multiple ArcGIS Server services to identifyTasks. Therefore, I'm wondering if there is a tool/process or if its possible to create a button or tool that mimics the identify process in ArcGIS Desktop, where I can select which layer/service I want to identify and then click a point on the map to get the results?


texts: Batch process for seeding multiple BBox areas in Geoserver

texts:
I am using GeoServer v2.8 and v2.9 with integrated GeoWebcache.  I am seeding tiles over a very large area and obviously don't want to seed down to z10+ in un-populated areas or the sea as this is a waste of cache space and seeding time. What I would like to do is determine a whole set of BBox areas to seed at different zoom levels.  Determining the BBox areas is a straight-forward GIS task.  I can manually enter each one in the GWC seed form and watch it until it finishes and then enter the next one.  However, it would be more efficient if there were a utility (or can anybody describe a method) for queuing BBox areas and Z seed levels so that, when one BBox seeding process has finished, the next will start the next one automatically.

Perhaps this could be done via the REST interface but I'd need some sort of trigger back from Geoserver to say when each BBox areas is done, to know when the next task should be sent.  Any ideas?


texts: Modify the input layer when using processing algorithms from the console

texts:
Is there a way to modify the input layer, when using QGIS processing algorithms from the Python console?

import processing
layer = iface.activeLayer()
processing.runalg("qgis:multiparttosingleparts", layer, "tmp.shp")

Instead of creating a new shape layer, I want to convert the geometries of the input layer to single-parts.


texts: How to show .shp file on Mapview(ArcGIS Android SDK 2.0.0)

texts:
I'm using ArcGIS Android SDK for first time. I have worked on a sample project and am able to get a World map using this..

map = (MapView) findViewById(R.id.map);
map.addLayer(new ArcGISDynamicMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"));

But my problem is:
I have some *.shp (shapefile) files and I would like to show them on mapview.

How can i do that?


texts: Importing QGIS 3.10 python module from system Python

texts:
I have QGIS 3.10 installed on my Windows 10 system and I want to import the qgis module from my system Python installation. I used this description on the QGIS homepage to set my system up. My PYTHONPATH variable points to C:\Program Files\QGIS 3.10\apps\qgis\python.

Now when importing qgis, I get this error:

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import qgis
  File "C:\Program Files\QGIS 3.10\apps\qgis\python\qgis\__init__.py", line 70, in <module>
    from qgis.PyQt import QtCore
  File "C:\Program Files\QGIS 3.10\apps\qgis\python\qgis\PyQt\QtCore.py", line 24, in <module>
    from PyQt5.QtCore import *
ModuleNotFoundError: No module named 'PyQt5.QtCore'

When adding C:\Program Files\QGIS 3.10\apps\Python37\Lib\site-packages to PYTHONPATH, importing qgis yields this error:

  Traceback (most recent call last):   File "<pyshell#0>", line 1, in <module>
    import qgis   File "C:\Program Files\QGIS 3.10\apps\qgis\python\qgis\__init__.py", line 70, in <module>
    from qgis.PyQt import QtCore   File "C:\Program Files\QGIS 3.10\apps\qgis\python\qgis\PyQt\QtCore.py", line 24, in <module>
    from PyQt5.QtCore import * ImportError: DLL load failed while importing QtCore: %1 is not a valid Win32 application.

How do I have to set my PYTHONPATH to be able to properly work with QGIS from my system Python installation?


texts: Marking Point when multiple points exists at same location?

texts:
I am facing Issue while drawing mark on points. When I am giving a image to points, image is coming only to those points where points are not overlapping.
for example, if three POI exists at exact same location , geo-server is not able to draw to any one of it.
(Geo-server is drawing only to that POI which exists On-TOP.)
I am drawing on behalf of attribute value, and attribute value is different for all these three POIs.

I am using geoserver css module to create sld.
I am attaching SLD and CSS as well.

SLD file

CSS file


texts:
I'm pretty new with Carto. I have worked with Carto Editor one time in the past, but in Carto Builder I'm missing the "Merge -> column join" option.

I tried to create a map by using the two data sets I have (geodata from my city in Germany) and a dataset with statistics structured by zip codes. I marked both datasets and clicked on "create map". But somehow carto tells me, the dataset with the statistics has no geo reference.

What can I do?


texts: Arcpy scripts fail on big datasets - anyone has experienced similar behavior?

texts:
Here a question that is not extremely specific but maybe someone has had similar experiences...

I have a few Arcpy scripts that work perfectly when used with small datasets but that silently fail when processing big datasets.

E.g. I am using Network Analyst tools to determine, all over the Swiss road network, the accessibility of various services (hospital, mall, bakery, school...). I basically create an OD matrix containing the distance between each populated place and the closest service. Apparently nothing rocket-science.

When my script is runnung against a small subset, it performs well and spits out a result. When run against the full road network it (usually) doesn't explicitely fail but all the output tables are just empty.

I experience a similar behavior when trying to perform a kind of custom filter on a point dataset: when using a few hundreds of points, no problem but when processing the full 4 Million points, the script runs without any warning but outputs an empty table.

I am aware that the question is quite vague but it's on purpose! As I seem to experience similar problems in unrelated situations, I would assume that there is a more global issue to address before trying to work on those specific scripts...

So, has anyone experienced similar behavior?

FYI: ArcGIS 10.1, Python 2.7, Windows Server 2008, 24GB RAM, Intel Xeon 2.67Ghz (2 processors)


texts: Exporting data with different data types in Google Earth Engine. How to make data consistent to download?

texts:
I am working with Sentinel-2 data in GEE and I added NDVI and a specific SAVI as new bands to an Image.
I had an error downloading 6 bands (RGBI, and VIs) because the data type is not the same:

Error: Exported bands must have compatible data types; found inconsistent types: UInt16 and Float32.

Then I selected only the VIs (because I have already downloaded the other bands) and the error is still there but with a new data type:

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

I used the normal difference function for NDVI and a edited operation for SAVI. After that I used a operator for NDVI as well (to have 'same' result type) but the error is the same.

Do you know how to manage it to obtain the same data format to export?

Code sample:

// Parameters for Vegetation Index (NDVI-SAVI).
var nir = scene.select('B8');
var red = scene.select('B4');
var L = 0.38
var L1 = 1.38
var ndviParams = {min: -1, max: 1, palette: ['red', 'yellow', 'green']};

//Calculating VIs
var ndvi = scene.normalizedDifference(['B8', 'B4']).rename('NDVI');
var savi = nir.subtract(red).divide(nir.add(red).add(L)).multiply(L1).rename('SAVI');

//Selecting to download
var download = ee.Image(sorted.first()).addBands(savi).addBands(ndvi).select(['B4', 'B3', 'B2','B8','NDVI','SAVI']);


texts: How to create Network Dataset for Network Assistant using ArcPy?

texts:
Is it possible to create a network dataset with ArcPy to be used with the network assistant?

In the documentation I found the Build Network and Dissolve Network functions, but it looks like both require an already existing network dataset as input parameter.

In this thread people say it is not possible with Python but with .NET. In this thread, somebody says it is possible to create geometric networks with arcpy in 10.1. Is it possible to use a geometric network with the network assistant?

In the documentation  it says: Only point and line feature classes are supported as input. The feature classes cannot participate in another geometric network or other advanced geodatabase dataset such as a topology, network dataset, terrain, or fabric.


texts: How to convert a 3-band image to a color-mapped one-band 8-bit image with ArcGIS or FME?

texts: I have a 3 band image which needs to be converted to a 1 band image with colour-map so that I can assign different colours to the values. How can I first create a 1 band image out of RGB images with ArcGIS. I can´t find any settings to achieve this?


texts: Using 'Index-type' raster layers with negative values as independent variables in a multiple linear model in R

texts:
Using a multiple linear model I am trying to quantify the "effect" of abiotic landscape characteristics (slope, elevation, solar radiation, and a load of terrain indices) on vegetation greenness (NDVI) in a topographically heterogeneous landscape.

I have divided the landscape into three areas, extracted the rasters, and am using R to run three models (one per area).

Many of my x variables are indices ranging from negative to positive values, some -1 to 1, some, for example concavity/convexity ranges from -23.7262 to 24.0945.

Is it OK to use these as they are in the model?


texts: Setting Blend Width on Mosaic Dataset using ArcMap

texts:
I've made a mosaic dataset of some thermal imagery. There are three overlapping images, seen here:

As you can see, there is a discontinuity (jagged edge) between the two images on the right, and a slight offset in the southern fenceline. I want to tackle this using the Blend function in ArcMap 10 to "average out" these small differences and create a seamless mosaic.
The online help tells me there should be a Blend Width option to control the area over which the rasters are blended... However, this is all I see:

How do I do this?
I've looked in all the other tabs/online and can't find anywhere to define the blend with. I feel like I must be missing something obvious... I am using ArcMap 10.0 with an ArcInfo license on Windows 7.


texts: Modify CRS to match boundaries of shapefile

texts:
I have boundary data in WGS'84 lat/long and data in a custom generated CRS. The data in the generated CRS appears to be offset by a particular vector compared to WGS'84. I want to attempt to match the generated CRS projection boundary to the WGS'84 boundaries (seen overlayed on Landsat 7 imagery WGS'84 UTM zone 37N, 3 census datasets, yellow is WGS'84 and purple and red are both defined as the custom CRS on features)

The custom CRS is listed here:

+proj=laea +lat_0=0 +lon_0=20 +x_0=0 +y_0=0 +a=6378249.145 +b=6356514.96582849       +towgs84=-160,-6,-302,0,0,0,0 +units=m +no_defs

What datum is this?


texts: ArcGIS Online if-else in symbology expression

texts:
I'm trying to use ArcGIS online symbology expression with the if else statement.
Code I’m using is:

    var dif1=$feature.Object
    var dif2=$feature.Unit
    var dif3=$feature.Object_1
    var dif4=$feature.Unit_1
    var var1
    if ( dif1 == dif2 and dif3 == dif4){
        var1 = "test";
    }
    return var1

Is there a way to use 2 statements in 1 if line like I’m trying?

Error I get is “Parse Error:Line 9: Unexpected identifier”


texts: tile cache error : Lower left corner is outside layer bounds


texts:
I have point on map. I want found nearest object. Code works perfect. System show 1 occurence. But how get it?
point = arcpy.Point(5285360.478599999, 5310336.491400003)
ptGeometry = arcpy.PointGeometry(point)
x = arcpy.analysis.Near(ptGeometry, opori_path, None, "NO_LOCATION", "NO_ANGLE", "PLANAR", "NEAR_FID;NEAR_DIST;NEAR_FC")


texts:
I have lots of different lines composed of hundreds of segments in a Shapefile.

I would like to join them spatially where every start (or end) point of a segment correspond exactly (or within a range of X mm, but this extra) to the start (or end) point of an other segment. And only there. In other word everywhere a segment touch an other at his beginning or ending, they should be joined. (Attributes are always the same except for one column with specifics IDs I don't care about.)

The dissolve tool doesn't work; it compose a unique feature containing absolutely all lines, even those which are far away.
All the segments are entire features, so the "multi to single part" vector tool doesn't work either.
I have also tried the "Join Lines" and "Join multiples lines" plugins; they both don't do the job. Except the "Join Lines"; it is doing it correctly, but I have to select manually two segments then click to join them. It's not possible to do so manually of hundreds of them.

It would be nice if this can be done on a selection as there is several types (rivers, roads, paths, etc) of lines in this Shapefile.


texts: Rename Layers based on geometry type (line, area, point)

texts:
I have numerous in memory layers that I need to export as shapefiles.

The problem is, many of them have the same names; for example I have  "railway_station" 3 times... as a point, line, and polygon.  If I batch export these as is, I get dropped layers.

I would like to rename these layers by appending some text to identify the geometry type... so that when I export I get all layers correctly to shapefiles.

Using railway_station as example, they would become:

railway_station_a  (for polygon areas)
railway_station_l  (for lines)
railway_station_p  (for points)

Is there a way to do this programmatically?


texts: Route an HTTP request through a Python function (on the way to/from AGOL)

texts:
In an external system, I plan to invoke an HTTP GET request.
I would like the HTTP GET request to be routed through a Python function on it's way to/from AGOL.

Steps:

Invoke the HTTP GET request from the external system.
A Python function would process the HTTP GET request, and it would send a subsequent HTTP GET request to AGOL.
AGOL would receive the request and return a response to the Python function.
The Python function would process the AGOL response and send a response of its own to the external system.

Question:
Is there a mechanism in AGOL (or ArcGIS Hub) where the Python function could be stored/accessed via HTTP?


texts: How to calculate Network Service Areas in QGIS?

texts: Is there any way in QGIS to apply service area buffers e.g if I have a point on a map I wish to show the service coverage of 1 mile, 2 mile, 3 mile, breaks using  the road network?


texts: Write WKT/WKB to File Geodatabase using FGDB API

texts:
Is there a way to set the geometry of a row using either WKT or WKB with the File Geodatabase API?

Is there any other way to write spatial data to the file gdb using the fgdb api without having to go through the highly onerous task of defining the number of parts, defining the number of points per part, building point arrays and part collections all before you can finally set the geometry?


texts: HTTP WMS request working but not using WMS client?

texts:
I'm new using MapServer and I want to serve some layers using WMS.  I managed to see the layer using the browser but I've got an error using the same URL in QGIS (Error downloading http://localhost/cgi-bin...). I've also tried ArcMap and is not loading the layer either.

My URL is:

http://localhost/cgi-bin/mapserv?map=/home/paola/wmsdemo/htdocs/wms.map&SERVICE=WMS&VERSION=1.1.0&REQUEST=GetMap&LAYERS=hu3&STYLES=&SRS=EPSG:4326&BBOX=-8.9,54.12,-4.46,58.6.50&WIDTH=1177&HEIGHT=602&FORMAT=image/png&

I tested the link using this web WMS and it is also working (wmsviewer-rodis.rhcloud.com).

Do you have an idea why the URL is not working in this software?


texts: Issue with FEMA OGC Web Feature Service returning HTTP 400 error when attempting to download GML file

texts:
I'm trying to use an OGC web feature service in some software I am involved in developing. The service is described at the bottom of this page: https://hazards.fema.gov/femaportal/wps/portal/NFHLWMS

The problem I am having is that sometimes this service works and I am able to download data and other times I get an error when trying to download data.

Here is an example:

When I type the following web address into a browser, the web service returns a GML file with some valid data that can be read into any application that supports reading GML files (this example is on the above web page; I have made a slight variation to get it to work):

https://hazards.fema.gov/gis/nfhl/services/public/NFHL/MapServer/WFSServer?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=public_NFHL:Flood_Hazard_Zones&BBOX=-121.5,41,-121.375,41.125,urn:ogc:def:crs:EPSG:6.9:4269&MAXFEATURES=1000

However, when I use the following web address, I get an http 400 error:

https://hazards.fema.gov/gis/nfhl/services/public/NFHL/MapServer/WFSServer?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=public_NFHL:Flood_Hazard_Zones&BBOX=-78.5525055812731,35.7676915216378,-78.5339446948894,35.7768315700909,urn:ogc:def:crs:EPSG:6.9:4269&MAXFEATURES=1000

Everything is the same in both addresses, but the second one has different "BBOX" or bounding box coordinates. Both should have valid flood hazard zone data. Do you know why the second request returns the HTTP error code?  Is there a way to work around this problem?


texts: How can I hide some columns in a QGIS table while I am working on it so that I don't need to scroll so far to the left or right when I have a large number of attributes? Something like Excel does for spreadsheets.


texts: Figuring out format of GPS coordinates and choosing projection

texts:
I have a list of GPS coordinates (they should be near the coast of Guinea) and I am not sure what format they are in. After I figure out the format they are in, I want to better understand the process I should use to decide on what projection to use. Note: I have zero information except for the approximate location.

As is:
(1) 1000350 1259062
(2) 959409  1258527

Here is what I've tried:
Assuming they were just in decimal degrees:
(1) 10.0035 -12.59062
(2) 9.59409 -12.58527

Assuming they were in d mm ss and that all the formatting was accidentally removed and doing a conversion to decimal degrees (D + M/60 + S/3600 = DD)
(1) 10.01388889 -13.00055556
(2) 10.09694444 -13.11305556

While both options seem to be close to what I think they should be, they still don't look quite right!


texts: How can I perform spatial query using openlayers and geoserver?

texts:
I have on my geoserver 2 shp files : pipes and buildings.
I would like to put a form on my openlayers page that when user click it , he can choose distance (10m , 20m, etc...) and get a result of => all pipes in distance X from buildings.

How can I do that using geoserver (I don't wish to upload my shp files to any database because they are being updated regularly)?


texts:
Is there some specific constraint regarding vertical and geodetic datums within a compound Coordinate Reference System (CRS)? E.g. if the ellipsoid model should be the same or not, or if the vertical datum can be barometric, etc.

As also engineering CRSs can be compound with geodetic 2D CRSs, then I don't believe there are such sort of constraints.

Thanks for any comment.


texts: Estimating vegetation composition from digital images

texts:
I am running a Master's project researching Greater prairie-chicken nest and brood survival. Some of my intended covariates include local vegetation measures using digital imagery. I would like to use remote sensing/GIS software to estimate % cover of vegetation classes (i.e. forbs, grasses, dead vegetation).

I need something that can do object-based classification; however, I attend a small university and we do not have an eCognition license, nor can we afford one. I'm in the process of seeing if UW-Madison is using it. If that is the case, I may be able to piggy-back through the UW-system. If not, is there a free trial that I could do this with? Are there any open source software packages or GIS extensions that can be used for these analyses with acceptable accuracy?

Additional Info: I have digital photos (20 mega pixel resolution) of 1 sq. m. daubenmeire frames at nest sites.


texts: How to group by with sum and aggregation?

texts:
I would like to organise a table with some conditions.
I need to order by id, and to add a column that make sum of the same species, with the same id (cf.bold charachter).

Do you have any idea ?


texts: Dissolve Lines without Dissolving Convergent Lines?

texts:
I've been playing with arcHydro and related processes a bit and have run into an obstacle. I have been creating stream networks from the flow accumulation, direction, and stream order functions. When converted from raster to polygon each segment of the streams is a unique feature within the output feature class. I would like it so that if there is no change in order from one segment to the next, that it is the same feature. Easy enough, dissolve.

The issue now is that where two streams of the same order come together to form a stream of a greater order, the two smaller order streams dissolve into 'one' stream as they share a vertex (their shared outlet which is the inlet of the greater order stream subsequent). Difficult to describe without visuals but I'm hoping this was clear.

EDIT I'm attaching some visuals to help clarify.

The first image is the layer as it converts from raster; with each line segment being it's own feature.

The second image is following a dissolve. The 'conflict' areas are those circled in red, where a common vertice has caused two streams of the same order to dissolve together when in fact they only share an outlet. For my purposes, I don't want this to be the case. Hoping the visuals help clarify.


texts: MSSQL Connection settings for QGIS on Windows

texts:
OK first lets get the blond elements out of the way- I'm not asking for how I connect to my actual database.
What I'm asking for is an example or screen shot of the entries required when setting up a new connection.

Nothing I try to do to recreate either my 32 or 64 bit ODBC's is seeming to work and test connection just returns

  [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified QODBC3: Unable to connect

Something along the lines of

Given that the help files at this point are less than helpful!
And I've scoured the documentation for instructions in Lisboa, Dufour and Valmeira and the web all to no avail.
It should be so simple but I can't find anything- presumably because everyone thinks it should be so simple!

Pretty please- yes call me a muppet if you want- but this is driving me stark staring bonkers- Can any one help?

Alternatively how the &$^% do I find out more about the QODBC3 Drivers?

because it is rather irrelevant in this case as I've tried it from multiple configurations but nonetheless
QGIS Affected 2.0, 2.2
SQL server: 2008 R2
User environment: Win7 64 and 32 bit tested


texts: Standalone Python script to split a polyline with a point layer

texts: I have a polyline layer and a layer of points that are on top of the polylines. I do not have the ArcGis advanced license so I can't use the Split Line at Point tool. Can someone help me with a standalone Python script that will split my polyline by my point layer? (By the way, I know that there is a tool like this in ET Geowizards, but I don't have the license for that so I can't make that tool into a standalone script).


texts: Calculate the rotation of square polygons in QGIS

texts:
In QGIS, I have a polygon layer with square polygons in it. The polyogons are of same size but different orientation. I want to create a set of maps using the atlas feature. My aim is to rotate the map accordingly to the orientation of the polyogns.

The "item properties" offer the possibility to insert an expression for the map rotation. If I had a rotation-field in the property table of the poygons layer I'd be able to automate map rotation accordingly, I suppose.
So my question is: is it possible to calculate the rotation of quadratic polyon features relative to the N-S (or W-E) axis?

Here I found a similar question; however, not being familiar with PostGIS, I want to accomplish this in QGIS.


texts: Creating labeled points for polygon in OpenLayers?

texts:
We use Vue.js and OpenLayers 4.6.5. I need to create one new feature of polygon type from existing point features that are actually used as coordinates for that polygon. The issue is these points have to be visible as small circles (points).

The picture looks as following:

The code looks as following:

async activateDrawTurningPoints (turningPoints) {
  const source = this.vectorLayer.getSource()
  const polyCoords = []

  const orderedTurningPoints = _orderBy(turningPoints, 'ordinalNumber', 'asc')

  for (const item of orderedTurningPoints) {
    const point = new WKT().readGeometry(item.geometry, {
      dataProjection: 'EPSG:3857'
    })
    const coord = point.getCoordinates()
    polyCoords.push(coord)
  }

  const polygon = new Polygon()
  polygon.setCoordinates([polyCoords])
  const polygonFeature = new Feature({
    name: 'My Polygon',
    geometry: polygon
  })

  polygonFeature.setStyle(
    new Style({
      stroke: new Stroke({
        color: 'black',
        width: 2
      })
    })
  )

  polyCoords.forEach((x, index) => {
    const point = new Point(x)
    const pointFeature = new Feature({
      name: 'My Point',
      geometry: point
    })
    const style = new Style({
      image: new StyleCircle({
        radius: 4,
        fill: new Fill({
          color: 'black'
        }),
        stroke: new Stroke({
          color: 'black',
          width: 2
        })
      }),
      text: new Text({
        text: index === 0 ? `` : `${index}`,
        font: '12px sans-serif',
        offsetY: -20,
        stroke: new Stroke({
          color: 'black'
        }),
        fill: new Fill({
          color: 'black'
        })
      })
    })

    pointFeature.setStyle(style)

    source.addFeature(pointFeature)
  })

  source.addFeature(polygonFeature)
},

As you can see, the issue is code block that is responsible for styling points. If I comment out this block I get what I want - single polygon, but without visible points. But, as I said, I have to have these points as visible circles and they represent additional features. In that way I have one single polygon, which is fine, but I also have a bunch of point features that I don't need as features.

Is is possible to include the points in new feature that should be polygon that I already have in the end?

The updated code:

async activateDrawTurningPoints (turningPoints) {
  const source = this.vectorLayer.getSource()
  const polyCoords = []

  const orderedTurningPoints = _orderBy(turningPoints, 'ordinalNumber', 'asc')

  for (const item of orderedTurningPoints) {
    const point = new WKT().readGeometry(item.geometry, {
      dataProjection: 'EPSG:3857'
    })
    const coord = point.getCoordinates()
    polyCoords.push(coord)
  }

  const polygon = new Polygon()
  polygon.setCoordinates([polyCoords])
  const polygonFeature = new Feature({
    name: 'My Polygon',
    geometry: polygon
  })

  let styles = []
  styles = [
    new Style({
      stroke: new Stroke({
        color: 'black',
        width: 2
      })
    }),
    new Style({
      image: new StyleCircle({
        radius: 4,
        fill: new Fill({
          color: 'black'
        }),
        stroke: new Stroke({
          color: 'black',
          width: 2
        })
      }),
      text: new Text({
        // text: index === 0 ? `` : `${index}`,
        text: '1',
        font: '12px sans-serif',
        offsetY: -20,
        stroke: new Stroke({
          color: 'black'
        }),
        fill: new Fill({
          color: 'black'
        })
      }),
      geometry: function (feature) {
        // return the coordinates of the first ring of the polygon
        var coordinates = feature.getGeometry().getCoordinates()[0]
        return new MultiPoint(coordinates)
      }
    })
  ]

  polygonFeature.setStyle(styles)
  source.addFeature(polygonFeature)
}


texts: Adding WCS to ArcMap - Failed to open raster dataset

texts:
I would like to add the WCS of this dataset to ArcMap:
https://hfrnet-tds.ucsd.edu/thredds/catalog/HFR/USWC/500m/hourly/RTV/catalog.html?dataset=HFR/USWC/500m/hourly/RTV/HFRADAR_US_West_Coast_500m_Resolution_Hourly_RTV_best.ncd

I go to "Add Data"
Select GIS Servers
Select Add WCS Server
Paste the
WCS URL
(https://hfrnet-tds.ucsd.edu/thredds/wcs/HFR/USWC/500m/hourly/RTV/HFRADAR_US_West_Coast_500m_Resolution_Hourly_RTV_best.ncd?service=WCS&version=1.0.0&request=GetCapabilities)

I see three grids available (latitudinal... surface_eastward..., surface_northward..) but when I try to add them to the map I get an error: "A selected item could not be added to the map Failed to open raster dataset"

How can I add this data to ArcMap?


texts: Why does the "Dissolve" tool in QGIS create an empty layer?

texts:
I have a shapefile containing cadastral data.
I would like to dissolve the polygons using my field "OwnerName". My goal is to get one polygon per landlord's name.

When I use the "Dissolve" tool, QGIS creates an empty output layer (but with the right column titles, see the screenshot attached).

First I thought that maybe I could not dissolve some polygons using a field containing some text (my "OwnerName" field), so I created a field containing a decimal number ID for each owner name. I tried to dissolve the polygons again. Same result : an empty layer.
The reason may be the size of the attribute table. I have 65,500 polygons.

Any idea?

Thanks

(QGIS 1.8.0 Lisboa - Windows 7)


texts: Can QGIS table editor achieve similar results to Pivot tables in Excel?

texts: Is it possible to achieve similar results to Pivot Tables in QGIS table editor so as to use just QGIS instead of several software solutions? Or are there maybe some plugins capable of achieving those dynamic results?


texts: Pattern matching with grepl on SpatialPolygonsDataFrame object in R

texts:
I am trying to use grepl as part of an if control statement in R.
I want to subset a SpatialPolygonsDataFrame object in my list (i.e. googleProjectedGroundTruth or googleProjectedFallow) only if its name contains 'groundtruth'

My code is:

shapefileGroundTruth  <- rgdal::readOGR(fileGeodatabase, layer = 'Bard_Groundtruth_2018T2')
shapefileFallow  <- rgdal::readOGR(fileGeodatabase, layer = 'BardFallowing2018')
googleProjectedGroundTruth <- sp::spTransform(shapefileGroundTruth, sp::CRS('+init=epsg:4326'))
googleProjectedFallow <- sp::spTransform(shapefileFallow, sp::CRS('+init=epsg:4326'))

list <- c(googleProjectedGroundTruth, googleProjectedFallow)
for(i in list){
  if (grepl('groundtruth|Groundtruth|GroundTruth', i)){
    # Subset feature class by region of interest and always by class 1 (ground truth fields)
    i <- i[i$QUADNAME == 'BARD' & i$CLASS == 1, ]
  } else {
    print('Not subsetting SpatialPolygonsDataFrame since not ground truth data')
  }
}

The error received is:

Error in as.character.default(googleProjectionShapefile) : no method for coercing this S4 class to a vector


texts: Using count points in polygon tool in ModelBuilder?

texts:
I have two layers: one point and one polygon grid layer. Trying to count the number of points in each grid polygon and have it become an attribute in the polygon layer. Currently using ArcGIS 10 with HawthsTools>Analysis tools>Count points in polygon to accomplish this task manually, but I want to bake it into a model. I can't figure out how to add HawthsTools into ModelBuilder. Why is this? I have not yet installed Geospatial Modeling Environment, which is the new iteration of HawthsTools.

Does GME play nice with ModelBuilder?
If not, what solutions can you suggest?

The closest I've gotten is finding a python script that will count points in polygons.
http://forums.arcgis.com/threads/23838-Using-Point-in-Polygon-in-Modelbuilder.

Can I use this in a model?


texts: How do I create a polygon based on a single point?

texts:
I have been given a large spreadsheet of sample data where each point coordinate represents the end of the sampling extent. I am tasked to represent these points as a sampling extent of 100' x 8' with the point being the end. The spreadsheet has from and to directions (EW - from East to West) so that I have the direction that the polygon should be oriented.

I have over a thousand records to create polygons for so manual digitizing is not really an option for the timeline given.

Does anyone know of any tools that can create a polygon based on a point location and extent indicators?


texts: Icon / Symbol missing in vector tile map (integrated by ArcGIS API for JavaScript)

texts:
The web map was made by esri tools, since it contains two tile layers (a map tile layer overlapped by a vector tile layer) which hosting by Portal for ArcGIS 10.4, and then integrates through ArcGIS API for JavaScript 4.0.

The symbol is missing in the map, whereas the label is normally displayed, such strange circumstance only appeared in my computer; that is, others' computer shows the right contents in the same html file.

How do I fix the problem?

Abnormal status: mark icons and the symbol behind label were missing.

Normal status: mark icons and the label symbols were all appeared.


texts: Is there a professional certification available for QGIS users?

texts:
I have heard some rumors about a QGIS professional certification program.

I have found some documentation on it at https://hub.qgis.org/wiki/17/Certification but have been unable to find any other articles or web links.

Does anyone know if there is still an effort to provide training and testing for such a certification?

If so how/where would I go about to start the process?

I am in the USA, so any information about a program available either within the United States or available remotely would be especially helpful.

It has been a year and a half since the most thorough answer was submitted. I wonder if there have been any updates?


texts: Update points coordinates directly on the map using QGIS?

texts: I have many locations or points overlapped each other, so is there a way using QGIS that I can update locations directly on the map using QGIS features, please let me know as I'm new to GIS.


texts: Fixing buildings that do not appear in 3D using Mapbox gl js?

texts:
I'm trying to adopt this Display buildings in 3D example, but I found out that in my city (Minsk, Belarus) some buildings look flat like this:

The coordinates of this particular building are 27.552516, 53.897726 (lon, lat).

I checked out the attributes os this building in OSM and didn't find any special:

There is only a number of floors as data about height, but it's the same for the rest of buildings which appear volumetric.

I haven't changed the code yet so I don't leave it here because it's in the Mapbox example above. Could someone tell me how to fix that problem?


texts: Compile Qgis source : Links errors (Windows)

texts:
I am actually trying to compile the source of the qgis git : https://github.com/qgis/Quantum-GIS
In order to compile it, I follow the steps of the tutorial here : http://www.qgis.org/api/INSTALL.html (starting on the step 4 "Buildings on Window")
I manage to configure the CMake with all the dependencies and to generate the project. To generate the project I use MSCV10 but I also tried with MSCV express 2008 like in the tutorial.
In the two cases, when I generate the project, I always have the following errors :

LINK : fatal error LNK1181: impossible to open the file '....\core\Release\qgis_core.lib'
LINK : fatal error LNK1181: impossible to open the file '....\analysis\Release\qgis_analysis.lib'

I don't understand why the project tries to open a librairie which is not created yet to compile its code. Do you have an idea how to solve this problem ?
EDIT : Apparently, the qgis_core.lib and others must be created during the build (this is why there are theses errors). But the lib is not created because of the errors :

.\flex_qgsrastercalclexer.cpp(43) : fatal error C1083: imposible to open the hearder file: 'unistd.h' : No such file or directory

Do you know how to add this header to the project ? I am not very used to MSCV
Thank you very much
Regards


texts:
I'm trying to create double-sided buffers along road segments by making a buffer and then cutting the buffer with the road segment with ST_Split()

Almost there, but for some reason not all polygons get cut:

(The red lines are the original road network.)

All of the ones that don't work seem to have those little 'artifacts' from the buffer (lower corner of the polygon), where the buffer intersects itself.

My queries:

CREATE TABLE vaxholm AS
SELECT vl.gid, vl.rlid, ak.kommunnamn, ak.lansnamn, vl.geom
FROM vagnet AS vl, ak_riks AS ak
WHERE ST_within(vl.geom, ak.geom) AND ak.kommunnamn = 'Vaxholm';

CREATE TABLE buffer AS
SELECT gid, rlid, kommunnamn, lansnamn, ST_buffer(geom, 15, 'endcap=flat join=mitre quad_segs=2') AS geom
FROM vaxholm;

CREATE TABLE split AS
SELECT  vl.gid as gid,
    vl.rlid as rlid,
    vl.kommunnamn as kommunnamn,
    vl.lansnamn as lansnamn,
    ST_split(buffer.geom, ST_linemerge(vl.geom)) as geom_collection
FROM vaxholm as vl, buffer
WHERE vl.gid = buffer.gid;

SELECT (ST_dump(geom_collection)).geom as geom, gid, rlid
FROM split;

My system:

OS: Windows 10
PostgreSQL: 9.6.2
PostGIS: 2.3.2


texts: How to get the distance between a point and a line in openlayers 3?

texts:
I've been working lately with openlayers 3 and trying to get a fully offline Mapping app, I am trying to get the smallest distance between a point and a line.

I looked for a solution in the api and found nothing about it, so my question is : is there any function in openlayers 3 that returns the smallest distance between a point and a line or do I have to code it myself ?


texts: Geospatial Projects Management System/Software for multiple concurrent Projects

texts:
I'm looking for a System/Software for managing multiple (20+) Academic Researches and Projects.

Due to a large number of active projects lately, which many of consist of the same geographical location, we are in need of a System/Software that has mainly the following features:

Important Feature: Attribute of projects geographical location (e.g. Search for projects in a specific location)
Common Features: Deadline / Done - To Do / Project Personnel Information
Being able to gather each project files in one location and accessible from everywhere (Cloud? Add-on for cloud?).
Being able to set priorities for projects.
Bonus: After setting the system up, needs as little maintenance as possible.

Any suggestions for such a software/system would be great. Ideas and advises are welcomed.


texts: Creating the Leaflet map offline(load the leaflet tiles without internet)

texts:
I have created the Leaflet map which works in online. But now my requirement is to create the Leaflet open street map in offline.
How do I load the Leaflet map offline?


texts: QGIS: basemap only in overview not in mapatlas

texts: I have a map Atlas and a small overview map. In the project I have a basemap and I want that the basemap is only visible in the overview map but not in the individual maps of the Atlas. Is that possible and how would I do that?


texts: Cropping basemap to specific area using ArcGIS Desktop?

texts:
I have a base map from ONS of the entire UK and on another layer I have a boundary outline for the smaller area which I want to crop the base map to.

How do I delete everything outside of this small area because the ONS base map has many features?


texts: Resampling point cloud data using ArcGIS Desktop?

texts:
I am working on point cloud data, but do not know how to re-sample the point cloud by equally spacing them vertically and horizontally. If possible in this direction can anyone via ArcGIS DEsktop highlight steps would be of great help.

The figure posted has point data arranged at close spacing on right to the spacing on left; how can you space them equally in the same length of the rectangle space?


texts: Creating dynamic attribute table column measuring distance from center of extent to points in layer?

texts:
We are developing a property look up tool for environmental hazards/chemical spills. In layout view we have a circular data extent with a graphic of a target house in the center and some proportional circles at increments of .125, .25, .5 and 1 miles from the center of the fixed extent. My environmental hazards/chemical spills are a point layer with 4 different categories, each respectively with requirements to query around the target house at 1/8, 1/4, 1/2, and 1 mile distances to see which, if any, of these points falls within its designated distance from the target house.

When exporting data from this layer that is within the view extent... is it possible to have a dynamic attribute table column that would change for each different target house address to tell me how far away the points are from this target house? i.e. whether they fall within those .125, .25, .5 and 1 miles for each category? In short is there a way to query distances (and even directions) from an address and have that data dynamically generated inside an attribute table column that could then be exported?


texts: Creating path between many points in Google Earth

texts: Is there any specific way to convert approximately 25000 points in Google Earth Pro to paths or draw paths between points automatically? Since I want to obtain their altitude data, I need it to be a path (elevation profile). I drew a grid point in another software and converted it to a KML file, but I need it to be path.


texts: Spatial Join Layer Derived from Zonal Raster on Original Polygon

texts:
I'm trying to do a 1:1 spatial join between polygons created from the zonal max of a slope raster on the original zonal features. The problem is that the jagged edges cause the target features to overlap neighboring polygons as well so it just uses the first join feature in the 1:1 join.

So basically, in this picture, I want to use a spatial join to add the grid code 300 from the blue layer to the polygon (red outline) on the right and 100 to the polygon on the left. The overlap from the jagged lines are causing it to assign whichever value is first instead of whichever one has the greatest overlap.


texts: Large dataset clip (in visualization) API Javascript ArcGIS

texts:
I'm working on a project in which I need to integrates features from our ArcGIS server and display them in a mobile application. Using the ArcGIS API for Javascript I'm having issues to understand if what I want is possible, I'm pretty new to Javascript so maybe I didn't find the solution by reading the guidance provided for developers (https://developers.arcgis.com/javascript/latest/guide/quick-start/)
Basically, I have these elements to display in a map:

A small point or polygon feature (and this is not an issue)
a MultiPolygon feature that actually is quite big and I have some issues in visualization since it's very slow.

I wonder if there is a way to 'clip' the MultiPolygon feature according to the extent of the 1st element.
I read about:

Spatial query and query by attributes: https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html
Query a feature layer: https://developers.arcgis.com/javascript/latest/guide/query-a-feature-layer/
Filter feature layer: https://developers.arcgis.com/javascript/latest/guide/filter-a-feature-layer/

But I think no one of these it's good for my case since the large MultiPolygon features don't contain (and I can't add) an attribute useful to filter the data properly.
I 'just' need a kind of clip by extent but only in the user visualization (according to the extent of the 1st features), is there a way to do it? Someone can point me to the right thing to use or a workaround?
P.s. I need to it on the server side, and not on client-side.


texts: Calculate the mean of files generated from gdal.Translate

texts:
I created several velocity maps from .nc files through gdal.Translate. Each .nc file is organized in several bands, I am only interested in 1: velocities. gdal.Translate allows me to select only the velocities and cut them to my area of interest.
I would like to calculate the velocities' mean on a specific time-period, and for that I intended to open on Python my cut files (.vrt). However, when I open them in Python they are all "NoneType", while when I open them in QGIS I can see the velocities.
To calculate the means, my idea was to use:
myarray = np.array(ds.ReadAsArray())

Where ds is my cut velocity map. Then in a loop, I stack the myarray in a 3D matrix, and calculate the mean over the time axis.
Do you know if there is a better way to do it? Also, why do I have only NoneType files? I am new to gdal, and I am surprised QGIS can recognize my cut velocities maps while Python sees only a NoneType. I could calculate the mean through Raster Calculator in QGIS, but I want to automatize this task.
Ps: this is how I open my .nc file, cut and select the velocities only:
ds = gdal.Open("NETCDF:{0}:{1}".format(netcdf_name, layer_name))
gdal.Translate('output/' + Name + '.vrt', ds, projWin = [-3353315, 380000, -3257001, 260460])