texts: What does 'DBMS table not found' message mean?

texts:
I have a plain postgressql table (version 8.2). I am trying to connect to it to it from ArcGIS desktop 10.0, and use as a query layer, as given in this document: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Connecting_to_a_database/00s500000037000000/

I can see the tables, but I get the error message  'DBMS table not found'

What exactly is the issue? How do I connect to it?


texts: Use arcmap layout for profiles or Vertical ortho-images (walls) instead of horizontal

texts:
I have designed an Arcmap layout and use it within an arcpy script to generate lots of pages of a pdf report, one page per polygon I have drawn (changing title, scalebar, polygon being highlighted in an inset).

Now, I would like to use the same layout and all its elements, but not with zenital orthophotographies from my arcmap project, but for profiles or vertical ortho-images (for example, for a building I might have elevation or profile of the south, north, ... walls). Although they are not zenithal, these vertical profiles have georeferencing information, which stores the pixel width and height projected on the globe, which can be used to generate the scalebars for example.

I've had no luck trying to find the way to do it in arcmap - which is by design intended to horizontal ortho-projections. If you have any hint, please advise. The pictometry tool gets close to that, using oblique imagery, but not parallel projections.


texts: How to upload shapefile as input to geoprocessing service using javascript api

texts:
I need to pass a shapefile as input to my geoprocessing service so as to perform extra process with the features included in it?
 The geoprocessing service will be called from the clients web page using the javascript api. I am using arcgis 10.2.2
Is that feasible ?  If yes are there any examples ?


texts: SyntaxError from Python Label Expression in ArcMap?

texts:
I am trying to use a find label expression that changes the font of one field, [NUMBERNAME]. I am using the Python parser of ArcGIS 10.3.1 for Desktop.

All fields have a data type of text. This is what I have...

def FindLabel ([NUMBERNAME]):
    lineone = "A:"+ [NUMBER]
    absName = "<CLR red='255'><FNT size = '14'>" + [NUMBERNAME] + "</FNT></CLR>"
    if [NUMBERNAME] != None:
        return lineone + '\n' + absName + '\n' + "BLK:" + [BLOCK] + '\n' + "SEC:"+ [SURNUM]

I am getting an error. Any thoughts as to what is wrong?

Error:

  The expression contains an error. Modify the expression and try
  again. Error 0 on line 0. SyntaxError: invalid syntax(string, line
  2).


texts:
I would like to know how to get the elements from the list, maybe using for loop?... here are the code that can save all the angles into myList[]

myList = []

for num in range(1,totalStop+1):
    in_features = "C:/Users/Desktop/fyp/fyp.gdb/sampleline"
    out_feature_class = "C:/Users/Desktop/fyp/output.gdb/samplelineTemp"
    where = '"OBJECTID" = ' + "%d" %num

    # Execute Select
    arcpy.Select_analysis(in_features, out_feature_class, where)

    for row in arcpy.da.SearchCursor(out_feature_class, ["OID@", "SHAPE@","streetnam", "angle"]):
            # Print the current line ID
            print "Walk along",row[2]

            #Set start point
            startpt = row[1].firstPoint

            #Set Start coordinates
            startx = startpt.X
            starty = startpt.Y

            #Set end point
            endpt = row[1].lastPoint

            #Set End coordinates
            endx = endpt.X
            endy = endpt.Y

            #print startx, starty, endx, endy

            value = row[3]

            #append all the angles of line into myList
            if value not in myList:
                myList.append(value)

after append(value), now myList contain all angles(azimuth) of the lines.

mylist[]=
                -91.3478982503
                -3.51652064715
                -124.295923979
                31.1849858238
                43.8914254459
                -59.4335738611
                111.914929118
                69.5778228682

The thing I would like to calculate is the first angle(myList[0]) minus the second angle (mylist[1]), return the value. Then the second angle(myList[1]) minus the third angle (mylist[2]), return the value.

May anyone kindly tell me how to perform the above steps? Loads of thanks!


texts: ArcGIS Server REST-Query Layer: only few attribute fields are returned in response

texts:
A newbie question in using ArcGIS Server REST service:

From the ArcGIS Services Directory, I opened the page of one layer in a MapServer service, this layer has a long list of attributes/fields. However, in the response of Query_Layer operation, it only includes two attribute fields in each feature object.

I am wondering is this a configurable setting? If so, where to control this to return all attribute fields?

Let me if further details of this question are needed.


texts: How can I publish a standard ArcGIS basemap on local server?

texts:
Is there a way to publish/install a standard basemap (topo, streets, etc.) to a local ArcGIS server?

I have an app using the javascript API, that is running in an environment that cannot connect to arcgisonline or internet in general so standard basemaps aren't loaded.


texts: Use ESRI Web Adaptor to restrict Rest Services breadcrumbs

texts:
Am I able to restrict users from following the breadcrumb path on my rest services back to the source and seeing every rest service offered on my server?

We are using the Web Adaptor on a 10.1 ESRI server.


texts: Is it possible to view Mapillary sequences in parallel with Google Street View?

texts:
Mapillary (link) provide streetview-like photos of many areas in the world.

The same is about Google Street View.

I'd like to show a parallel view on the same area about both images ... something like GeoFabrick Map Compare (rif http://tools.geofabrik.de/mc/#15/49.0094/8.3902&num=4&mt0=mapnik&mt1=google-map&mt2=here-map&mt3=mapnik-german), to compare OpenStreetMap and others maps (Google Maps too ... ), but on images that when I move on the map could show what happen on Mapillary images and Google Street View images in parallel.

To clear my goal I'd like to have / build something like this ..

https://developers.google.com/maps/documentation/javascript/examples/streetview-simple

but also with mapillary Images

Are there some tools or code samples in PHP / Javascript / Leaflet / OpenLayers?


texts: How to get bounding box from coordinates (latitude, longitude), zoom level and size (screen)?

texts:
Is it possible to get bounding box from coordinates (latitude, longitude), zoom level and size (screen)? I found only calculating bounding box from tile. I need it, because OpenStreetMap accept only bbox in export mode.

I don't have any experience with this, so I will be glad for any advice.


texts: How to create multiple layers from a single csv file in QGIS?

texts:
I have one csv file that holds coordinate point data for different vehicles (below is an image of the csv).  I want each vehicle to have its own layer when I upload the data as a delimited text file. How can I do this without uploading the data for each vehicle as a separate file?
Here is how I would want the data to look.


texts: How to select all values by default in arcgis tool's multivalue parameter using python?

texts:
I am using ArcGIS 10.2 and have three parameters, Feature class, field and  a multivalue parameter respectively in ArcGIS tool. I populate multivalue parameter with unique values of  feature class on selection of feature class and field. Here is the code snippet:

def updateParameters(self):

    if self.params[0].value and self.params[1].value:
        fc = str(self.params[0].value)
        col = str(self.params[1].value)
        self.params[2].filter.list = sorted(
                                         set(
                                             row[0] for row in arcpy.da.SearchCursor(fc, [col]) if row[0]
                                            )
                                           )

By default, none of the value is checked in the tool.

How can I check all values of multivalue parameter through ToolValidation class using python 2.7?


texts:
Using ArcMap 10.2 I am getting the ERROR: 000714 for this script. Therefore I am having trouble debugging it.

The purpose of my script is to spatially join points to lines in ArcGIS. And is simply a test script that will become part of a larger scripted tool. The script I am currently working off is as per below which is largely a copy/paste from ArcGIS Spatial Join Help, which I have modified for my .shp files and a count field.

# Spatial Join Script
# Initiating top of catchment junction connections to pipes.
# Process: Spatially join points to lines with count field.

# Import system modules
import os
import arcpy

# Set workspace environment
arcpy.env.workspace = "c:/.../Python/SpatialJoinTest"
arcpy.env.overwriteOutput = True

# Script arguments

PointInput = arcpy.GetParameterAsText (0)
LineInput = arcpy.GetParameterAsText (1)

#Set Variables
Outputs = "C:/.../Python/SpatialJoinTest/Outputs"
LW = Outputs + "/" + "LineWorking.shp"
PW = Outputs + "/" + "JunctionWorking.shp"

O_PL = Outputs + "/" + "PointLine_JoinCount.shp"

# Creating Working Shapefiles
arcpy.CopyFeatures_management (LineInput, LW)
arcpy.CopyFeatures_management (PointInput, PW)

# Want to join Points to Lines and 'count' the number of joins for each pipe to junction
''' I note that in this section in the help file .gdb were referenced rather than .shp
    Thus: I think it is these lines where I am going wrong(?)'''
targetFeatures = os.path.join(PW)
joinFeatures = os.path.join(LW)

# Output will be the target features, (Points) with the 'count' of Lines joined.
outfc = os.path.join(O_PL)

# Create a new fieldmappings and add the two input feature classes.
fieldmappings = arcpy.FieldMappings()
fieldmappings.addTable(targetFeatures)
fieldmappings.addTable(joinFeatures)

# First get the 'L_ID' fieldmap. 'L_ID' is a field in the 'LW' feature class.
# The output will have the 'ID' with the 'count' of connecting lines. Setting the
# field's merge rule to 'count' will count the connections for all of the points for
# each line intersecting. The field is also renamed to be more appropriate
# for the output.
L_IDFieldIndex = fieldmappings.findFieldMapIndex("L_ID")
fieldmap = fieldmappings.getFieldMap(L_IDFieldIndex)

# Get the output field's properties as a field object
field = fieldmap.outputField

# Rename the field and pass the updated field object back into the field map
field.name = "L_COUNT"
field.aliasName = "L_COUNT"
fieldmap.outputField = field

# Set the merge rule to mean and then replace the old fieldmap in the mappings object
# with the updated one
fieldmap.mergeRule = "Count"
fieldmappings.replaceFieldMap(L_IDFieldIndex, fieldmap)

#Run the Spatial Join tool, using the defaults for the join operation and join type
arcpy.SpatialJoin_analysis(targetFeatures, joinFeatures, outfc, "JOIN_ONE_TO_MANY", "KEEP_COMMON", fieldmappings, "INTERSECT")

How can I make the above work?

My guess is it is to do with os.path.join() commands, however my experience is limited.

The error message is below:

  Running script SpatialJoinScript... ERROR 000714: Error in script
  SpatialJoinScript. Error in executing: cmd.exe /C
  D:...\Python\SpatialJoinScript.py  "D:\Michael Austin -
  Working\GIS\Python\20180323\Inputs\Point.shp"
  "D:...\Python\20180323\Inputs\Line.shp"

  Failed to execute (SpatialJoinScript). Failed at Mon Apr 09 11:57:52
  2018 (Elapsed Time: 0.06 seconds)


texts: Is it possible to Clip in ArcGIS Explorer?

texts:
Is it possible to clip in ArcGIS Desktop Explorer?

Or does anyone know of any Analysis Servers I can connect to to get it?


texts:
I vectorised an image and all my polygons have extremely jagged edges.
What is the best way to smooth these polygons?


texts: How to read points value hovering mouse pointer on the points in QGIS?

texts: I am new to QGIS and learning daily, and I find it very interesting day by day. I have come up with a problem here.  I stacked points on a sentinel2 image.  The points data I imported from a CSV file; the CSV file contains latitude, longitude and their corresponding values. I can see points scattered over the image. Finally, I want to read those points' value hovering the mouse cursor over the points. I can see values while opening the attribute table, but I couldn't figure out how to read those points' value using the mouse cursor. Is there a way to do it?


texts: CartoDB- Passing selected features bounds to map center parameter (Zoom to selected features)

texts:
Looking to build a light-weight viewer for some data we have hosted on CartoDB.  I'm looking to have a user input their address into an input, pass a query to CartoDB and have the map zoom/pan to the user entered address.  Looking at the API docs I've got to say I'm at a loss on how to pass the lat/lon to the map center parameter.  Code below.

I'm able to get the lat/lon of the point with the return of bounds[0], but from there I cannot figure out how to pass that into the main function to update the center zoom of the map.

I'm a JS novice so if you take the time to help me, please be detailed if you can.  Thanks,

    <input type="text" id="houseNumber" value="10907">
    <input type="text" id="streetName" value="GUILFORD RD">
    <input type="button" value="Go!" id="go">


texts: How to track ajax WMS requests in OpenLayers interface?

texts:
I'd like to track WMS requests on my openlayers web interface.
How is it possible to log on my server or in Google Analytics every WMS requests (GetMap and GetFeatureInfo would be enough)?
Then I'd like to make statistics based on query string in WMS requests.
This way I'll know what layers get the most interest from my users.


texts: Autoincrementing one character in calculate field of ArcGIS Pro?

texts:
I am using ArcGIS Pro.

I have this set of points where I like an unique id (uid). The only thing they need to be unique is a counter of some sort at the end.

I have another field with some id that should be infront (number), so my expression would be something like:

"!number!"+ INCREMENT + "h"

Is this doable?


texts:
I've got some problems with the following code, found on this answer to Auto-updating symbology between *.mxds for same shapefile using arcgisscripting?:

import arcpy.mapping as mmap

mxd = mmap.MapDocument("C:/Users/enclume/Carto/Cartes/UpdateTest/P_5_1.mxd")
DF = mmap.ListDataFrames(mxd, "Couches")[0]
sourcely = mmap.Layer("C:/Users/enclume/Carto/Cartes/Templates/Couches.lyr")
ly = mmap.ListLayers(mxd)[1]
mmap.UpdateLayer(DF, ly, sourcely, False)
The folder path containing my mxd's is: "C:/Users/enclume/Carto/Cartes/UpdateTest"

It looks fine when I run it, no error message, but nothing changes in the mxd. What am I doing wrong? As you see it, what is the expected outcome of this code segment?

If I ever find a solution, I would like to loop it. As I understands it, looping would repeat the updateLayer script to every mxd's in the specified file. But if it contains some subfolders, will the looping function find all mxd's in the folder and subfolder?

On the previously linked post, the person who wrote the comment said it would be possible to loop it using glob.glob. Can't find anything one this.

I also saw Improving performance of looping over MXDs using ArcPy? which is about looping mxd's, but I can't seem to find a way to fuse those 2 scripts.

I'm new to using arcpy.

Can anyone help me with this 2-fold problem?


texts: How to convert a point vector layer to raster

texts:
I am trying to use QGIS to calculate a proximity map around a set of points. it appears that point can't somehow be converted to raster (well they are converted but the points are not visible after being rasterized).

These points have extent from 29-33 lat, 79-89 long. And I am using WGS 72/ UTM 45N for projection.

points = vector layer

using raster->conversion -> vector to raster (doesn't seem to work, nothing inside the rasterized layer is visible)

edited:


texts: highlight feature from feature id in qgis

texts:
i am making a qgis plugin and want to highlight a feature from feature id but the feature id must be taken from the textbox my code is below but this shows error like cLayer.setSelectedFeatures(me)
            TypeError: expected string or buffer

    inputid = self.dlg.lineEdit.text()
    cLayer = self.iface.mapCanvas().currentLayer()
    query = '"ID" = {''}'.format(inputid)
    selection = cLayer.getFeatures(QgsFeatureRequest().setFilterExpression(query))
    me = [k.id() for k in selection]
    cLayer.setSelectedFeatures(me)


texts: Arcgis -> python -> ctypes -> c++ dll tool cancels itself, why?

texts:
Since optimizing my python-ctypes-dll based geoprocessing tool, it seems to cancel itself a lot.  Followed by arcmap reporting a pure virtual function call (which is odd, because you'd think any such bug would show up in ArcSOCP, right..?)

I'm currently working on the presumption that I've done something stupid in my DLL and have some good old C++ undefined behaviour going on.  But if anyone has other suggestions as to why tools can cancel their own execution at runtime, I'm all ears.

I'm using the intel compiler, multithreading with openmp and the stlport standard library, for what it's worth.


texts:
I'm found out that event.stopPropagation() on Chrome and IE doesn't work.
In FireFox it's ok.

It is relevant with popup. When I have a few WFS layers I need prevent popup from lower layers as below pictures:

stopPropagation() in upper popup doesn't work so I have unnecessary popup from lower layer.
sample code popup:

function elem_id(id) {  return document.getElementById(id); }

//popup Open
var ol_popup = elem_id('ol_popup');
ol_popup.onmousemove = function(evn) {
   //evn.stopImmediatePropagation();
   //evn.preventDefault();
   evn.stopPropagation();
  // tooltip.innerHTML = "";
   };

Code which some time ago (2 - 3 months) worked now doesn't work...

Ps. Both: stopImmediatePropagation() and evn.preventDefault() don't help.

OL3 v 3.20.1
Chrome v 55.0.2883.87 m (64-bit)
IE v 11.0.38


texts: Using advanced editing tools say invalid geometry in QGIS

texts: It says "The Geometry is invalid, please repair before trying to split it". How would I address this issue quickly? I can't cut the certain portion of the poygon whenever I use advanced editing tool such as split feature.


texts: How to get UK postcodes for coordinates?

texts:
I m quite new with the GIS science and would like a bit of help. I m a weather forecaster and doing my MSc degree.

I have a list generated with WRF and contains in a txt format the long and lats and solar radiation values. I would like to export this data into a list which will contain the postcodes assigned to the long and lats for England. Could anyone help me on this?

Thanks.


texts: Error when using viewshed analyis plugin with merged shapefile

texts:
I am using Qgis 2.12Lyon and try to run a viewshed analysis to show the intervisibility between several points in more than one shapefile.

I have a digital elevation model (.tif) which is projected in EPSG:32632, WGS 84 /UTM Zone 32N.
The elevation model in combination with one of the point-shapefiles works in a viewshed analysis.

I need to analyse the view from points which are given in five different point-shapefiles. So I merged the five shapefiles with the datamanagement-tool and tried to run the viewshed plugin with the same DEM as before in combination with the new, merged shapefile.

This is the error occurring:

UnicodeEncodeError: 'ascii' codec can't encode character u'/xfc'in Position 1: ordinal not in range (128)

Traceback (most recent call last):
File"C:Users/.qgis2/python/plugins/ViewshedAnalysis/viewshedanalysis.py" , line 93 , in load_cmbObsField def load_cmbObsField(self,cmb_index) : self.reload_dependent_combos (cmb_index, 'cmbObsField')
File"C:Users/.qgis2/python/plugins/ViewshedAnalysis/viewshedanalysis.py", line 121, in reload_dependent_combos cmb_obj.addItem(str(fld.name()), str(fld.name())) #for QGIS 2.0 we need column names not index (j)

UnicodeEncodeError: 'ascii' codec can't encode character u'/xfc'in Position 1: ordinal not in range (128)

Python-Version: 2.7.5 (Default, May 15 2013, 22:44:16)[MSC v. 1500 64 bit (AMD64)]

Both inputfiles are encoded in UTF-8 and have the same coordinatesystem /projection (see above).
The same problem occurs using Qgis 2.8Wien.
There are no non-ascii characters included in the pathnames. I also tried to save the merged file in different places.

I wonder what happens with the data when merging shapefiles so that the plugin doesn't work anymore. Is there any way to solve the problem?


texts: How to split Relationship Class privileges between different users while maintaining referential integrity?

texts:
I am using a relationship class to maintain a one-to-many relationship between material sites (under Engineering's purview) and the material sites' sample status and content (under Materials' purview). I have privileged the tables such that Engineering personnel (user A) can edit the origin table and Materials personnel (user B) can edit the destination table. This works well, until user B needs to create a new record in the related table.

In order to create a new record in the related table, user B must have editing privileges to the origin table. This is the only way to access the Attributes dialog from the Editor toolbar, which appears to be the only method which programmatically ensures the GlobalID and ParentGUID fields match. Otherwise, you have to rely on the user to copy/paste.

Is there a workaround here? A way to split relationship class privileges between two different users while still maintaining referential integrity?

I use ArcGIS Desktop 10 (ArcInfo) SP3 with ArcSDE 10.


texts: What arguments does MapBasic's ColumnInfo() take?

texts:
MapBasic's tableInfo() function has a KnowledgeBase docs page here listing the arguments and all the attributes it takes, and a usage example in the reference document.

columnInfo() has neither of these (that I can find). I can't find any docs for it anywhere, other than a passing mention in the reference docs confirming that it exists:

  The functions TableInfo( ), ColumnInfo( ) and NumTables( ) let you
  determine information...

  ColumnInfo( ) returns information about a column in a table, such as
  the column’s name, the  column’s data type, and whether the column is
  indexed.

That's it. What arguments does it take (e.g. is it columnInfo( nTabNum, nColNum, Attr )? Or maybe columnInfo( objColumn, Attr )?) and what are the attribute names (e.g. are they named COLUMN_NAME, COLUMN_INFO_NAME, TAB_INFO_COL_NAME... etc?)


texts: Draw a polygon with specified edge length in QGIS Madeira

texts: I am looking for a possibiliy to draw a polygon with specified edge length in QGIS Madeira. I already checked further Threads belonging to this question, but all answers refer to PlugIns which are not correspondig with the current GIS Version.


texts:
I´m doing a script to convert csv to shp, but I want to format one of the columns.
It´s a string then I´d like to format like this

a[8:10]+' / '+a[11:16]+'  UTC'  being a the value in the column.

this is the code working

#Set up blank lists for data
nombre,codigo,y,x,time=[],[],[],[],[]

#read data from csv file and store in lists
with open('C:/archivecsvToRead.csv', 'r') as csvfile:
    r = csv.reader(csvfile, delimiter=',')
    for i,row in enumerate(r):
        if i > 0: #skip header
           nombre.append(row[0])
           codigo.append(row[1])
           y.append(float(row[2]))
           x.append(float(row[3]))
           time.append(row[4])

#Set up shapefile writer and create empty fields
w = shp.Writer(shp.POINT)
w.autoBalance = 1 #ensures gemoetry and attributes match
w.field('Longitud','F',10,8)
w.field('Latitud','F',10,8)
w.field('Date','D')
w.field('Date / Time','C',50)
w.field('ID','N')

#loop through the data and write the shapefile
for j,k in enumerate(x):
    w.point(k,y[j]) #write the geometry
    w.record(k,y[j],codigo[j], time[j], nombre[j]) #write the attributes

#Save shapefile
w.save(out_file)

How can I format the column time in order to show   a[8:10]+' / '+a[11:16]+'  UTC' being 'a' the value in the column ?


texts: Key difference between NAVIC Indian Regional Navigation Satellite System (IRNSS) and American Global Positioning System (GPS)?

texts:
What's the key difference between NAVIC The Indian Regional Navigation Satellite System (IRNSS) and American GPS system?

Radio Frequency
Accuracy guaranteed
Modulation
Area Covered
Engineering Parameters

Till now i find a article with following points:

NAVIC Indian Regional Navigation Satellite System or IRNSS
significantly more accurate than the American GPS system.
Unlike American GPS, Isro is recommending a small additional hardware
in handheld devices that can receive S-Band signals from IRNSS
satellites and inclusion of a code in the phone software to receive
L-Band signals.
Both these L and S-band signals received from seven satellite
constellation of the IRNSS are being calculated by a special embedded
software which reduces the errors caused by atmospheric disturbances
significantly. This, in turn, gives a superior quality location
accuracy than the American GPS system
It will consist of seven satellites working in tandem to provide
highly accurate coverage over the Indian subcontinent, up to 1,500 km
from Indian borders, a region making up the primary service area. Source

Some additional links are https://www.quora.com/What-is-NAVIC and https://www.quora.com/How-useful-is-Indias-GPS-NAVIC-as-compared-to-the-American-GPS


texts: What is the command to export table as CSV in spatialite

texts:
I need to do two steps on command line in Spatialite:
 1. remove duplicate rows from a table and then
 2. export table as CSV

Both of these are available in the GUI, but how do I do that on the command line?


texts: It is possible to edit selected features with Python?

texts: I'm trying to edit some fields of the selected features in ArcMap. It's possible to do this with Python (ArcPy)?


texts: Display a gee featureCollection on a leaflet map

texts:
I'm using the python GEE api and ipyleaflet in a Jupyter Notebook and I'd like to retrieve an asset (FeatureCollection) and display it as an overlay on my map.
The retrieving work just fine
asset_descripsion = 'Glad_' + country_selection + '_boundaries'
folder = ee.data.getAssetRoots()[0]['id'] + '/'

asset = ee.FeaturCollection(folder+asset_descripsion)

I also have a ipyleaflet map
m = Map(center=center, zoom=zoom)
dark_matter_layer = basemap_to_tiles(basemaps.CartoDB.DarkMatter)
m.add_layer(dark_matter_layer)

but I don't know how to add a layer based on a ee.FeatureCollection


texts: Join Attributes by Location giving NULL values in Python Standalone Application

texts:
I’ve been working on a standalone Python application using the QGIS Processing Framework.  For my application, I am supposed to determine average values of a field from a polygonal vector layer along lines in another vector layer.

To accomplish this, I have been using the “qgis:joinattributesbylocation” algorithm with general.runalg() as follows:

newLayerp = general.runalg("qgis:joinattributesbylocation", line_layer, polygon_region, u'intersects', 2, 1, "mean,max", 1, None)
newLayer = processing.getObject(newLayerp['OUTPUT'])

When I visualize this layer in QGIS, some lines have been assigned NULL values.  I am not having this issue when using Vector->Data Management Tools->Join Attributes by Location.

How can I get the same results from the standalone application as I seem to be getting from the QGIS GUI?

EDIT

I have tried performing an intersection operation between the line layer and the polygon layer, and then performing the same join attributes by location with the intersection layer and the line layer.  I don't get any NULL values anymore, but I'm getting strange values (it is saying the average field value along the length of the line is in the thousands, when all values are less than ten).

Background Information:

The polygonal vector layer’s field consists of values between 0 and 9.  The following is the vector layer, colour-coded according to the field I’m using:

The following are the arguments I’m using for the Join Attributes by Location tool in the QGIS GUI:

The following is the result that I get from running the algorithm through the tool in the QGIS GUI, colour-coded by the value of the field I’m using.  This is the result that I want to replicate.

I get the following vector layer from my Python code.  The lines with NULL values are marked in black, and these are what I’m hoping to resolve.


texts:
I added some geojson layers on my map but they are ordred in the menu randomly.

for example I like Zones to be above Bus line how to control this.
here my example


texts: Attribute table update after v.split on GRASS GIS

texts:
So I just used v.split to create shorter segments (with just 2 vertices) of my contour lines. I was left with about 22000 lines but, when I open the attributes table, I find no more than 45 entry lines.

How can I make it so I have a unique ID for each of my new line segments?


texts: argis 9.3 to arcgis 10.2 arcobjects connection AutomationException: 0x5 - Access is denied. in 'Invoke'

texts:
A legacy code, written in 9.3, made connections to the server via the following code

public String connect(String domain, String user, String password) {
    new ServerInitializer().initializeServer(domain,  user, password);
    ServerConnection connection;
    try {
        connection = new ServerConnection();
        connection.connect(url);
        return "ok";
    } catch (IOException e) {
        return e.getMessage();
    }
}

This works fine with a 9.3 server, however, when i try to connect to a 10.2, all i get is:

AutomationException: 0x5 - Access is denied. in 'Invoke'

Have they changed the way to connect in 10.2, or am i missing something?


texts:
I'm trying to make a user controlled cross-layer animation in Leaflet.
I have about 70 tileLayer.wms layers, that need to be preloaded on the map before animation can run.

The question is - is there a way to preload tiles before showing them? Ideally, I would like to have something like a progress bar, or a spinning clock icon, while this process takes place.


texts: Using PyQGIS to transform layer of polygons into layer of holes inside bbox?

texts:
I'm using python in QGIS.
I have a layer of polygons (its a result of some earlier dissolving and has no overlapping polygons but some holes and islands in holes etc). I want to build a new layer which contains one polygon representing a bbox of the first layer with each polygon cut from it.

Essentially I want to "invert" the layer I have so that where the was polygon, now there is not, and where there was not polygon now there is. All inside a bounding box of the original layer.

I can build a bbox easily and I tried to "subtract" the polygon layer from my new bbox polygon layer but the process slows to a stop and then crashes my PC. Here's the algorythm

processing.runalg("qgis.difference","path/to/polygon.shp","path/to/bbox.shp","path/to/result.shp")

I dont care about attributes (obviously). I just need to cut one set of polygons from one larger polygon.

It seems so simple, I wish I could find a simple command or script to acheive this.
As stated at the top I'm looking for a solution in python in QGIS.


texts: Artefacts when visualizing Landsat image

texts:
When visualizing a single Landsat image I get artefacts:

Map.addLayer(ee.Image('LANDSAT/LE07/C01/T1_SR/LE07_112017_20000401'))

When creating a global product (e.g. binary mask of clear observations) those artefacts sum up to two stripes:


texts: How to keep bound popups from opening on [click]?

texts:
I am working on a map application which creates and binds popups on markers and polyline objects.

The popups are created and bound lazily, i.e. ad-hoc when a user clicks on a specific object. The reason for this is simply the performance, as we use handlebar templates to create quite extensive popups and doing this for hundreds of markers/polylines takes its toll on loading times...

What I am actually trying to do is to open all popups (on markers, lines, ...) on [right click]. I have proper right-click event listener, and if a user right-clicks on an object for the first time, the popup is created and bound to said object and then opened.

But from then on, i.e. when a popup is already bound on a marker/line even a simple left-click will open the bound popup. This is somwhat confusing for users (as they can then suddenly use left-click OR right-click to show popups, but only on certain, i.e. already right-clicked-on elements...). Furthermore this interferes with a selection mechanism I implemented to allow users to select markers by left-clicking on them.

Does anyone know how to disable opening bound popups on clicks?


texts: How to write an Advanced Query which gets the same results as the simple query option

texts:
Working with my data set on Late Woodland Village reanalysis in QGIS, the previous question was somewhat answered by defining the issue as a many to one. As a work-around, I summarized the info into comma separated values within cells. For instance, temper would be SC, LS, H, SF as possible combinations. Likewise I have created a template of decorative attributes numbered from 1-77.

When I do a simple query for SC, it gives me all 15. But in Advanced Query, I get different answers.

In Dec Attributes, if I set the sample as 3, it gives me all of the strings with 3 in them, rather than just 3.

The first question is how do I select one string set out of all the others and the second question is how I select SC from Temper and 35 from Dec Attributes at the same time?

Thanks in advance.


texts: New Issue with OpenLayers Plugin Google Satellite - low res?

texts:
Recently I've noticed this issue with the OpenLayers plugin Google satellite layer where the imagery is dark and of a lower-resolution than it used to be.

I frequently use this imagery with information layers on top for presentation purposes - and recently noticed that the City of Toronto (Canada) is looking far worse than it did a short while ago.  Does anyone know why this may be?

I've included a screen shot to better highlight my concern (notice that outside of the City the quality is how it used to be).

I am using QGIS Wien 2.8.2.


texts: Unexpected font family displayed using custom SLD from a published WMS using geoserver

texts:
When publishing a WMS in geoserver using a custom SLD file, I'm seeing the WMS preview correctly on my local geoserver. However, doing everything the same on a remote hosted geoserver, my seeing an incorrect font family displayed.

Local geoserver version (open geo suite community edition) = Version 2.1-SNAPSHOT, Subversion Revision -1, Build Date 24-May-2012 21:47, GeoTools Version 2.7-SNAPSHOT (rev -1)

Remote geoserver version =
Version: 2.1.4
Subversion Revision: 17150
Build Date: 01-Jun-2012 17:02
GeoTools Version: 2.7.5 (rev 38793)

What I’ve done:

I’ve downloaded and used an SLD file to style some points with some labels. I got the SLD from the Geoserver SLD cookbook here, modified the sld (code below) to read my shape file field ‘myname’ in the this shape file
I’ve added the sld in both the local and remote geoserver instances using the browse to file, upload, validate and submit options in the styles menu.
I’ve created a new workspace, datastore and published a WMS layer via both my local and  remote Geoserver.  I’ve selected the correct sld when publishing the layers.
The Problem = the remote Geoserver layer preview is not displaying the font family (arial) that is specified in my SLD file.  See screeshots below of the previews from the local (correct font) and remote (incorrect font) geoservers respectively:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>Point with styled label</Name>
<UserStyle>
<Title>GeoServer SLD Cook Book: Point with styled label</Title>
<FeatureTypeStyle>
<Rule>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
</Fill>
</Mark>
<Size>6</Size>
</Graphic>
</PointSymbolizer>
<TextSymbolizer>
<Label>
<ogc:PropertyName>myname</ogc:PropertyName>
</Label>
<Font>
<CssParameter name="font-family">Arial</CssParameter>
<CssParameter name="font-size">12</CssParameter>
<CssParameter name="font-style">normal</CssParameter>
<CssParameter name="font-weight">bold</CssParameter>
</Font>
<LabelPlacement>
<PointPlacement>
<AnchorPoint>
<AnchorPointX>0.5</AnchorPointX>
<AnchorPointY>0.0</AnchorPointY>
</AnchorPoint>
<Displacement>
<DisplacementX>0</DisplacementX>
<DisplacementY>5</DisplacementY>
</Displacement>
</PointPlacement>
</LabelPlacement>
<Fill>
<CssParameter name="fill">#000000</CssParameter>
</Fill>
</TextSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>


texts: How can I create a simple basemap in QGIS that will allow me to trace a polygon with an accurate projection?

texts:
I need to find an aerial photograph, create a new vector layer, trace several fields in this aerial photograph, and find random coordinates within these polygons.  I first tried this with the Google plugin.  This, unfortunately, uses the Mercator projection, which I think threw everything off.

What is the easiest way to do it?


texts: Creating custom Leaflet map from series of images?

texts:
I am using leaflet to display a simplified pipeline network that our users can mark up with leaflet draw.  I have achieved this by using the crs.simple example on the leafletjs website.

This is fine and works for the small 1900x1080px image that I've currently been provided but we're discussing much larger networks and also different degrees of detail based on the current zoom so my understanding is that I may need to convert this into tiles.

I have seen this example using tileLayer which seems to achieve half of what is required but I don't know what tools are required to build the Tiles.  Also the zoomed out view contains the same level of detail as the zoomed in view so I am wondering if its possible to achieve LOD using this technique such that when zooming it it seamlessly transitions into a higher detailed pipeline network view.


texts:
I want to split a polygon by a intersecting line into different parts, exactly like in this  post(Split a polygon layer with a line layer?).

I have a vector grid to cut the polygons, so I used the intersect tool(vector grid with polygons) first, to get the lines from the vector grid intersecting the polygons I want to cut.

Afterwards I followed the procedure like in the post mentioned above (union and then polygonize), but it does not provide a feasible solution, because some layers are cut as I want it and others are not.

Does anyone has any workaround about it? I read here  (Making polygon from intersecting lines in QGIS using Polygonize or similar? ) that there have been some problems with polygonize, maybe this is the reason?

FYI: I am running Windows 8, 64 bit, QGIS Desktop 2.4, and installed it by the downloaded file.

Thanks for your answers!


texts: I created a simple model that includes a near geoprocessing tool with a point feature layer as an input and a line feature layer as a near feature and it works perfectly in desktop. Now I would like to publish it to my server as a geoprocessing service to be able to consume it using javascript API and use feature layers as parameters. I know that the geoprocessing services in this case only accepts featuresets rather than feature layers as inputs but in my case I need to use the feature layers that are published in my server. How can I modify my model to successfully publish the service? and how should I set my inputs?


texts:
I would like to rasterize data on protected areas for certain countries (e.g. https://www.protectedplanet.net/country/TH, download button is at the bottom of the page). The dataset contains two shapefiles, one with a multipolygon geometry and the other one with a multipoint geometry. I would like to rasterize both. While rasterizing the multipolygon geometry is straightforward, the standard functions (raster::rasterize and fasterize::fasterize) don't work with multipoint features.

How can I either rasterize the multipoint feature collection directly or convert it to something that can be rasterized with the standard functions?


texts: What's the difference in using OpenLayers and Mapbox?

texts: Hey guys I found this tilemill to develop WebGIS application using MapBox. I wanted to know how is it better than OpenLayers and if I have to develop which would be a better options to go for, as I will be developing a complete GIS Architecture.


texts: Earth Engine: Function to generate daily image collection from 3 hourly

texts:
I am working with GLDAS-2.1 image collection. I would like to generate a daily image collection with max temperature, min temperature, mean temperature and sum temperature for each day from 3 hourly temperature data. Please, see below developed script. I need a help on improving it as when I run it gives an error:

.

// Start and End Dates
var inidate = ee.Date.fromYMD(2010,1,1)
var enddate = ee.Date.fromYMD(2020,1,1)

// Difference between start and end in days
var difdate = enddate.difference(inidate, 'day')

// Import GLDAS data
var gldas_col = ee.ImageCollection('NASA/GLDAS/V021/NOAH/G025/T3H')
.filterDate(inidate, enddate)
.select('Tair_f_inst');

// Time lapse
var lapse = ee.List.sequence(0, difdate.subtract(1))
var inidate = ee.Date('2010-01-01')
var listdates = lapse.map(function(day){
  return inidate.advance(day, 'day')
})

// Function over a image collection
var new_coll = ee.ImageCollection(listdates.map(function(day){
  day = ee.Date(day);

  var max_collection = gldas_col.filterDate(day, day.advance(1, 'day')).max().clip(aoi)
  return max_collection.rename('max_Temp').set(day.format('YYYY-MM-dd'))

  var min_collection = gldas_col.filterDate(day, day.advance(1, 'day')).min().clip(aoi)
  return min_collection.rename('min_Temp').set(day.format('YYYY-MM-dd'))

  var mean_collection = gldas_col.filterDate(day, day.advance(1, 'day')).mean().clip(aoi)
  return mean_collection.rename('mean_Temp').set(day.format('YYYY-MM-dd'))

  var sum_collection = gldas_col.filterDate(day, day.advance(1, 'day')).mean().clip(aoi)
  return sum_collection.rename('sum_Temp').set(day.format('YYYY-MM-dd'))

}));

print(new_coll.filterDate('2010-01-01', '2010-02-01'));


texts:
Why is my flow length tool giving value less than one? Isn't a flow length tool supposed to give the maximum length of upstream flow to the cell? Then, how come?

I am using coordinate system of GCS WGS 1984. Is this happening because my coordinate system is in degrees? How can I rectify this problem?


texts: GIS and natural disasters - examples of geo-visualizations and geospatial analysis

texts:
I stumbled upon NY Times' web map of deaths from tornadoes in US.

Can you point me to some more interesting examples of geo-visualization and/or geospatial analysis of natural disasters and their consequences?


texts: Sending Trimble GeoXH GPS data to an Android Tablet using Bluetooth

texts:
Has anyone ever successfully connected a Trimble GeoXH to an android device and consumed the GPS data? I have tried both Bluetooth GPS and Bluetooth GPS Mouse apps with no such luck. They both connect to the Trimble but do not consume GPS data. I have enabled mock locations on the Samsung.

I am using Trimble Terrasync software on the handheld to see GPS status. There were a few other posts on here but none using a GeoXH.

Specs:
Tablet = Samsung Galaxy Pro
GPS Device = Trimble GeoXH Geoexplorer 6000 series handheld


texts: Is there a point symbol for ArcMap that looks like the Google Maps Marker Symbol?

texts:
Is there a symbol available through ArcMap (I'm using 10.3.1) that looks somewhat like the Google Maps marker symbol? We have a webmap that was created using Google Maps Engine and apparently we have a need to do this differently now (cough cough). We will be using ArcGIS Server and the ArcGIS javascript API. We thought it would be best if the map changed as little as possible, so I'm looking for one that looks like the old familiar ...

I know that it is possible to create your own symbols using a graphic but the ones I have attempted look pretty horrible. Using some version of the one I just pasted here could potentially work but I wondered if there was one the looks closer than "Circle 3" from the list below (the green circle with a black dot). I could make it red but it doesn't have that "tied to the map" look that the Google Marker symbol has (not to mention it's instant recognition value).

I looked through the symbols available to me and didn't find anything better. Even something remotely close would be fine with me.

ArcMap Symbol Selector:


texts: Create multiple shapefiles from one table

texts:
I've imported a table into ArcGIS which I'd like to split into multiple shapefiles. The splits would occur between groups of records separated by any of 3 columns. In other words, col1, col2, and col3 together create a unique identifier. I'm thinking it would require the following elements but I can't quite put it together:

Use ModelBuilder
Use SQL Statement to sort table records by 3 column identifier
Iterate through table records and write each group to new shapefile (possibly using 'Select by Attributes')
Create each shapefile name based upon combined col1, col2, col3 names

What I've tried already:

Used 'Split by Attribute' tool by Fox Tools to split table. Works great on smaller tables, not so well on this one with 4000+ records and multiple attribute fields to examine for splitting.

Any thoughts?


texts: Geodatabse Compression does not make changes in Base Tables

texts:
This question has been asked here GDB Compression Not Updating Base Tables, but the solution provided is not what I am looking for.
I have registered a feature class and made some edits in that version, the version is default. I want to sync these changes in base table without unregistering it. I know that compression does not transfer changes if edits are not referenced by all the versions therefore I don't have have any other version than default.
How can I transfer these changes to base map without  unregistering it? Why doesn't compression makes any chages?


texts: SpatiaLite missing on DB Manager tree panel

texts:
I am working with QGIS. I have created a new database in SpatiaLite and need to add some shape files and other files to it.

My problem is : I don't see SpatiaLite in DB Manager?

I only have PostGIS and Virtual Layers.


texts: Does Geopackage field length affect performance?

texts:
I have moved away from shapefiles, and now store most of my desktop spatial data in a Geopackage. One of my fields is used to store research notes and is 'Type TEXT' with a character limit of 254.

I would very much like to increase this limit so that I can write more detailed notes and know how to do this within the DB Manager in QGIS.

I have no idea if it will but I assume that a large body of text for each attribute (approximately 12,000) would hinder performance significantly. What I would like to know is, should I be cautious of how high I set the threshold in terms of performance of the layer?


texts: How can I get repeated vector grid in horizontal direction?

texts:
I need to get repeated vector grid layer in horizontally direction. I created many polygon vector grid layers, and their extents as listed bellow (Xmin-Ymin, Xmax-Ymax):

Layer 1:
5910000 3040000
6010000 2940000

Layer 2:
6020000 3040000
6120000 2940000

Layer 3:
6130000 3040000
6230000 2940000

Layer 4:
5910000 2930000
6010000 2830000

Layer 5:
6020000 2930000
6120000 2830000

Layer 6:
6130000 2930000
6230000 2830000

The extents difference horizontally and vertically was 100000 as appeared, and the parameter was 10000, and the result was exactly what I needed after I let the system to label my grid automatically by ID, starting from ID: 0 to ID: 120 for each layer.

The problem is that, if I needed to cover more area on the map, then I will be in need for a large number of layers to be set manually, and this will be a frustration!

So, Is there any way to tell the software to create a repeated layers horizontally, from the   left to the right, and once it reach the end of the map, it needs to go vertically one step by a certain amount of extents difference?

Note: all of my layers are same in their parameters and extents differences, only the extents must be repeated in a constant shift, which it 100000 here.

This pic. might be enough to clarify my request:

EDIT

I did like what Andre instructed, and the result was like this:

Now, I have some inquiries:

why the labeling is going from bottom to top not from top to bottom?
Why the labeling didn't start from the very left of the layer (blue rectangle)? and it also didn't start from the very top of the layer!
Why labeling didn't start from 1 to 100 instead of 11 to 110?


texts: ArcGIS linefeed character for Identify window using SQL View

texts:
I've searched everywhere but have been unable to find the solution. Using a view from SQL I have a semicolon separated field that when I info each feature I want to have a line break in the results window for each semicolon basically. I have seen it done before but am unable to find the character that I can feed through the view that Arc's identify tool respects.

SQL - SSMS 17.8.1
ARC - 10.5


texts: I am trying to develop rainfall erosivity map over a study area using 30yrs period rainfall data. i have determined the rainfall erosivity R for each year, how do i use this to prepare a map showing the rainfall erosivity for the entire study area. Data was collected from a single location which and the elevation. How do i put these together and extrapolate rain fall erosivity over a 15000ha area


texts:
I am wondering what is the best approach to use for text layers in GeoServer. AFAIK, there is no text layer in GeoServer. But in many occassions we need to use text layers and not simply label for other (point/line) layer. What I am using is as follows:
WMS Point layer
Style:

   <PointSymbolizer>
     <Graphic>
       <Mark>
         <WellKnownName>circle</WellKnownName>
         <Fill>
           <CssParameter name="fill">#B28080</CssParameter>
         </Fill>
       </Mark>
       <Size>0.000001</Size>
     </Graphic>
   </PointSymbolizer>
   <TextSymbolizer>
     <Label>
       <ogc:PropertyName>textstring</ogc:PropertyName>
     </Label>
     <Fill>
       <CssParameter name="fill">#000000</CssParameter>
     </Fill>
   </TextSymbolizer>

But I am feeling there must be some other more smart options available in GeoServer. I must be missing some trick. Any help?


texts:
For a paper at university i am trying to create a catalogue for cartographic capacity of different GIS programs, especially open source like QGIS and so on
The aim of this is to eventually have a catalogue that says: if you want to produce a (just one example) street map, do not take program A because it is not possible to change lines into representations and thus the overlying of lines can not be manually permitted.

**What are criteria for cartographic capabilities?

Or maybe it is easier to say: by which criteria can i define how good an openGIS program is for producing maps?**

So far i have tried to think about a few criteria and came to these:

what kind and amount of different labels can be created
can classes be created that are assigned to different labels
symbols available
production of a map sheet
what can be done with the legend

I hope these are reasonable but please tell me anyway. So far i have only worked with ArcGIS and thus only know about some of its capabilities.

I want to find criteria that validate the capabilities of openGIS to produce maps.

What do you think are such criteria?

What options are required in a GIS program to produce efficient and clearly represented maps?

This is as Barret correctly mentioned NOT about knowledge of a certain user, but solely about the capabilities of the program!

The above criteria are only a small part of that, so to make clear what i mean.


texts:
I wanted to create an animation video in QGIS. I had tried the Time Manager and MMQGIS plugins. But I was not possible.
The animation should goes like this:
Suppose I have 4 points location points saved in a vector file and having some other attributes values of that point.
Then I want the animation to start from 1st point and hovering there for 5 seconds and displaying the attribute value of that point next it should move to 2nd point slowly and while doing so I should make a tail line and when it comes to point B it should stop there and then wait for 5 sec and so on till the final point.
So the whole process can be broken into 7 parts:
1st part:  showing attribute values of point A for 5 sec
2nd part: moving from point A to point B and leaving tail line as it moves
3rd part: showing attribute values of point B for 5 sec
4th part: moving from point B to point C and leaving tail line as it moves
5th part: showing attribute values of point C for 5 sec
6th part: moving from point C to point D and leaving tail line as it moves
7th part: showing attribute values of point D for 5 sec


texts:
I want to be able to mark on a map areas in a ski resort that are a risk to avalanche. It is classified as such. "The slope between the contour lines are between 20 and 45 Degrees, The slope is facing towards the west."

How do i go about doing a calculation like this in QGIS? What is the tool that is to be used?

I presume I generate the slope by going to Raster -> Terrain Analyst -> slope and generate the slope of the map from my dem file(don't know if that the correct name, but that is the file I have).
After this I am left with a black and white image. The white showing areas of higher slopes.
How do I cut this to only show the slopes between 20 and 45 and how to i check to see if its west facing.


texts:
Does anybody know how to select 3-hourly time steps in a dataset on Google Earth Engine?

Here is what I have tried

    // A function to compute CF_solar for every time step at which irradiation and temperature are available (3-hourly)
var CF_solar2 = function(image) {
  return image.expression(
    '(1-beta*(c1 + c2*T + c3*G - T_ref) + gamma*log10(G+1))*G/G_ref',
    {
      'beta': 0.0045,
      'c1': -3.75,
      'c2': 1.14,
      'c3': 0.0175,
      'T_ref': 25,
      'gamma': 0.1,
      'G_ref': 1000,
      'T': image.select('Tair_f_inst').subtract(273.15),
      'G': image.select('SWdown_f_tavg'),
    }).rename("CF2").set('system:time_start', image.get('system:time_start'));
}


texts:
I came across the Natural Earth site www.naturalearthdata.com from an answer on this stack - I've found it a great resource for shape data - probably the best available.

But looking around the site I've become a little concerned that the project is dying:

no releases since 2012
single blog post since 2012
can't register for forums
"contact us" / "pitch in" email address bounces
subscribing for updates doesn't send any confirmation email
email address listed for updates also bounces

Am I over-reacting?


texts:
I have a polygon of an area of 46,465m² and a perimeter of 136,1m.

It is a rectangular polygon and I want to split it into three equal parts (which are my treatment blocks).

Could anybody give me some ideas on how to proceed, please?

I am trying to run the code, however, it gives me some error when I introduce my target area, which it is 15.487m² (the total area of my polygon is 46,465m²).
Why is that?

Slicing, No of part:  1

Slicing, Granularity remaining:  30

Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\code.py", line 90, in runcode
    exec(code, self.locals)

  File "<input>", line 1, in <module>

  File "<string>", line 6, in <module>

  File "<string>", line 45, in splitSelected

  File "<string>", line 86, in alternatingSlice

  File "<string>", line 136, in cutPoly

  File "<string>", line 204, in signedDistCentroidFromLine

NameError: name 'math' is not defined


texts:
I am wanting to make an "open layer" menu option, where users just need to provide an URL. I pretend to figure out which service is provided from that URL, to properly construct that layer in OL.
After looking deep into OL API, I couldn't find any clue.

Is there any specific method to check it?

There are Tile, Image, Vector and VectorTile layers, each of them with their own specific sources. I am... trying to implement something like the OL drag and drop interaction for local files, that iterates all "available" formats forcing to read features until one works.


texts: How do I consider entity alignment against slope direction?

texts:
I am a newbie to QGIS and don't know if the following is possible so would be grateful of any thoughts.

I have a hill, most of which is given over to rectangular pasture fields. I hypothesize that the longwards alignment of the majority of the fields is parallel to the slope but would like to prove this. I already have a DEM from which I have generated slope, hillshade and contours over which I can overlay colour mapping. Any ideas how I can use QGIS to prove my hypothesis?


texts: i'm looking to change the cursor of ol3 during drawing from blue circle to crosshair, i've tried this answer, but it changes only OS cursor not ol3 cursor, is there any idea ?


texts: How to fill of water the river between two lines?

texts:
I want to fill the river with water, I try from line to polygons but doesn't work and it was the result:

How can I do that?


texts: Coded Geodatabase Domain Values behaving oddly with special characters in the description field

texts:
I am setting up Geodatabase Domains for my Fire Hydrant layer.
The Domain restricts the "Type" of Fire Hydrant to a designated list of Brand Names.
I'm running into an issue where some of my coded values behave differently than others.

As seen above, on the left is the "Select By Attribute" window, on the right is the Geodatabase Domain.

Coded Domain Values for "Mueller" display in the Attribute Table only as the description 'Mueller'. This is how I expect them to behave.

However, the Coded Domain Values that have a description containing special characters display as something different.

You'll notice that I have two query options for the brand "M&H".

Are the special characters in the description messing things up, or should I just scrap the "HydrantType" domain and rebuild it?


texts: Connecting to ArcGIS Server with IIS 7.5 (ArcObjects/COM)

texts:
This code works fine on a development box, but fails in a server environment:

GISServerConnection gisServerConnection = new GISServerConnection();
gisServerConnection.Connect("localhost");

The exception is this:

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at ESRI.ArcGIS.Server.IGISServerConnection.Connect(String machineName)

My best guess is that I need to add a user to the agsusers group. Our server (Server 2008 R2) uses IIS 7.5, so I tried adding the application pool identity ASP.NET v4.0 Classic to the group. This failed, so I tried adding IUSR to the group, which also failed.

What could I be doing wrong?


texts: ez_setp.py: how to download the package to install for future install from disk?

texts:
I'm using ez_setup.py to install pysal for QGis, by using the command:

easy_install pysal

(I followed the following post: http://anitagraser.com/2014/07/13/installing-pysal-for-osgeo4w/)

I have to do those installs in countries where Internet may not be available.
So I would like to use ez_setup.py to get the package and save it on a drive, and once at destination, run ez_setup.py to install the package from the file.
How can I do that?


texts: I wish to find sites within a distance of a route, using django GEOS filters, by converting a route to a polygon to test model instances within

texts:
Python  2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0 20160609]

Django  (1, 7, 11, 'final', 0)

Postgres    [u'PostgreSQL 9.5.5 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609, 64-bit']

Postgis [u'POSTGIS="2.2.2 r14797', u'GEOS="3.5.0-CAPI-1.9.0 r4084', u'PROJ="Rel. 4.9.1, 04 March 2015', u'GDAL="GDAL 2.1.1, released 2016/07/07', u'LIBXML="2.9.3', u'TOPOLOGY RASTER']

We have a mapping application that uses a crude mechanism to locate sites within a certain distance (20 kilometres) of a google derived route expressed at Lat and Longs.

I have a database of sites that I wish to display if they are within 20 kilometres of the route.

The previous mechanism took 1 in 20 way-points from the list and searched a sphere from that point adding any included sites into a set of points.
This is inefficient but dates back some three years and ran surprisingly well.

Upon upgrading to Postgres 9.5 the performance has taken a considerable hit and the mechanism is no longer practical.

I would like to generate a polygon or closed loop around the route, the nature of the end caps are unimportant, and then perform a contains or covers (when we get to Django 1.10) to extract the sites.

Is this a practical approach and if so how does one best perform the route to polygon transformation?

I am keen to not have to optimize in SQL as the application performs all it's operation using django filters.


texts: QGIS 3.4, Saved project does not load layers

texts: With QGIS 3.4 I have created a map with OSM data and installed different styles. I saved and closed the project. A few days later, I wanted to continue working on the project. It is shown to me under "recent projects" too. Now I want to open it, but the project does not load anything. No layers, just a white screen. There is also no query "Defend defective layers". Does anyone have an idea how to get the project up and running again?


texts: Writing Field Calculator codeblock using Python parser of ArcGIS Pro

texts:
The following code isn't working as expected and I'm not sure why:

  UpOrDown = reclass(!UpOrDown!)
  def reclass (Z,GP):
   if (GP == "DT" and Z == "CG"):
    UpOrDown = 1
   if (GP == "DT" and Z == "CN"):
    UpOrDown = 1
   if (GP == ...and so on.... )

The expression is passing as valid but the wrning (warning 002858) suggests that there is a TypeError in reclass() which is missing the argument 'G'.

I have added this into the code at UpOrDown = reclass(!UpOrDown!,!G!) which returns no error but doesn't output the expected variable of 1 in the UpOrDown column (which is Double).

I also changed the dependent variables to both Z and GP which still didn't change anything.

What is missing?


texts: Arcade IIF function, return field name plus string

texts:
I am pretty new to programming so I don't really understand how I can do this.

Basically I have data with field that are 0, I wanted to display "No Data" when the field is 0, and when it is not 0, for example 1977, I wanted to display "The building was built on 1977.

This is what I have right now

IIF($feature["YEAR_BUILT"]=="0", "No Data", $feature["YEAR_BUILT"])

However, when I want to add the string " The building was built on" like so,

IIF($feature["YEAR_BUILT"]=="0", "No Data", "The building was built on $feature["YEAR_BUILT"].")

The error message said unexpected token. How should i work around this?


texts: Finding distance between point and polygon edge in eastward direction using PyQGIS?

texts:
I need to find distance in eastward direction from each point to the closest polygon edge:

I can find shortest distance in any direction with:

pointlayer = QgsProject.instance().mapLayersByName('points_inter_squares')[0]
points = [[f.geometry(),f['Ruta_100km']] for f in pointlayer.getFeatures()]

squarelayer = QgsProject.instance().mapLayersByName('squares')[0]
squares = [[f.geometry(),f['Ruta_100km']] for f in squarelayer.getFeatures()]

for point in points:
    print(min([QgsGeometry.distance(point[0],square[0]) for square in squares if point[1]!=square[1]]))

>>12639.380321901293
>>3320.150455611874
>>6650.862023710273
>>2452.079442886869

'Ruta_100km' is the Squares IDs, so I measure distance to all Squares but the one intersecting the Points.

Is there a method where I can specify direction when measuring distance?


texts: My QGIS layer files can't be opened in QField

texts:
I created a project on QGIS that looks like this
But when I try to open it on QField on my phone, it tells me that couldn't load the layer.


texts: For-loop to call fields for IDW-Interpolation

texts:
probably a question easy to answer, but I do not figure it out at the moment.
I'm using station-data and do a IDW-interpolation to get average climate values in layer.
The station's data is arranged in a point-layer with fields for monthly values in the attribute table.
I want loop trough all columns of the attribute table and carry out the interpolation with those.

Following code I use:

fn = "C:/Users/Alex/Desktop/Masterarbeit/GIS/humidity_station.gpkg"
grundlage = iface.addVectorLayer(fn, '','ogr')
for f in grundlage.fields():
    grundlage_2 = processing.run(
            'saga:inversedistanceweightedinterpolation',
            {
                    'DW_BANDWIDTH': 1,
                    'DW_IDW_OFFSET': False,
                    'DW_IDW_POWER': 2,
                    'DW_WEIGHTING': 1,
                    'FIELD': str(f),
                    'SEARCH_DIRECTION': 0,
                    'SEARCH_POINTS_ALL': 0,
                    'SEARCH_POINTS_MAX': 20,
                    'SEARCH_POINTS_MIN': -1,
                    'SEARCH_RADIUS': 1000,
                    'SEARCH_RANGE': 0,
                    'SHAPES': 'C:/Users/Alex/Desktop/Masterarbeit/GIS/humidity_station.gpkg',
                    'TARGET_DEFINITION': 0,
                    'TARGET_TEMPLATE': None,
                    'TARGET_USER_FITS': 0,
                    'TARGET_USER_SIZE': 0.01,
                    'TARGET_USER_XMIN TARGET_USER_XMAX TARGET_USER_YMIN TARGET_USER_YMAX': None,
                    'TARGET_OUT_GRID': 'C:/Users/Alex/Desktop/Masterarbeit/GIS/idw_raster'
                }
            )

This code is followed by raster calculations.

The problem now is, that in the final results I get the values of only the first field. When I check the final raster it is based on the values of the first field also obviously.

Can someone tell me why the raster is not overwritten in every loop?
How do I need to write it?


texts: Creating filter stage of type filters.height using PDAL?

texts:
I use PDAL to find the height of points from LiDAR data. When I run the command:

pdal translate myfile.las height.bpf height --writers.bpf.output_dims="X,Y,Z,Height;"

It throws me the following error:

  PDAL: Couldn't create filter stage of type 'filters.height'


texts:
Forgive me, but I am completely new to GIS.
I am using QGIS.

I have a raster layer (HDF format) that does not align with other layers.
All layers are projected WGS84 (EPSG:4326) and still the problem persists.
I know that the HDF layer is defined by rows and columns that need to be converted to longitudes and latitudes but I don't know how to do that.
Also, the HDF file, for some reason, can't be exported as CSV file.


texts: Using osm2po to solve Travelling Salesman Problem

texts:
I've got a Travelling Salesman Problem (TSP) to solve. I created a routable street graph using osm2po and imported the result to PostGIS.
On my PG db I installed the pgrouting extension (over PGAdmin3 GUI --> right click Extension-->pgrouting).

I've got a second table with a visits_id (places to be visited) and the nearest node_id (node_id from osm2po).

How can I solve the TSP which seems to be build into osm2po already?

a.) I couldn't find any document how to do it in TSP.

b.) Do I have to install an additional function or something in my PostGIS? Or is installing pgrouting via unix-terminal and enabling it in PGAdmin3 enough?

c.) Do I solve the tsp via the osm2po inbuild tsp-algorithm or using pgrouting?


texts: Organising PostGIS data within large spatial database?

texts:
I'm currently educating myself on spatial databases and have downloaded lots of open data from a regional authority.

I know the technicalities on how to get that data into my new PostGIS database, however I'm not sure on how it should actually be stored.

Let's say that the data I've downloaded is split into three categories: boundaries, reporting of crime incidents and planning application boundaries for new residential development.

Now should I be storing this information in separate databases?

Or different schemas in the same database?

Or should I even just store all the data in the one schema knowing that I'll have more categories in the future?

What is the best way of organising and managing spatial databases?


texts:
I'm working on a plugin which fetch data from Vector Layers and I'm trying to update the informations whenever a fitting layer is added or removed.

At first, I tried with QgsProject.layersAdded and QgsProject.layersRemoved but it did nothing so I searched a little and found people mentioning layerTreeRoot.addedChildren and layerTreeRoot.removedChildren. Now my slots are activated however they seem to run before the action is actually performed.

Is this normal and are there other signals which could fit my needs?


texts:
With the abandon of OpenLayer and the integration of the XYZ Tiles (in Data Browser).

Is there a way to integrate Microsoft Bing, or Here Map, as a satellite imagery layer in QGIS 3.0?

Like for Google Maps as detailed at Will the OpenLayers Plugin be updated for QGIS3?


texts: Seeking article on network analysis, connectivity analysis, and proximity related to routes and influence of stations?

texts:
Unfortunately I lost a document I had found on the internet, and I do not remember the title
the article was like a guide or recipe and it was in pdf format, and it was related to network analysis, connectivity analysis and proximity.
one of the images is similar to this: example 1 or this example 2

But it was complete for the different police or fire stations, I do not remember it.
The author analyzed the distances, routes, and areas of influence of the police stations.the map represents the vias in different colors, which correspond to the area of influence of the stations.

It was made in postgis

I kindly ask you to help me find that document, it is an article with a few pages.


texts: Iterate Feature Selection to Clip Raster in ModelBuilder?

texts:
I created a model to loop through a feature class and wish to use the individual record to clip raster and save as individual raster databaset based on that record extent. Here is my model:

However, I am not sure why I cannot check the "Use Input Feature for Clipping Geometry" box. Does anyone has any idea?

I am using ArcGIS 10.2.1


texts: How to get the Measure Line in Yards (not Feet)

texts:
I'm using Qgis Dufour 2.0.1 and the Openlayers Plugin for images.

I'm working on a golf course project where everyone thinks in yards. I've tried different CRS (now working the State Plane Missouri East in FEET). The measure tool units match this CRS EPSG 102696.

Is there a simple way to change the CRS code so that measurements will be in Yards rather than in US-feet?


texts:
Where can I download freely available images for night from for South Asian region?

?


texts: How to solve 'syntax error, unexpected LE' in QGIS query builder?

texts:
I have a very simple question about the advanced query builder in QGIS.

I'd like to search for a range of numerical data values in the attribute table, but asking QGIS to show me values that are <= the low value and >= the high value doesn't seem to work; I continuously get a message that says:

  syntax error, unexpected LE

although sometimes is says GE instead of LE.

Haven't a clue what GE and/or LE refer to and can't find it on the internet.

This should be easy but it's not, which generally means I'm missing something.


texts:
Tell me, please, how I can apply cql_filter, based on currently map location in leaflet.js.

I have following code:

var myLayer = L.tileLayer.wms("url-to-geoserver",
{
    layers: 'heatmap:layer',
    format: 'image/png',
    transparent: true,

});

and I need to apply (on each map ondragstop event I guess) cql filter  like this: (geom+IS+NOT+NULL+AND+l_room+IS+NOT+NULL+AND+BBOX(geom,55.46187404873886,37.52260208129883,55.46845504793832,37.56232023239136)).

Help me with this, please, or give some keywords for further googling.


texts: Working with HTTPS, non-secure services and ArcGIS API for JavaScript?

texts:
Situation:
I am currently working with an app that is required to be delivered over HTTPS because of an organizational security requirement.  I currently do not have access to this servers administration, just the application code itself.

Problem:
The application relies on services from ArcGIS server (I have access to these servers).  These services are only delivered via HTTP since we do not have the server configured for HTTPS.  This causes issues with the app, since it is secure and requesting non-secure services.

Question
How do I get around this?  I am guessing the best way would be to enable HTTPS on our ArcGIS Service server, but I would like to avoid doing that if at all possible.  Can I use ESRI's JavaScript API Proxy rules to solve this (this would be optimal)?


texts: QGIS: Legend not displaying symbology of items

texts:
I'm making a plant including power plants in a country. I plotted the plants and their symbology shows up in properties in the legend items but it does not in the legend itself as you can see in the picture below.
P.S.: Not sure if this is the reason why they might not show up but I used a different symbol size for different capacities as described in this other question: Categorising point layer twice by size and form in QGIS
How can I fix this so that the symbols of each plant are shown in the legend?


texts: How to create a raster catalog in global mapper via scripting

texts:
I am a rookie GIS developer and I am having difficulty creating a script for global mapper that would create a raster catalog. Global Mapper provides an example script to perform the task as shown below, but the issue I face is that I need to search for .tif files saved in individual subfolders whereas the GM script targets a specific folder. The script provided is written in CLI, I would prefer to implement in python if possible. Any suggestions?
Sample Script:
GLOBAL_MAPPER_SCRIPT VERSION=1.00

// Create the map catalog. Maps should show when they take up at least 10% of display.

EDIT_MAP_CATALOG FILENAME="C:\TEMP\EXPORT TEST\script_catalog.gmc"      CREATE_IF_EMPTY=YES \ >>ADD_FILE="c:\temp\export test\*.tif" >>ZOOM_DISPLAY="PERCENT,0.10,0"

// Load the map catalog IMPORT FILENAME="c:\temp\export test\script_catalog.gmc"

---REVISED---
GLOBAL_MAPPER_SCRIPT VERSION=1.00

UNLOAD_ALL
// Loop over all DEM files in a folder and convert them
DIR_LOOP_START >DIRECTORY="...\DSM_2m_01\DEM"
 FILENAME_MASKS="*DSM_2m_01.tif" RECURSE_DIR=YES \

// Create the map catalog. Maps should show when they take up at least 10% of display.
EDIT_MAP_CATALOG FILENAME="b:\DGED\UTM_XX\TEMP\EXPORT_TEST\UTM_XX_new.gmc" CREATE_IF_EMPTY=YES \

   ADD_FILE="*DSM_2m_01.tif" \

   ZOOM_DISPLAY="PERCENT,0.10,0" \

DIR_LOOP_END \

// Load the map catalog

IMPORT FILENAME="b:\DGED\UTM_XX\TEMP\EXPORT TEST\UTM_45_TEST.gmc"

I receive the following error:
WARNING: Unknown parameter <EDIT_MAP_CATALOG> ignored for DIR_LOOP_START command.
Starting loop over files in directory <...\U_45N320000e6620000n_20km_2000_DSM_2m_01\DEM\> that match '*DSM_2m_01.tif'...

WARNING: Unknown command <ADD_FILE="*DSM_2m_01.tif.tif"> ignored. It looks like a valid parameter though. Did you forget a line continuation character (\) to continue the last command onto the next line?

WARNING: Unknown command <ZOOM_DISPLAY="PERCENT,0.10,0"> ignored. It looks like a valid parameter though. Did you forget a line continuation character (\) to continue the last command onto the next line?

ERROR: Script '...\DGED_Catalogue_Creator.gms' has a DIR_LOOP_START with no matching DIR_LOOP_END.


texts: How can i use ArcGIS server 10 mapservices in OpenLayers2?

texts:
I'm new in OpenLayers. I'd like to use mapservice of ArcGIS server 10 in open layers.I search and found examples of  using an ArcGIS Server 9.3 Rest API layer for OpenLayers. I found OpenLayers.Layer.ArcGIS93Rest instance but not ArcGIS 10 . How can I use ArcGIS server 10 services in Openlayers? I wrote the below code . I use ArcGIS server 10 and The REST is working right .

<!DOCTYPE html>

<html lang='en'>
<head>

    <title>My OpenLayers Map</title>
       <script type='text/javascript' src='OpenLayers.js'></script>
    <script type='text/javascript'>

        var map;

        function init() {

          map = new OpenLayers.Map('map_element',{});
var arcgis = new OpenLayers.Layer.ArcGIS93Rest("MyName","http://xxxxxxx/ArcGIS/rest/services/test/MapServer",

          {layers: "show:0,1,2,3,4"});

                    map.addLayers([arcgis]);

                    }

    </script>
</head>

<body onload='init();'>
<div id='map_element' style='width:1000px; height:500px;'>
</div>
</body>
</html>


texts: Looking for an explanation of QGIS Edit Widgets

texts:
I have noticed "Edit Widgets" under the Quantum GIS and would like to know in detail the use case and usage of this widget.

For any opened vector file, under the Properties -> Fields Tab, for every attribute feature there is a Edit Widget shown. Can someone explain in detail, the the use of these widgets?

If the answer is in form of Tutorial, I'm sure it will help a lot of users like me.


texts: Fuzzy PDF export in QGIS running on macSierra OS

texts:
I have run into an issue exporting a PDF file from the Map Composer in QGIS (Essen v 2.18.2, Qt ver 4.8.6) running on macOS Sierra (os ver. 10.12.4). The export resolution is set to 600 DPI (the same problem occurs with 300 DPI). The page size is A1 (210 by 297 cm). The map in the composer contains some minimal furniture (title, key, labeling) and a single map object displaying a raster LiDAR image. When exported to PDF (and to PNG) the resulting map is fuzzy, including all of the map furniture. I have tried with export raster selected and deselected. Same result. If I use the print system to export a PDF, the printer driver, of course, rejects the A1 page size and produces a crop Letter-sized rendering of the upper left corner of the map. I have reread the manual and searched the web to no avail. Does anyone have any suggestions or is this a bug in the current version of QGIS?

On a side note if the resolution is set any higher than 600 DPI, QGIS exports a single byte PDF file.


texts: I have a shapefile which contains X-specific field. I want to add this X-specific field (integer) to a raster dataset. I am using ArcGIS 10. How can I do this?


texts: Creating Layer file (.lyr) Reference with Path

texts:
Im looking for a way to get the name and path of a layer file which is used in an MXD. I know once a layer file is added to a MXD, the path info is not stored, which is problematic.

Essentially the end goal is to use arcpy.mapping module to update a bunch of layers within any MXD. using the following code

arcpy.mapping.UpdateLayer(maindataframe, updateLayer, sourceLayer, True)

We have a folder structure where all our layer files are connected to a mix of SDE and GDB's. And to find a way to make a table of all the layers with the paths would be a godsend.

The question is, is there a way to programmaticly run though each folder and sub folders (maybe using os.walk?) and get the layer name used in ArcMap (in this case, the updatelayer), and the path (sourcelayer) to get this format -> [River System,r'C:\Catchments\Area\River_Catchments.lyr']

Edit: I should point out that this is not to update the datasource, but the path of where it is found. The reason I need this is that there are old MXD's that contain old/dated symbology and need to be updated. By updating the layer with the one in the folder structure I can update multiple MXD's at once.


texts: Getting Temperature Data of Given Point Using MODIS LST Data?

texts:
I am trying to get MODIS satellite data with Google Earth Engine to find temperature data of given points on a map. I would like to get an array of all the points in an area (every 1km square in California) and their temperatures in a given timeframe. The array would be kind of like this:
[[temperature on December 10, temperature on December 11...], [...], [...]]

With each element corresponding to a different 1km square. So far, I have the following code to find the temperature of a specific point:

var dataset = ee.ImageCollection('MODIS/006/MOD11A1')
          .filter(ee.Filter.date('2018-12-10', '2018-12-23'));
var landSurfaceTemperature = dataset.select('LST_Day_1km');
var landSurfaceTemperatureVis = {
  min: 13000.0,
  max: 16500.0,
  palette: [
    '040274', '040281', '0502a3', '0502b8', '0502ce', '0502e6',
    '0602ff', '235cb1', '307ef3', '269db1', '30c8e2', '32d3ef',
    '3be285', '3ff38f', '86e26f', '3ae237', 'b5e22e', 'd6e21f',
    'fff705', 'ffd611', 'ffb613', 'ff8b13', 'ff6e08', 'ff500d',
    'ff0000', 'de0101', 'c21301', 'a71001', '911003'
  ],
};
Map.setCenter(-6.746, 46.529, 10);
Map.addLayer(landSurfaceTemperature, landSurfaceTemperatureVis, 'Land Surface Temperature');
//print(landSurfaceTemperature);
// map over the image collection and use server side functions
var tempToDegrees = landSurfaceTemperature.map(function(image){
    return image.multiply(0.02).subtract(273.15);
});
// print and add to the map
//print('image collection in temp in degrees', tempToDegrees);
Map.addLayer(tempToDegrees, {min: -20, max: 40, palette: landSurfaceTemperatureVis.palette}, 'temp in degrees');
var point = ee.Geometry.Point(coordinates);
var data = dataset.select('LST_Day_1km').get('LST_Day_1km');
var dataN = ee.Number(data);
print(dataN);

When I print dataN, the output is null. I want to print the temperature in degrees. How can I do this?


texts: Modify GeoServer Caching Defaults via REST

texts:
I'm working on some shell scripts to configure GeoServer instances using the REST endpoints, but I've become stuck with the GeoWebCache caching defaults. Is there any way to modify the gwc-cs.xml file using the REST endpoints for GeoServer or GWC?

I've been through the docs, but I can only see how to change the global settings. I can't see how to change the default grid sets, cache layers by default, etc.

The best alternative I can think of is to copy an XML file to the GeoServer data-dir and call the reload REST endpoint to reload the config.


texts: Can Qfield be used with external GNSS service?

texts:
I'm currently testing an external GNSS service on my mobile device. It produces RTK corrected GNSS signal that is distributed over bluetooth as NMEA format.

Is Qfield able to read an external GNSS service? App's settings don't seem to include anything concerning this.


texts: Export attributes of two layers into a csv file

texts:
I want to "merge" two layers and export the resulting table of attributes into a csv file. The two layers are as follows:

MSA level information: It has geometric information that creates the polygons and attributes of the MSAs. For some MSAs, some attributes are NULL, for others there is a string.
County level information: It has geometric information at the county level (to generate the polygons) and attributes at the same level. As before, the attributes are "NULL" for some cells and strings for others.

When selecting the two layers, the overlapping map is perfect. However, when I try to use "Join Attributes by Location", the layers are merged but only the geometric information is saved, and the attributes are lost. If I use MMQGIS to do a "Spatial Join" of the two layers, I get an error message saying that there are "duplicate output field names from different layers", which is true as all geographic information is labeled the same in the original MSA and county layers.

So, how should I proceed to merge this two layers and get the merged table of attributes with the attributes coming from both layers?

I am using QGIS 2.8.6-Wien on Ubuntu 16.04


texts: Feature linked annotation not added when new features are drawn

texts:
I created feature linked annotation for a line feature class. Both the feature and the annotation are feature classes stored within the same feature dataset on an SQL Server Geodatabase.

The initial labeling made use of a simple SQL query which may or may not be relevant. The annotation was created successfully but I'm having a hard time maintaining it due to the following:

When I create a new feature that matches the filtering requirements of my feature linked annotation, the annotation is not created automatically.  Instead I have to select the feature and then click Selection > Annotate selected features.  It's my understanding from reading through ESRI's help that the annotation should be created automatically for any newly added features.  These new features DO match the sql query I initially made use of.

I also posted Dragging feature- linked annotation results in strange snapping and rotation behavior which is a similar but different question here as well.  They are not duplicates.


texts: How to create a single polygon from GPS coordinates and find its area

texts:
I need to create a polygon and draw it on the map from GPS coordinates.
The GPS coordinates are taken from the android phone while the land leveler working the crop fields.

The results are not satisfactory.
from geojson import Polygon
import geojson

from area import area
import pandas as pd

df = pd.read_csv('data.csv')

long_coords = df['Longitude'].tolist()
lat_coords = df['Latitude'].tolist()

data = []
for i in range(0, len(long_coords)):

    data.append( tuple([long_coords[i],lat_coords[i]]) )

data.append(data[0])

print("Total GPS Coordinates: {}".format(len(data)))

obj = Polygon([data])
print("Total Area : {} ".format(area(obj)))

f = open("data.geojson", "w")
f.write(str(obj))
f.close()

The GeoJson result is stored in data.geojson:

Not getting the results expected, I want a single polygon with no holes in it.
The result that I expect,

The GPS Coordinates CSV File is : data.csv


texts:
I'm working on a soil project and I am trying to add a new field that is called Drainage which is correlated to all of the different soil types (which is a different field). Is there an easy way to have information from one field be interpreted into another field?

For example, I have a soil type that is called 110D and I would like to find out if there is a easy way for QGIS to understand that since it is 110D, then it should auto fill the next field with a drainage classification.


texts: How to access QGIS Plugin Repositories from behind a proxy?

texts: I have been trying to teach myself QGIS by using this forum and others to help. Most of my questions can be answered by downloading plugins that are available through 3rd party repositories but for some reason I am not able to connect with these. Anyone have any ideas why this is the case?


texts: What is default compress number for jpg2000 when exporting?

texts:
I have a file geodatabase that has 635 GB Imagery I copied from Mosaic Dataset. I am trying to export it to jpg2000 to a new file geodatabase. I am thinking what is the default compress number for jpg2000 when I export it ?

I thought it was 75 percent so I calculate it would compressed to about 158 GB ? Am I correct ?

I am using ArcGIS 10.1 SP3


texts:
When I launch a treatment on FME 2018 the following message will appear :

  CSV reader: Detected excess data and/or delimiters in addition to the
  defined schema in line XXXX

Note that the treatment works very well, I am just wondering how I got this message, is there a limit of tuples imposed by FME in the .csv reader ?


texts: Split linear features from non-linear in the same feature class

texts:
I have a vector layer (Originally a raster layer) of well sites, cut blocks, and seismic lines all lumped together in the same feature class and no distinguishing attribute between them.

I want to split these linear polygon features from the non-linear polygon features. For Example, I would like the polygons to get split where I drew in the yellow lines.

Is there an approach to do this in either vector or raster data format? I don't care about maintaining field data.

I am using ArcGIS 10.2 but am open to solutions with any program.


texts:
I have a set of maps in few formats :

TIN

├── [4.0K]  info
│   └── [2.6K]  arc.dir
├── [ 708]  log
├── [374K]  M-33-45-D-d-4.asc
└── [4.0K]  m-33-45-d-d-4tin
    ├── [  96]  tdenv.adf
    ├── [1.1M]  tedg.adf
    ├── [ 332]  thul.adf
    ├── [8.2K]  tmsk.adf
    ├── [ 116]  tmsx.adf
    ├── [1.1M]  tnod.adf
    ├── [751K]  tnxy.adf
    └── [188K]  tnz.adf

ASCII

├── [ 12K]  M-33-45-D-d-4_c.asc
├── [ 12K]  M-33-45-D-d-4_j.asc
├── [ 365]  M-33-45-D-d-4_k.asc
├── [1.6K]  M-33-45-D-d-4_o.asc
├── [518K]  M-33-45-D-d-4_p.asc
├── [114K]  M-33-45-D-d-4_pz.asc
├── [109K]  M-33-45-D-d-4_s.asc
├── [164K]  M-33-45-D-d-4_sz.asc
└── [317K]  M-33-45-D-d-4_z.asc

TTN

└── [3.2M]  M-33-45-D-d-4.ttn

I would like to somehow interpret those maps (preferably TIN) for my visualization application but I am quite confused where to start.

I know about GDAL library but I am not able to use it on those files to convert them to anything else.

How can I read those .adf files?


texts: How to know if flow accumulation map reflects true catchment areas?

texts:
I have calculated flow accumulation (img file) using this DEM (img file), which is 0.5 degree resolution, using arcmap.

I am wondering if the cell accumulation value can directly be translated into drainage areas in square kilometers or not, and if these values reflect true catchment areas?

For example, if the flow accumulation value is 140 and my resolution is 0.5 * 0.5 degree = 56km^2, the upstream area is 140*56 = 7840km^2.


texts: Pros and cons of using Ruby/Rails/RGeo or Python/GeoDjango for a web based GIS

texts:
We're at the investigation phase of creating a web based GIS. We're assessing options for an ORM to use in all of our backend import/export and processing routines. From my research, GeoDjango appears to be more mature, but Rails/RGeo looks to be well thought out and reasonable comprehensive.

Does anyone have experience with both and can recommend one or the other?


texts: Extracting the polygons from a multi-polygon shapefile where they intercept with points from a multipoint shapefile in QGIS

texts:
I have 2 shapefiles, one multi polygon shapefile (a) and and one multi-point shapefile (b).

I would like to extract the polygons from (a) only where they contain points from (b). I can do this pretty easily using the Vector Selection ---> Extract by Location in QGIS; however the attribute table from the output multi-polygon shapefile (c) only contains the information of the extracted polygons from (a) whereas I need them to retain the data from (b) as well.

Is there any way to create the output (c) but keep the information from both (a) and (b)?

I can add a step by using Vector General ----> Join Attributes By Location, however the attribute table from this output (d) has duplicates which I'd like to avoid. If, on the other hand, this added step is Vector General ---> Join Attributes By Location (Summary) there are no duplications in (d) but the new attribute table contains numerous summary statistics which I do not need, nor want.


texts:
I would like to work with the gdal functions provided in the processing toolbox.
It is easy to call:

import processing
processing.alglist()
processing.runalg("gdalogr:warpreproject","/home/USER/.qgis2/python/plugins/qgis2leaf/test_data/src_img.tif","EPSG:4284","EPSG:4326",0,1,"","/home/USER/Desktop/export_image.img")

as an example. unfortunately I need jpg in the ouput or png.
Is there any reason why I cannot save as jpg. I can use the warp or translate function in the GDAL toolbox with a jpg but it is hard for me to call it from within python.

Back to the question: Is there a support for jpg in the GDAL processing functions in QGIS?


texts:
I have been an ENVI and ArcGIS user, but recently heard about the TNTmips from MicroImages. I would like to know:

How does TNTmips handle orthorectification? Can it orthorectify multiple images over a large area in the same process?

The data involved is a series of georectified aerial images.


texts: Changing name of outputlayer dynamically in QGIS Processing script?

texts:
I have a processing script to load txt-data from a magnetometer and convert them into a vectorlayer (to make a raster in a second step). I want the name of output layer to be changed into something related to the input filename. The initAlgorithm function looks like this:

def initAlgorithm(self, config=None):
    # We add the input File Parameter.
    self.addParameter(
    QgsProcessingParameterFile(
        self.INPUT,
        self.tr('Magnetometer File'),
        0,
        'txt'
       )
    )
    # and the output vector layer
    self.addParameter(QgsProcessingParameterFeatureSink(
        self.OUTPUT,
        self.tr('Magnetometer points'),
        type=QgsProcessing.TypeVectorPoint))

The new output layer is named Magnetometer points, but should be better something like Magnetometer points File1

How and where can I achieve this - I suppose in the processAlgorithm function?


texts: saveStyleToDatabase unable to save using PyQGIS

texts:
I have been trying to programmatically save the styles of a number of layers to my postgres database using the following code:
for layer in QgsProject.instance().mapLayers().values():
    lyr_name = layer.name()
    layer.saveStyleToDatabase(
        f'oszs_outdoor_{lyr_name}',
        f'Style (outdoor) for {lyr_name} layer',
        True,
        'uiFileContent'
    )

but keep getting this error:

Unable to save layer style. It's not possible to insert a new record into the style table. Maybe this is due to table permissions (user=postgres). Please contact your database administrator.

I have had a look at the PostGIS error message and get the following message on all the attempts:

[ERROR: syntax error at or near "("
LINE 1: ...leSLD,useAsDefault,description,owner,type,XMLPARSE(DOCUMENT ...
^
]

I have noticed when copying the full message across to a text editor, the INSERT INTO and the VALUES don't seem to match up when it comes to the last few columns. The start and end lines of the SQL script looks like this:
Start (where the syntax error is):
INSERT INTO layer_styles(f_table_catalog,f_table_schema,f_table_name,f_geometry_column,styleName,styleQML,styleSLD,useAsDefault,description,owner,type,XMLPARSE(DOCUMENT 'uiFileContent'))

End:
),true,'Style Outdoor for woodland layer',CURRENT_USER,,ui'Unknown geometry');

The 'ui' value does not appear to be in the right place. Has anyone else experienced this error? Does the error message show exactly what was commited to the postgres DB? Is there something that I am doing wrong or is it something that should be raised as an issue?
I can save the styles manually by using the properties tab on each of the layers individually, but I was hoping to create a process to run through them automatically given the large number of layers and multiple styles I want to save.


texts: Using Rasterio or GDAL to stack multiple bands without using subprocess commands

texts:
Does anyone have a eloquent way of stacking multiple .tif files into a multiple band stack using Rasterio and/or GDAL?

I am looking for a way to avoid using a subprocess command like gdal_merge.py and rather have it as part of my python script.

I know that both Rasterio and GDAL read the .tif files as arrays, but how do I stack those arrays and write out the result as separate bands?


texts: Getting layer information + sending it via socket io to a client

texts:
I am new to QGIS and I was wondering if there was a way to get the information from a layer (its name for example), and to send it to a client via a python-socket.io server?

A this very moment I have a very simple python-socket.io server and an angular client, all I am looking to do at the moment is just a simple communication where a layer name is sent from server to client.

I have been looking around the QGIS Dev Cookbook but I haven't been able to find the proper info regarding this at all.


texts:
Version 3.16.0 Hannover
I am trying to create a simple raster from x,y,z data
Using Raster-->>Analysis-->>Grid (IDW)
Please see the error log below:
Can anyone help?

QGIS version: 3.16.0-Hannover QGIS code revision: 43b64b13f3 Qt
version: 5.11.2 GDAL version: 3.1.4 GEOS version: 3.8.1-CAPI-1.13.3
PROJ version: Rel. 6.3.2, May 1st, 2020 Processing algorithm…
Algorithm 'Grid (Inverse distance to a power)' starting… Input
parameters: { 'ANGLE' : 0, 'DATA_TYPE' : 5, 'EXTRA' : '', 'INPUT' :
'delimitedtext://file:///C:/Users/david/Desktop/Collars.csv?type=csv&skipLines=9&maxFields=10000&detectTypes=yes&xField=138650&yField=141360&zField=40&crs=EPSG:29902&spatialIndex=no&subsetIndex=no&watchFile=no',
'MAX_POINTS' : 0, 'MIN_POINTS' : 0, 'NODATA' : 0, 'OPTIONS' : '',
'OUTPUT' : 'TEMPORARY_OUTPUT', 'POWER' : 2, 'RADIUS_1' : 0, 'RADIUS_2'
: 0, 'SMOOTHING' : 0, 'Z_FIELD' : '40' }
GDAL command: gdal_grid -l None -zfield 40 -a
invdist:power=2.0:smothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=0.0
-ot Float32 -of GTiff "file:///C:/Users/david/Desktop/Collars.csv?type=csv&skipLines=9&maxFields=10000&detectTypes=yes&xField=138650&yField=141360&zField=40&crs=EPSG:29902&spatialIndex=no&subsetIndex=no&watchFile=no"
C:/Users/david/AppData/Local/Temp/processing_aiDgiu/cb24c708989444ecba3f22bda635ddd0/OUTPUT.tif
GDAL command output: ERROR 4:
`file:///C:/Users/david/Desktop/Collars.csv?type=csv&skipLines=9&maxFields=10000&detectTypes=yes&xField=138650&yField=141360&zField=40&crs=EPSG:29902&spatialIndex=no&subsetIndex=no&watchFile=no'
does not exist in the file system, and is not recognized as a
supported dataset name.
Execution completed in 0.14 seconds Results: {'OUTPUT':
'C:/Users/david/AppData/Local/Temp/processing_aiDgiu/cb24c708989444ecba3f22bda635ddd0/OUTPUT.tif'}
Loading resulting layers The following layers were not correctly
generated. •
C:/Users/david/AppData/Local/Temp/processing_aiDgiu/cb24c708989444ecba3f22bda635ddd0/OUTPUT.tif
You can check the 'Log Messages Panel' in QGIS main window to find
more information about the execution of the algorithm.