texts: Attribute Inspector for points - JavaScript API

texts:
I am attempting to get an application working where editors can click on a point feature and edit a form. I need the form to have a save button that when clicked will apply the edits to the feature.

I am selecting the point/s using an envelope. Is there a way I can tell what feature I need to apply the edits to on my save click event? I would like to store the edits to a feature as fields are changed and then only save the edits to the feature class with the save button.

I am trying to use this example to understand the edit saving and then the feature save.
Attribute Inspector

Here is what I am working with right now. I am grabbing the point features within an envelope:

function initEditor() {
          var featureLayer = layersFS[1].layer;

      var selectQuery = new Query();
      map.on("click", function (evt) {

          var centerPoint = new esri.geometry.Point
           (evt.mapPoint.x, evt.mapPoint.y, evt.mapPoint.spatialReference);
          var mapWidth = map.extent.getWidth();

          //Divide width in map units by width in pixels
          var pixelWidth = mapWidth / map.width;

          //Calculate a 10 pixel envelope width (5 pixel tolerance on each side)
          var tolerance = 10 * pixelWidth;

          //build query filter
          query = new esri.tasks.Query();
          query.returnGeometry = true;
          query.outFields = ["*"];

          //Build tolerance envelope and set it as the query geometry
          var queryExtent = new esri.geometry.Extent
                  (1, 1, tolerance, tolerance, evt.mapPoint.spatialReference);
          query.geometry = queryExtent.centerAt(centerPoint);
          featureLayer.selectFeatures(query, FeatureLayer.SELECTION_NEW, function (features) {
              if (features.length > 0) {
                  //store the current feature
                  for (var i = 0; i < features.length; i++) {
                      updateFeatures.push(features[i]);
                  }
                  //map.infoWindow.setTitle(features[0].getLayer().name);
                  map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));
              } else {
                  map.infoWindow.hide();
              }
          });
      });

Then I am planning to update the specific feature with the save button:

saveButton.on("click", function () {
          //need to figure out how to get the current feature with the save click,
          //the envelope may return 1 to many records and I need the current feature
          updateFeatures.forEach(function(entry) {
          updateFeature.getLayer().applyEdits(null, [updateFeature], null);
          }
       )});

      ///////Need to apply similar logic as save button click but this will update the current feature in the updateFeatures[]
      attInspector.on("attribute-change", function (evt) {
          //store the updates to apply when the save button is clicked
          updateFeature.attributes[evt.fieldName] = evt.fieldValue;
      });

What is the best way to determine what my current feature is in the info window that is being edited?


texts: Ignore database columns when inserting feature

texts:
I have a spatial table in MSSQL which has a "Geog" column that stores WKT and an "area" column that automatically populates based on the "Geog" geometry.
This table is succesfully added in qgis and shows up nicely.

Now when i try to save a new feature into this table, it returns an error saying that the "area" column values can not be edited because it's a calculated field.

 [Microsoft][ODBC SQL Server Driver][SQL Server]The column "Area" cannot be modified because it is either a computed column or is the result of a UNION operator. [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. QODBC3: Unable to execute statement

Is there a way to ignore certain columns in the SQL that gets send to the database? A null value still gets send, and returns that error.

I know qgis can do the calculated fields thing but our database works with other apps as well, so it needs to have the area field calculated in-server.

Any thoughts?


texts:
I have ticked grid maps in Atlas composer. The problem is my maps don't have same scale to represent. Then, I would like to configure grid in such way that lines of grid  in different maps change automatically to each map  in order will have better fit line.

I think that data defined override can be fix it. But I haven't seen this options to interval grid.


texts: Counting points contained in polygon for large number of points in ArcMap?

texts:
I'm trying to determine the number of points within a set of polygons for a large number of points. There are 2GB of lat-long coordinates in a CSV file, and I want to see how many are contained in each polygon.

The number of points seems too large to import as a layer of points and then do a spatial join.

Is there any alternative that works well with large datasets?


texts: QGIS 3.4 Export data table with a list of all unique variables in a column

texts:
How can I export a data table which where I have a list of all unique variables contained in one or some attribute columns?

I'm using QGIS 3.4 and I have an attribute column which has about 20 unique characters repeated for 1973 polygons.

I would like to have a list of them and the same for other columns.


texts: Merge Multiple feature classes based off name

texts:
Trying to write a script to merge feature classes based off their name. Steps are as follows -

In the original geodatabase, find polygon feature classes that end with a particular suffix ( ie *15_AM)
In a new geodatabase, merge them together based on their names (So Peaks_15_AM, Peaks_14_AM and Peaks_13_AM to Peaks_AM)

I'm a novice and my code is very crude, it works for a single feature class but the loop does not accept a list for the 'Keyword' variable. I know I need to somehow iterate over a list but have been stuck how to approach it.

Ideally if I could use the feature class names without the suffix as the 'Keyword' that would be great, but could also just use some raw strings.

import arcpy
import os

#variables
arcpy.env.workspace = r"D:\Old.gdb"
OutputGDB = "D:\New.gdb"
FCS = set(arcpy.ListFeatureClasses("*15_AM", "polygon") + arcpy.ListFeatureClasses("*14_AM", "polygon") + arcpy.ListFeatureClasses("*13_AM", "polygon"))
Keyword = "Peaks"
fc = []

#merge
for i in FCS:
    if Keyword in i:
        fc.append(i)
        arcpy.Merge_management(fc,OutputGDB+"/"+Keyword+"_AM")


texts:
I have OS X - El Capitan. I have installed PostGIS 2.2 (brew shows "postgis 2.2.0 already installed"). But when I run "ALTER EXTENSION postgis UPDATE TO "2.2.0"" - it returns - "ERROR:  extension "postgis" has no update path from version "2.1.8" to version "2.2.0"".

So my problem is, I do not know how to set the update path.


texts: What are "M" point locations on the NOAA forcecast cone map?

texts:
I don't think I've ever noticed M before.

H and S are Hurricane and Tropical Storm.


texts: Why do regular expressions that work on regex101.com not work in qgis?

texts:
I'm having trouble getting the qgis field calculator to validate regular expressions that work on regex101.com and also getting the same results between the two.

I'm trying to extract the digits and letters into separate fields.

example string in column ref:

CR 267;SR 1025

In qgis, I can extract 267 with:

regexp_substr( "ref",'(^\d[0-9]+)')

regex101.com will only validate this if I remove the ^:

\d[0-9]+

and then returns 267 and 1025.
now to extract letters. In qgis:

regexp_substr( "ref",'(^\D[a-z]+)')

does not validate.  On regex101.com:

^\D[a-z]+

returns CR

So, is there something fundamental that I'm missing about the way regular expressions work in qgis?


texts:
From this line:

SELECT ST_AsEWKT(geom) FROM buildings LIMIT 1;

I get this result:

"SRID=4326;MULTIPOLYGON(((404269.308014269 4543087.6184561,...)))"

I'm wondering if the coordinations are actually in the right format as SRID 4326?

EDIT ---- >
The table was updated using this line:

SELECT UpdateGeometrySRID('buildings','geom',4326);


texts: Trying to use LIKE in an expression in pyQgis

texts:
I want to select elements from a layer. The field I use is a string/character field. My code is as follows:

expr = QgsExpression(ur'"myField" = \'valueILookFor\'')
it = myLayer.getFeatures(QgsFeatureRequest(expr))
ids = [i.id() for i in it]
myLayer.setSelectedFeatures (ids)

I do know that the error lies in the first line, as I've already used the rest of the code (which is from stackexchange) for selecting values.

Apparently this does not select any value. I have tried to replace the "=" with a "LIKE" without more success.


texts: Install GDAL locally in a server without sudo permissions

texts:
I would like to install the last version of GDAL on my user space of a sever (ubuntu framework). I do not have permissions to use 'sudo' command because I have not 'root' permissions.

What do you suggest to do?


texts: I don`t manage to move a vertex. I read an answer on this question, but even though, I am not able to move it. And I am not able to prolong a line.


texts: QGIS 3.x API: apply rotation based on the "angle" field of the imported SHP-File

texts:
I am writing a python code in Anaconda (Spyder).
The goal is to create automatically a QML-File for my SHP-Files (categorized with the values of one of the fields).
I have read the documentation on https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/vector.html, and I could import the shapefile without problem.
Which functions can I use to give the rotation on the arrow-symbol based on the values of a field of the shapefile? Each point has an own direction.
I have tried different methods, but I was not able to combine symbol properties (arrow and direction of the arrow) with the categorization (group of points).
I know how it works that in QGIS with the graphical interface, but not with a python-code.
This is my first question in StackExchange. I hope my question is formulated correctly.


texts: insert maximal number of circles into polygons

texts:
Possible Duplicate:
  algorithm to place maximum number of points within constrained area at a minimum spacing

I'm trying to fit as many 30ft diameter circles into polygons of certain land cover classes without any overlap, neither with one another nor with adjacent classes. I'm trying to fit the maximum number possible.

I'm having two problems, I can't figure out how to drop circles and I can't figure out how to maximize the number of them.

Any thoughts?


texts: Cleaning topology errors in PostgreSQL (vector data) using QGIS?

texts:
I need to append the shapefiles to a PostgreSQL database. Once the data gets appended to PostgreSQL, some topology errors like gaps & overlaps can be seen.

By using the v.clean tools the topology errors can be removed. However, as a result, it gives a separate shapefile ("cleaned").

So how can I remove the topology errors in the given table (test1) in PostgreSQL database?


texts:
I have traffic data that shows tracks that have start and end times (in YYYYMMDD-HHMMSS format) and the speed (m/s) the vehicle was moving. From that I've calculated total traveled distance (m) and distance traveled in one minute (m).

Each feature represents one track (line) with specific speed. For one vehicle there are thousands of features.

Example:
    ID    V_name   st_time
        end_time                 speed    distance    distance_1min
1      Vehicle1   20181115-140505    20181115-140610   10             650           600
2      Vehicle1   20181115-140632    20181115-141018   8.5        1921          510
3      Vehicle1   20181115-141018    20181115-141249   6            906           360
    etc.

I need to create points along the line that are one minute apart from each other. So along some features there will be only one point (ID 1 in the example table) and along other ones there will be several (IDs 2 and 3 in the example table). I've used Linear Referencing -toolbox to Create Routes and used Make Route Event Layer -tool to create points as events, using the distance_1min as the Measure Field. The problem is that the tool only creates a point once within the determined distance along the tracks, when I would need it to create several when fit. Would anyone have an idea how to fix this?

This would only be the first step. The second one would be to find out a way to create "continuous" point features throughout the data, meaning not beginning from the start point of each track (like in the first step), but taking under account the "residue" (m) left from the previous feature. This way the points would be one minute part in the whole data, not only by each track.

Example:
    ID    V_name   st_time
        end_time                 speed    distance    distance_1min   residue
1      Vehicle1   20181115-140505    20181115-140610   10             650           600                    50
2      Vehicle1   20181115-140632    20181115-141018   8.5        1921          510                    441

Any ideas?


texts: Changing symbology of selected features in PyQGIS?

texts:
In QGIS selected features are normally highlighted in a different color to draw user’s attention on the selection. The default color can be changed programmatically. As a nice to have my standalone app (QGIS 2.8.2) should draw selected features with different stiles: points with another symbol or a greater size, maybe with a flashing effect, areas with hatch pattern drawn in a different orientation.

Any ideas on how to implement this?

My first idea was to switch between True and False in a hidden field whenever selectionChanged signal is emitted, but I am afraid of running in inconsistency and performance problems this way.


texts: How to handle Arabic letters in QGIS and Mapinfo?

texts:
I have a problem with Quantum GIS and Mapinfo, in both Windows XP and Windows 7.
I need to use French and Arabic.  One field is called Name_fr, and the other Name_AR.
The Arabic is fine until the moment I save the table, and all the characters turn into question marks.

Thank you for the help.


texts: Spatial similarity test between daily raster datasets

texts:
This question is an extension (next step) to Comparison with different resolution rasters.
Currently I have successfully compared the similarity between the two raster datasets (currently both rasters have the same resolution), one from the PCA model, and the other from the VIC model on a daily as well monthly bases. The two tests that I used are the Kolmogorov-Smirnov (KS) and the Kruskal Wallis tests (KW). The results are good, but they don't tell me the spatial similarity between the two datasets i.e. how similar the two datasets are at each pixel? I have attached a sample dataset here. Grid Code is the pixel ID, and for the sample data, I am comparing "VIC_SC_04" with "PCA_SC_04". The data ranges from 0 to 1. 0 being 0% snow cover and 1 being a 100% snow cover. Note that during the end of the melt season, there are significant ties (0) in the data, as most of the snow has melted off.
Spatial data which is information about a particular location in space, and similarity is the analysis of divergence from equality (Bruns & Egenhofer, 1996). Moreover, spatial similarity according to Holt and Benwell is explained as areas at a specific resolution and attributes that are evaluated to be comparable or not. Thus, spatial similarity is dependent on spatial equivalence and classification based on the reason/purpose of comparison, and can also depend on a temporal facet of the data (Holt, 1999). What tests can I perform in R to do "spatial similarity analysis" along with plots between the two datasets on daily/monthly basis?


texts: Adding time to variable using Python Parser of ArcGIS Calculate Value tool?

texts:
I am using Python 2.7 in calculate value in ModelBuilder. I want to query both 30 seconds before and after the variable. The original value keeps returning not the time change. What am I not defining?

Expression ("%Da%")

Code Block:

def getsecond():
    from datetime import datetime
    getsecond == ("%Da%")+ timedelta(seconds=30)
    return getsecond

type string

The variable Da is a date field


texts: Applying xyz translation vector derived from IceSAT altimetry to an ArcticDEM strip?

texts:
Laser altimetry data from the NASA IceSAT spacecraft is used to compute x, y, and z offsets for ArcticDEM strip files. The values of these offsets are contained within the DEM metadata, but are not applied. How can I apply these altimetry-derived offsets myself? Solutions using Python / GDAL are ideal but I am really just looking for the logic.

An example metadata file and translation vector:

DEM Filename: WV02_20160702_10300100590AAE00_1030010058954200_seg1_2m_dem.tif
Registration Dataset 1 Name: GLA14_rel634
GCP Month Range (+/- months)=1
# GCPs=563
Mean Vertical Residual (m)=0.004
Median Vertical Residual (m)=-0.003
Translation Vector (dz,dx,dy)(m)= 1.213, 0.366, 0.097
Vertical Deviation Percentiles(m):
50th percentile=0.340
55th percentile=0.372
60th percentile=0.417
65th percentile=0.462
70th percentile=0.519
75th percentile=0.580
80th percentile=0.640
85th percentile=0.741
90th percentile=0.849
95th percentile=1.043
100th percentile=5.235


texts: Calculate values of coordinates in more system coordinates in same time, using unique tool

texts:
I have a table with several points. The attributes contain 3 "types" of coordinates in the SIRGAS2000 datum (decimal, DMS and UTM). I want to calculate these coordinates with a tool, because it is annoying to select zones(fuso) before calculating in UTM.

The answer can be in the model builder or Python. If it's in Python, please explain in detail (I'm still learning Python)

The format in longitude/latitude GMS(DMS) can be a little different.

I use ArcGIS

I want these coordinates only using the field shape.

I use another layer to know the zone (a zone class in DB), maybe can I use this layer to select and filter the points. the filter is ok. My problem is generate the coordinates using "calculate values" in model builder.


texts: How can I divide a polygon in equal parts, number of parts as attribute, in QGIS?

texts:
I have a polygon layer. Each polygon is part of a street, so it's not straight or all the same orientation. Each single polygon has an attribute with a number. I would like to divide the polygons in equal parts (same area, or even better: same length of longest side). The number of parts is an attribute. So for instance, some polygons should be divided by 1 (so they stay the same), some in 2 parts, some in 10 parts, etc. This parting should always be in the 'long' side: The street should be divided length-wise. Is this possible?

Example input:

Example output:


texts: Ensuring expression always yields same number of digits in ArcGIS Desktop?

texts:
I am using ArcGIS Desktop 10.5 and trying to create a unique ID with the following expression:

"city_id"='2'&'002'&"popn_rank"

The expected result would look like 20020001, 20020002, etc.

The problem is that "popn_rank" has a varying number of digits, from 1 to 4 (e.g. 1, 12, 100, 1032). The expression that I entered aboved would output something like: 20021, 200212, 2002100, 20021032.

How do I make sure that "city_id" always has 8 digits?

I'm guessing there's a way of adding something to the expression or changing something to "popn_rank" beforehand, but I don't know how.


texts: Create table with Geometry Column in hadoop Hive

texts: Is there a way to add a geometry column in hadoop? Please give me some getting-started tutorial for geoprocessing in hadoop. Like, I have a database which have point values and if I take a random point, I need to check all the values which come under 10km radius of that point.


texts: How can I extract the data showed in Version Changes before reconcile/post process?

texts: I want to make a script in python to extract the data about version changes before make the reconcile/post process. Is that possible? I trying to avoid use C# or VB script.


texts: Selecting non-overlapping polygons from a one layer in PostGIS

texts:
I have one layer with overlapping polygons just like in this screenshot.

I would like delete all overlapping polygons. Something like that (yellow polygons).

I tried to use this code:

SELECT pol1.*
FROM
polygon pol1 ,polygon pol2
WHERE
ST_contains(pol1.geom,pol2.geom) = false

SELECT st_union(geom) FROM (SELECT geom FROM polygon UNION SELECT geom FROM

polygon) as foo

but it seems my skill in PostGIS is weak and I don't understand some function.
I don't have any idea of how should it look like.

I'm using PostgreSQL 10 with PostGIS 2.5.2.


texts: Understanding difference in polygon area calculated from ArcGIS Desktop and QGIS?

texts:
I'm calculating the area of some polygons and realized that the values are coming out differently when I do the calculations in ArcGIS and QGIS. The data is in Sirgas 2000 and projected for the South America Albers Equal Area Conic.

Also, I can't control the number of decimal places for this field in ArcGIS, even by changing the Precision and Scale values.

Can anyone tell me what I might be doing wrong or is it normal?

I'm using field calculator in both cases. In ArcGIS I've selected the spatial reference of the file plus the square kilometers option. In QGIS I've used "$area / 100000". The datum is "Sirgas 2000" and I've done the projection previously in ArcGIS (Project - Data Management)

The areas in the picture are in square kilometers (km²).


texts: Mapping lat/lon to zip code level or climate region level

texts:
I have  a CFSR  30-year  climatology .nc file. I could read in the file and  get  lat, lon , date  and temperature. Now I  need roll up these information to a zip code then later to climate region level.

Where could I find such mapping?

I could find a zip code shapefile, I'm thinking I could find all the points within each zip code then roll up to region level.

Does anybody have more straightforward method?

I'm using R or Python to load the data.


texts: Is Python or C# with ArcObjects more efficient in memory management in ArcGIS Desktop?

texts:
I have two scripts one in Python and other in C# using ArcObjects, both of them perform same operations and that is making some edition by using Select by Location.

The amount of data which is being processed is large and while using the Python script I get an error stating Out of Memory, while the C# script works perfectly fine.

I have tried setting the flag link: https://gisgeek.blogspot.in/2012/01/set-32bit-executable-largeaddressaware.html?showComment=1498490022902#c7602920706364823811

Now the Python script does not display the memory error. Which brings to this question is C# really more efficient when it comes to memory management?

The version of ArcGIS Desktop I am using is 10.4.1


texts: Finding the shortest distance between a point and a line

texts:
I read and understood the following GIS question and the accepted answer,

calculating-the-distance-between-a-point-and-a-virtual-line-of-two-lat-lngs

I can return the value in the ShortestLength variable (required for my project).

My question is: what is the measurement of this variable (ie.) Is it in kilometer or meter or do I have to convert it using the diameter of the earth?

I'm not sure. Can someone suggest a solution?


texts: Is it possible to wrap the heading of a column of an attribut table within the print composer?

texts:
The "wrap text on" function seems not to work for the heading of the columns, only for the rows.

I'm using QGIS 2.14.4


texts: Label rotation values in DXF imported into QGIS

texts:
When loading a dxf in QGIS, the line type files load in ok, however all text rotation values are lost when loaded into QGIS.

This is most obvious when you load in OStext.dxf (please see grab_Mar.22.jpg) this shows the same file open in AutoCAD and we can clearly see the selected “RICHMOND ROAD” with a rotation value of 314. When we look at the same record in QGIS (see attached grab2 Mar.22 13.43.jpg) we can see that the rotation value has changed to -0.80. So when I use that value to rotate the text, it doesn’t rotate to the correct place.

Why are the rotation values in the dxf files changing when we load into QGIS?


texts: ESRI Maps for SharePoint - ArcGIS for Server Only

texts: Is there any way to use Esri Maps for SharePoint without having to go through either Portal or ArcGIS Online. I am at an organization that is very hesitant to implement Portal and programs many applications directly to ArcGIS for Server. Reading most of the docs it is clear that the advertise it as configurable through either Portal or ArcGIS Online. Has anybody found a work around to this using only ArcGIS for Server. Is a work around even necessary? I essentially am hoping to grab filters & data from other Web Parts/BCS to make heat maps Amongst other things. Any thoughts?


texts: QGIS 3.x adding a layer too the root of the project instead of the selected group

texts:
I''ve created a function to add layers to a QGIS project:
def add_layer_to_project(layer, group_lst=None, visible=True):
    """
    group name has to be list relative to root of project
    root
        group
            subgroup
                subsubgroup for example
    """
    try:
        root = QgsProject.instance().layerTreeRoot()
        # If group is specified, create it if it doesn't exist yet
        if group_lst:
            QgsProject.instance().addMapLayer(layer, False)
            # Last item in list represent group to add layer to
            group = ensure_group(group_lst, root)
            group.addLayer(layer)
        else:
            QgsProject.instance().addMapLayer(layer, visible)
    except Exception as e:
        raise e from None

I call the function like this:
add_layer_to_project(layer)

Layer can be raster or vector layer and is created elsewhere.
The intent is to add a layer to either a group in my project or to the root of it. However, if I have a group selected and I try to add layers to the root (see else clause), they get added to that group instead. I haven't tried what happens if I try to create a group but I imagine it somehow sees whatever is selected as the root? I was hoping someone could tell my how to make sure that root is actually the root if the layer tree.
(P.S. I have found a lot of answers that describe how to add layers to a group, but I couldn't find this)
P.S. The ensure_group function just creates groups and subgroups if needed, I didn't think I should paste the code since the problem occurs when it isn't called.


texts: How to count raster pixels inside a vector/polygon layer in QGIS?

texts:
I have a binary raster (two classes) and I would like to count the pixels of each class contained in a polygon.
My goal is to know the amount of pixels of each class of the raster contained in the polygon. So I can then calculate the percentage of each class.

I cannot vectorize/polygonize the raster, because its so huge and it takes so long. Also using clipper function to extract a new raster from the polygon is not optimal, as I have lots of polygons...

Is there any plugin or something, that can tell me that the area selected by the polygon has X amount of pixels/values of each class? I just want to know the amount of white and black pixels in the selected area!

EDIT: Ive thought that I can use ZonalStatistics plugin, to count all pixels in the polygon. then, extract with raster calculation one of the pixels, and then use ZonalStatistics count again to count the remaining pixels.

However, how can I delete in a binary raster (values 1 and 2) all pixels of value 1 (set them to nodata)?


texts: Merging multiple polygons to one polygon in shapefile

texts:
How to merge multiple polygons to one polygon in the shapefile using openlayers and geoserver.

ie in the portal if user selects the multiple polygons in the same boundary, it has to merge as a single polygon

As shown in the figure below


texts:
I need to use GRASS GIS to digitize vectors and do further analysis.

Until now I only know how to import layers and change their characteristics (color). I want to create a square vector on the map so that I can do some simulations on it (e.g. to obtain a temperature map, ...).

I have four days to be an expert in GRASS GIS, if there is anyone who can help me I will gladly accept his help.


texts:
I am trying to draw a glow arrow in Cesium. In the Cesium examples they show how to draw polyline as glow polyline or as arrow by set material.

How can I combine more then one material so I will be able to draw a polyline that will be shown as glow arrow?


texts: Identifying duplicate attributes using ArcGIS Desktop?

texts:
I am trying to identify and flag exact duplicate attribute labels (text) in a field. I can't access "Delete Identical" with my Standard ArcGIS license.

I have ET Geowizards installed, they have a tool that removed duplicates with exact the same shape. tried to run it and then select by location between the output and the input, but it doesn't work properly.

I don't have an FME license and need to do this with ArcGIS Desktop.


texts: Building Floor Plan map using OpenLayers and json

texts:
How to show map of building floor plan using OpenLayers and json.
moreover, i want to know that how to change features dynamically with zoom based from json files. Let's take example,

Initial the polygon of building feature shows then,
second zoom, detailing map with more features like sitting arragement with desk and chairs, then
third zoom, more detailing with attributes of each sitting arragement.

Above mention zoom level have different type of symbology of each.

How to make this, pl. help me on this..

Regards
GIS User


texts: Creating a a multiple-polygon shapefile from CSV

texts:
ID,X,Y
1,-79.378,42.2
1,-79.34,42.252
1,-79.338,42.206
1,-79.413,42.18
2,-79.637,42.26
2,-79.735,42.262
2,-79.731,42.163
2,-79.619,42.124

This is my CSV File. I need to convert this to a feature class that contains 2 polygons. I have access to ArcPy and ArcMap. I will include the code that I have been trying to use, but haven't had much luck yet. Any Ideas?

import csv
import arcpy

csvfile='C:\\Users\\Tables\\Table.csv'
outpath= 'C:\\Users\\Folder
outshp='test52.shp'

outshp = arcpy.CreateFeatureclass_management (
    outpath, outshp, geometry_type='POLYGON',
    spatial_reference=arcpy.SpatialReference(4326))

arcpy.AddField_management(outshp, "ID", "LONG")

with open(csvfile) as csvfile, arcpy.da.InsertCursor(outshp, ['X, Y']) as cursor:
    csvreader = csv.reader(csvfile, delimiter=',')

    #Skip header row
    next(csvreader, None)

    for id, coords in csvreader:
        coords = [('X', 'Y')]
        print "Polygon creation successful!"
        cursor.insertRow([id, coords])


texts: I am using a non-ESRI outside source to synchronize to some domains in the ESRI arcmap.  Would I need to synchronize to matching coded values stored in the armap fields or can i synchronize to and using the descriptions of those coded values?


texts: How to scale, rotate and translate a KMZ file in Google Earth

texts:
I'm a GIS software developer. I would like to adjust manually a KMZ over Google Earth images scaling, shifting and rotating it.

What I'm wondering is a tool like the one in Google Earth to add a raster overlay, but to apply to KML/KMZ polygon, polyline and point tags.

Is there a software to edit KMZ file in this way (elements multiselection and apply scale, shift and rotate)?

Is there a software to import a KMZ, edit it in this way and export again in KMZ?

Or I'm also thinking to develop something myself, but I really don't know where I can start from (Google Maps API?)


texts:
I have a .csv containing the name, longitude, and latitude in the first, second and third column, respectively. Longitude and latitude are in decimal degrees in WGS 84. However, if I try to plot these on a Plate Carree basemap, they all show up at at the intersection of the 0 meridian and the equator. I've tried some other projection but no luck so far.
I need to convert the data to a shapefile to use in a different software afterward.


texts: Is it possible to reproject spatial data using SQL Server?

texts:
SQL Server takes an SRID when creating spatial data, but is it possible to retrieve with a different SRID translating the coordinates?

For example, let's say I have a bunch of spatial polygons using SRID 4258, but I'd like to use alongside some pre-existing data that has an SRID of 4326 -- are there built in conversions, or do I have to handle this conversion myself?

The SQL-MM method, which PostGIS implements is ST_Transform. How do I do that in SQL Server?


texts:
I'm using leaflet to display a map.  I have a control section that I'd like to be open by default, but I can't find a way to do it through the API.
Is there a way to do this?


texts: Displacing points by random distance and direction

texts:
I have a shapefile of points representing households in a household survey.
In order to conceal their exact geographic location, I would like to displace these points in a random distance (uniform distribution over 0-2km) and a random direction (uniform distribution over 0-360 degrees).
How can I do this in QGIS?
Although displacing on the x- and y-axis independently creates a random direction, displacing by 2000m on the x and 2000m on the y would lead to more than a 2000m displacement in total. I thought about displacing up to 1414.2135m on both axes, but I wasn't convinced this would generate a uniform distribution over distance (I could be wrong, but I thought it would more likely create smaller distances).
The workaround I came up with was to create a random degree using the field editor rand(0,90) and a random quadrant using rand(1,4). Then I created a random distance using rand(0,2000). Let x* be the displaced x-coordinate of original point; similarly, y* is the displaced y-coordinate of the original point.
In quadrant I : x*=x+distance*sin(degree) and y*=y+distance*sin(90-degree)
In quadrant II : x*=x-distance*sin(90-degree) and y*=y+distance*sin(degree)
In quadrant III : x*=x-distance*sin(degree) and y*=y-distance*sin(90-degree)
In quadrant IV : x*=x+distance*sin(90-degree) and y*=y-distance*sin(degree)


texts:
I`d like to create a Hex Grid using Hex grid algorithm for PostGIS (https://medium.com/@goldrydigital/hex-grid-algorithm-for-postgis-4ac45f61d093)

DO $$
DECLARE
  _curs   CURSOR FOR SELECT geom3857 FROM nrw;
  _table  TEXT     := 'nrw_hx_10k';
  _srid   INTEGER  := 3857;
  _height NUMERIC  := 10000;
  _width  NUMERIC  := _height * 0.866;
  _geom   GEOMETRY;
  _hx     GEOMETRY := ST_GeomFromText(
                        FORMAT('POLYGON((0 0, %s %s, %s %s, %s %s, %s %s, %s %s, 0 0))',
                          (_width *  0.5), (_height * 0.25),
                          (_width *  0.5), (_height * 0.75),
                                       0 ,  _height,
                          (_width * -0.5), (_height * 0.75),
                          (_width * -0.5), (_height * 0.25)
                        ), _srid);

BEGIN
  CREATE TEMP TABLE hx_tmp (geom GEOMETRY(POLYGON));

  OPEN _curs;
  LOOP
    FETCH
    _curs INTO _geom;
    EXIT WHEN NOT FOUND;

    INSERT INTO hx_tmp
      SELECT
        ST_Translate(_hx, x_series, y_series)::GEOMETRY(POLYGON) geom
      FROM
        generate_series(
          (st_xmin(_geom) / _width)::INTEGER * _width - _width,
          (st_xmax(_geom) / _width)::INTEGER * _width + _width,
          _width) x_series,
        generate_series(
          (st_ymin(_geom) / (_height * 1.5))::INTEGER * (_height * 1.5) - _height,
          (st_ymax(_geom) / (_height * 1.5))::INTEGER * (_height * 1.5) + _height,
          _height * 1.5) y_series
      WHERE
        ST_Intersects(ST_Translate(_hx, x_series, y_series)::GEOMETRY(POLYGON), _geom);

    INSERT INTO hx_tmp
      SELECT ST_Translate(_hx, x_series, y_series)::GEOMETRY(POLYGON) geom
      FROM
        generate_series(
          (st_xmin(_geom) / _width)::INTEGER * _width - (_width * 1.5),
          (st_xmax(_geom) / _width)::INTEGER * _width + _width,
          _width) x_series,
        generate_series(
          (st_ymin(_geom) / (_height * 1.5))::INTEGER * (_height * 1.5) - (_height * 1.75),
          (st_ymax(_geom) / (_height * 1.5))::INTEGER * (_height * 1.5) + _height,
          _height * 1.5) y_series
      WHERE
        ST_Intersects(ST_Translate(_hx, x_series, y_series)::GEOMETRY(POLYGON), _geom);

  END LOOP;
  CLOSE _curs;

  CREATE INDEX sidx_hx_tmp_geom ON hx_tmp USING GIST (geom);
  EXECUTE 'DROP TABLE IF EXISTS '|| _table;
  EXECUTE 'CREATE TABLE '|| _table ||' (geom GEOMETRY(POLYGON, '|| _srid ||'))';
  EXECUTE 'INSERT INTO '|| _table ||' SELECT * FROM hx_tmp GROUP BY geom';
  EXECUTE 'CREATE INDEX sidx_'|| _table ||'_geom ON '|| _table ||' USING GIST (geom)';
  DROP TABLE IF EXISTS hx_tmp;
END $$;

When I try to use the function, I get the following error:

ERROR:  function generate_series(numeric, numeric, numeric) does not exist
LINE 5:         generate_series(
                ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
QUERY:  INSERT INTO hx_tmp
      SELECT
        ST_Translate(_hx, x_series, y_series)::GEOMETRY(POLYGON) geom
      FROM
        generate_series(
          (st_xmin(_geom) / _width)::INTEGER * _width - _width,
          (st_xmax(_geom) / _width)::INTEGER * _width + _width,
          _width) x_series,
        generate_series(
          (st_ymin(_geom) / (_height * 1.5))::INTEGER * (_height * 1.5) - _height,
          (st_ymax(_geom) / (_height * 1.5))::INTEGER * (_height * 1.5) + _height,
          _height * 1.5) y_series
      WHERE
        ST_Intersects(ST_Translate(_hx, x_series, y_series)::GEOMETRY(POLYGON), _geom)
CONTEXT:  PL/pgSQL function inline_code_block line 27 at SQL statement
********** Error **********

ERROR: function generate_series(numeric, numeric, numeric) does not exist
SQL state: 42883
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Context: PL/pgSQL function inline_code_block line 27 at SQL statement


texts: PyQGIS - QgsProcessingParameterFeatureSink, Why is user input required?

texts:
I'm working with a QGIS plugin widget and I have a box which creates a temporary table as an output. I've created the box using the QgsProcessingParameterFeatureSink class. Here is how I created my box in the initAlgorithm and created a feature sink in the processAlgorithm:

class EstimateEcosystemServiceValuesForStudyRegion(QgsProcessingAlgorithm):
    OUTPUT_ESV_TABLE = 'OUTPUT_ESV_TABLE'

    def initAlgorithm(self, config):
        self.addParameter(
        QgsProcessingParameterFeatureSink(
            self.OUTPUT_ESV_TABLE,
            self.tr("Output ESV Table")))

    def processAlgorithm(self, parameters, context, feedback):
        #I created the output_esv_table_fields in another part of the code
        (sink, dest_id) = self.parameterAsSink(parameters, self.OUTPUT_ESV_TABLE, context, output_esv_table_fields)

This box creates a (temporary) output table, which I put some data into. The plugin only works if the user leaves this box empty. If I try to specify a name I get the following unknown error:

Line 284 in my code is this line from the above code example:

(sink, dest_id) = self.parameterAsSink(parameters, self.OUTPUT_ESV_TABLE, context, output_esv_table_fields)

This unknown error doesn't tell me much about how to fix it. Also, it is bad from a User Experience perspective to have a widget box which you must leave empty. So I tried removing the box completely.

Now when I run the widget (with this box removed), QGIS just crashes. It seems I must declare an output parameter for this feature sink object, but I am confused because the user doesn't input anything in the widget box.

Can I remove the feature sink box, but still produce this table as an output?


texts: Where are decoration (scale bar, etc) plug-ins in QGIS 1.8?

texts: For QGIS 1.8 what happened to the "Decorations" (North Arrow, Scale Bar, etc.) plug-in (for the canvas, not composer)?


texts: How can I calculate community populations with CIESIN / Facebook's new High Resolution Settlement Layer data?

texts:
Facebook's Connectivity Lab and the Center for International Earth Science Information Network (CIESIN) have released map data which offers unprecedented resolution in terms of population mapping.  By combining the data with mobile network coverage maps and using the Zonal Statistics function in QGIS, I have been able to calculate the unserved populations in target countries.

However, what I would like to do, is use the HRSL data to calculate the existence of communities above a threshold of population X within a given radius Y. This would allow governments and operators alike to identify viable communities that require access to communication. Does an algorithm like this exist?  Can someone help point me in the right direction?

The ideal output would be a number of polygons each with a population associated with it.  I would like to be able to experiment with different values for X and Y.  Perhaps radius is the wrong variable, square kilometres would be another possibility.

An solution that is implementable with Open Source tools is a requirement.


texts: Coordinate Bar Units in BC Albers (EPSG:3005) - QGIS 3.10

texts:
I am having some confusion with the coordinates bar in QGIS (3.10). Please correct me if I am wrong.
If using BC Albers (EPSG:3005) coordinate reference system (units are meters), the two values in the coordinate bar describe a distance in meters from a point.
e.g. A coordinate of 1047184,501563 should be (roughly middle) of Vancouver Island

Where is this being measured from? (Reference point?)
Which direction are we moving? (East then South?)
How did you find this information?


texts: Can ArcMap display the individual dimensions of a polygon?

texts: I'm working with parcel data to get the dimensions of each lot to correspond with known dimensions.  Is there a way to display the individual lengths of each line comprising the perimeter of a polygon?  In other words, is there a way to display the distance between each vertex of a polygon in the map while editing?


texts: Converting 1-D line features to 2-D polygons W/O editing manually

texts:
I have a line file of airport runways across my state. I'm looking to symbolize them as part of a thematic town parcel layer, so I'd like them all to be in 2-D. My problem is, some bigger airports (that is, an airport with more than one landing strip) have lines bounding the landing strips, while smaller ones are just straight lines. Further, when I go to polygonize my line layer, the tool leaves behind everything it sees as 'unpolygonizable".

before:

&after:

Is there a way to polygonize the entire layer WITHOUT having to manually edit every single feature? There are more than 200 of them...


texts: Error when trying to publish map on QGIS Cloud

texts:
So when I try to publish a map with plugin " QGIS Cloud " I get this error which you can see on picture down below, anyone have solutions how to fix it?
P.S. I am using QGIS 3.4

UPDATE After trying 1st SOLUTION i get this error :

Last error i get is this one :

It happens after some time after processing Upload Data to QGIS Cloud


texts: Adding .bil raster file to GeoServer and viewing it on GeoServer or GeoNode

texts:
Ok so my Boss gave me this job. Uptil now i was working on ESRI products and this is my first venture into OpenGEO.

He has given me a link, http://www.worldclim.org/current, from where i need to use the 10 arc minute Bioclim raster which are in .bil format and add them to GeoServer. I am absolutely clueless how to do that?

Pls help me


texts:
I wonder if it is possible to add new styles to a QGIS style qml file with categorized values programmatically.

I have for example a large qml style file and want to add a new definition for polygons to the existing file. The style of the polygons should be defined with a color and border color.

Is this with pyQGIS possible or are there any tutorials?


texts: Analyzing Flow direction in Geometric Networks in ArcGIS

texts:
I have a task in ArcGIS which involves using Geometric Network and right now I am experimenting with Set Flow direction function from Utility Network Analyst toolbar in ArcMap. I've read section Flow direction in a geometric network from the help but there is some unclear for me things left.

I want to clearly understand how this function is working in ArcGIS. So, I've:

Created two feature classes in common feature dataset: one polyline pipelines and second - point water_obj (there will be junctions, sources and consumers).
Created Geometric Network, added there these two feature classes. For water_obj I have stated possibility to set Source/Sink.
Established connectivity rules:

pipelines can connect to water_obj and set it to default.
pipelines can connect to other pipelines via water_obj.

Result of my connectivity rules looks like:

Then goes my testing...

STEP1

Trying to draw some example edges and click Set Flow direction button:

Having Indeterminate flow and this is predictable.

STEP2

Change one junction to Sink:

This is also OK and corresponds to documentation.

STEP3

Change one more junction to Sink:

This one actually I can't understand.

STEP4

Trying to add source:

Nothing changed.

QUESTION

Finally I need to create a utility network with many consumers (connected houses to water net).

How can I correctly create it in order to be able to use Set Flow direction? I am trying to avoid custom programming of flow direction if it will be possible.

Can anybody point me into right way?

PS the final network should look like:


texts:
I'm trying to set the SET DATABASE_URL for pg_tileserv in the cmd terminal using:
DATABASE_URL=postgresql://postgres:[password]@127.0.0.1:60999/pgr
which seems to be accepted. But when I start pg_tileserv.exe, the new terminal returns what's expected:
time="2021-02-21T14:45:09+02:00" level=info msg="pg_tileserv latest"
time="2021-02-21T14:45:09+02:00" level=info msg="Run with --help parameter for commandline options"
time="2021-02-21T14:45:09+02:00" level=info msg="Using database connection info from environment variable DATABASE_URL"
time="2021-02-21T14:45:09+02:00" level=info msg="Using config file: C:\\Program Files\\Pgtileserve\\config\\pg_tileserv.toml"
time="2021-02-21T14:45:09+02:00" level=info msg="Serving HTTP  at http://0.0.0.0:7800/"
time="2021-02-21T14:45:09+02:00" level=info msg="Serving HTTPS at http://0.0.0.0:7801/"
time="2021-02-21T14:45:09+02:00" level=info msg="Using CoordinateSystem.SRID 3857 with bounds [-2.00375083427892e+07, -2.00375083427892e+07, 2.00375083427892e+07, 2.00375083427892e+07]"

except the Connected as... to database on pgadmin, so the web interface doesn't start up.
So I don't know why the database_url is not being set. I'm following this tutorial in Linux, which I'm not familiar with. It may be that the translating those commands to Windows is what's tripping me up. Or the tutorial is linked to a database on Crunchydata, and I'm trying to connect to PgAdmin.
I've tried different versions of the URL that remove the port/ change the host to localhost/ add the URL to the pg_tileserv.toml file in config/ remove the user and password.


texts: .openPopup() in Geojson data in Leaflet?

texts:
Why .openPopup() is not working in case of GeoJSON data in Leaflet? I want to use this as labeling in my map.

    ////////////// for Popup label
 function onEachFeature(feature, layer) {
    // does this feature have a property named popupContent?
    if (feature.properties && feature.properties.Name && feature.properties.Lat && feature.properties.Lon) {
        layer.bindPopup(feature.properties.Name+"("+feature.properties.Lat+","+feature.properties.Lon+")");
    }
}
/// for Show in map marker style and popup
    L.geoJSON(geojsonFeature, {
    pointToLayer: function (feature, latlng) {
        return L.circleMarker(latlng, geojsonMarkerOptions);
    },
    onEachFeature: onEachFeature

}).addTo(map);


texts: Displaying dynamic table in Data Driven Pages environment?

texts:
I am creating a map series that has many polygons per sheet. There is annotation for the polygons however some polygons are very small with no annotation for them (annotation would completely hide a polygon). Thus, I have an attribute table where labels are stored for those specific polygons.

How can I have that table displayed on the map, with only the attribute values per sheet, rather than all 2000+ values?

I am looking for a simple, dynamic solution.


texts: How do I define a bounding box within a WFS-request?

texts:
I need to get some data from via a WFS connection but due to the sheer size of the data, it takes for ever to load into Qgis or MapInfo.

MapInfo has a feature which allows you to restrict the wfs request to 'current mapper' and only get the data the are visible in the current window.

I know, that I am supposed to be able to define the Bounding box withing the WFS-url, but I can't get that working.

Is there anyone out there that knows how to do that?

I hope I made myself clear :)


texts:
I wrote a Vector layer to a spatialite file/db using the dedicated API tool, using  valid driver names supported formats by OGR. When connecting to that db, I can't retrieve properly the geometry objects when using SQL command over the created db (other regular SELECT/INSERT/... SQL commands are perfectly working)

Creating the Spatialite File using API Tool

QgsVectorFileWriter.writeAsVectorFormat(layer, layer.name() + ".sqlite",
                                                        "utf-8", None, "SQLite")

I noticed it gives a default "GEOMETRY" name to the geometry column within my table

Then, when trying to execute some SQL comman over that file:

from pyspatialite import dbapi2 as db

db_filename = 'db.sqlite'
conn = db.connect(db_filename)
c = conn.cursor()
ex = c.execute

rs = c.execute('SELECT sqlite_version(), spatialite_version()')
for row in rs:
    msg = "> SQLite v%s Spatialite v%s" % (row[0], row[1])
    print msg

rs = c.execute('SELECT IsValid(GEOMETRY) FROM table LIMIT 10' )
for row in rs:
    msg = row[0]
    print msg

returns:

SQLite v3.7.17 Spatialite v3.1.0-RC2

-1 for every selected row, which mean that the geometry is invalid. Other function such as AStext(GEOMETRY), etc return None or various error code

Of course, if I reload that file wthin Qgis using the API command, geometry is correct.
I suspect I misunderstand what QgsVectorFileWriter is actually doing, please advice.

(note: I'm using GDAL 1.9)


texts: Reprojecting .shp layer in QGIS3 to current CRS not working

texts:
Working in QGIS for the first time and I currently have a map that has all my points and polygons in the correct places. However, my polygons are projected in EPSG:3726 and my points are currently projected in EPSG: 4269.

Where I am running into an issue is that 4269 works in degrees not meters so I can't build buffers around my points without issues. When I change the projection of my points to match the projection of my polygon the points move WAY far away from where they were and are useless. What am I doing wrong?


texts: Building geometry in ArcPy from a table of coordinates and maintaining their attributes in the output

texts:
I've created polygons from a table that has two columns- an OBJECTID and a string of coordinates (Polygon_Coordinates). The resulting polygons (called "testing" in the code below) are in the correct locations, but I can't seem to figure out how to carry over the ID, which I need for a join later in the workflow.
Any idea on how to build geometry, but maintain the attributes? I'm working in ArcGIS Pro.
fields = ['Polygon_Coordinates', 'OBJECTID']

with arcpy.da.SearchCursor(table, fields) as table_cursor:
    for row in table_cursor:
        #skip null rows
        if row[0] != '-9999':

            #turn string of coordinates into a list but split them at the commas
            coords= list(row[0].split(','))

            #break up list into list of pairs
            pairs = [coords[i:i + 2] for i in range(0, len(coords), 2)]
            coord_ints = [[float(i) for i in p] for p in pairs]

            #create insert cursor for geometry creation
            geocursor = arcpy.da.InsertCursor(testing, ["SHAPE@"])
            array = arcpy.Array()

            #grab pairs from list, put into array
            for a in pairs:
                array.add(arcpy.Point(a[1],a[0], ID=row[1]))

            #set crs, build polygon
            wgs = arcpy.SpatialReference(4326)
            poly = arcpy.Polygon(array, wgs)
            geocursor.insertRow([poly])


texts: Decreasing resolution when exporting PDF with plugin in QGIS

texts:
I make a QGIS plugin to export PDF. However, the size of PDF is large and it takes a long time to open the file. Therefore, I want to export PDF with a small resolution.
How can I change the resolution?
Version of QGIS is "3.10.5-A Coruña".


texts: How to add Get Capabilties WMTS link from Geoserver to the map through Leaflet

texts:
I am new to web mapping and web in general.

I am trying to add the default WMTS Italy mosaic that can be found in GeoServer by default (nurc:mosaic, namely) to my map via Leaflet.

I tried to tweak following code: https://github.com/mylen/leaflet.TileLayer.WMTS

I get the WMTS link simply right clicking on GeoServer's Web Admin page WMTS 1.0.0 and copy the link location. Here it is: http://localhost:8081/geoserver/gwc/service/wmts?REQUEST=GetCapabilities

And here is my code:

    Demo leaflet.TileLayer.WMTS

// The WMTS URL
var url = "http://localhost:8081/geoserver/gwc/service/wmts?REQUEST=GetCapabilities";

var italy = new L.TileLayer.WMTS( url ,
    {
        layer: 'nurc:mosaic',
        style: "",
        tilematrixSet: "EPSG:4326",
        format: "image/png"
    }
);
var map = L.map('map').setView([37, 24], 4);

L.control.scale({'position':'bottomleft','metric':true,'imperial':false}).addTo(map);

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

var baseLayers = {
    "ItalyWMTS" : italy,
    "OpenStreetMap": osm
};

L.control.layers(baseLayers).addTo(map);

And this is my result:

What am I missing ?


texts: Adding laterals at connection using Water Utility Network Editing tool add in to ArcMap?

texts:
I am trying to use the Water Utility Network Editing tool add in using ArcMap 10.3.1 for the use of the add laterals at connection tool.

I am unfamiliar with adjusting config files but I have located the file and had a go at customizing it with my layer names.  So far I have been unsuccessful.

The point layer min_height_building_centre_2 I want to connect to the line layer Wastewater_pipe_09_01_2017

Here is a snapshot of the config file that I have adjusted.

 <!-- Begin Configuration for the Connect Closest Tools, this is an XML array of ConnectClosestDetails, you can specify any number of combinations -->
  <ConnectClosest>
    <!--start of entry-->
    <ConnectClosestDetails>
      <!--Point layer evaluated to connect to another-->
      <Point_Layer>min_height_building_centre_2</Point_Layer>
      <!--Line layer to connect the closest point to-->
      <Line_Layer>Wastewater_pipe_09_01_2017</Line_Layer>
      <!--The default editing template used to set the
      attributes of the new main-->
      <Line_EditTemplate>Wastewater_pipe_09_01_2017</Line_EditTemplate>
      <!--the distance to search for the closest feature-->
      <Search_Threshold>450</Search_Threshold>
      <Reset_Flow>Digitized</Reset_Flow>
    </ConnectClosestDetails>
    <ConnectClosestDetails>
      <Point_Layer>min_height_building_centre_2</Point_Layer>
      <Line_Layer>Wastewater_pipe_09_01_2017</Line_Layer>
      <Line_EditTemplate>Wastewater_pipe_09_01_2017</Line_EditTemplate>
      <Search_Threshold>450</Search_Threshold>
      <Reset_Flow>Digitized</Reset_Flow>
    </ConnectClosestDetails>
  </ConnectClosest>
  <!-- End Configuration for the Connect Closest Tools, this is an XML array of ConnectClosestDetails, you can specify any number of combinations -->

When I select the point features I am hoping to connect to the lines and press the Add Laterals at Connections tool, no lines are connected.

What steps have I missed or is there something further in the config file that I need to change?


texts: Fixing invalid connectivity in a geometric network dataset in ArcGIS

texts:
I've looked hard for answers to this and whilst there is a fair bit on geometric network datasets in ArcGIS, I'm yet to have found an answer to this question, so fingers crossed this is not a double post.

I'm researching river networks and need to construct simple, directed graphs that eventually will be generated by classifying rasters, conversion to shapefiles/feature classes and then collapsing rasters to channel centrelines (points and polylines).  The network effectively consists of channels (edges) connecting bifurcations and confluences (nodes).

I have built a geometric network from point and polyline feature classes and set connectivity rules for edges to connect to nodes/junctions and when I use the verify connectivity tool in the Geometric Network Editing toolbar it says "all network connectivity is correct".  However, when I use the validate feature tool in the standard Editor toolbar, I get a message that says "edge features cannot connect to edge features via junction features" (see below).  Does anyone know how to fix this problem?


texts: Using NNjoin tool for closest distance between multiple points and multilinestring

texts:
When I use the NNjoin tool to compute the distance between points (from an CSV file) and a multilinestring (from a shapefile) the tool creates the new layer, but in this new layer it does not take over the attributes of the points in the CSV file and indicates that the distance is 0. Does anyone have any tips on how to make the NNjoin tool work?

Step by step, this is what I've done:
1. I have started a new project and added a shape file with multilinestrings and a CSV file and projected both in EPSG: 4326 WGS: 84.
2. I have saved the CSV file as a shape file
3. Then I've tried to use both the NNjoin tool and the "match attributes based on nearest" to create a new layer, both times the program would run but not calculate any of the distances, but only contain one row from the CSV file with a distance of 0 calculated.

The outcome I am hoping for is a new layer with the attributes from the CSV file with an added column with the distance between the points from the CSV file and the closest located part of the multiline string.


texts: Creating points in QGIS without having to click through the confirmation dialog on every point?

texts:
I am creating a fictional map with lots of points to do some proximity analysis.  I would like to drop lots of points at semi-random, by just clicking over and over on the map.  However, with every click, I get a little popup (QGIS 3.6.3, Ubuntu 18.04) that asks me to confirm the autogenerated FID.

How do I do this without being bothered by the confirm box for every single point?


texts: I used wrap text on "~" and now I have two lines of text from one attribute field. Is there a way to center that and not just choosing center as the horizontal alignment? QGIS 1.8.


texts: Merging infomation from multiple layers in QGIS?

texts:
I am currently looking at a city map with property boundaries.

I have three layers of information, one is a polygon map showing the boundaries, one is a polygon map showing overlay information, and one is a point map with addresses.

Is it possible to filter the information using data from different layers?

i.e. show sites over 1000m2 (using the property boundaries layer) that are also contained within a certain overlay area (from the overlay layer).

I've looked into 'merge vector layers' and 'join attributes by location' tools but couldn't get either to work.


texts: My points are coincident in ArcMap unprojected, but jump off the line when projected as well as viewed in Google Earth, is this a projection issue?

texts:
Let me give you a run down of my workflow to better understand the problem. Essentially what I am doing is creating an elevation profile of a line in QGIS, taking the points out to do some spreadsheet stuff, recreating them as shapefiles in ArcMap, then exporting out the map document into a KMZ to send to someone else.

Put DEM and line into QGIS (unprojected, GCS_WGS_1984 coordinate system, the line I receive as a KMZ from the person so I do KML to Layer to make it into a GDB, it is unprojected as well, GCS_WGS_1984)
Use the elevation profile tool to generate points along the line at full resolution
Copy the points to Google Sheets / Excel
Use that to calculate the change in elevation
Use the sheet to sort points in order to increase the distance between points to do analysis at different intervals
Download CSVs of the different datasets
Make shapefiles from CSVs
Do some queries to find outlier points (drastic changes in elevation)
Export out outliers into their own shapefiles (unprojected)
Use Map to KML tool to produce a KMZ of outlier points that lay on top of the line

At first I thought this was because they were unprojected and because GE uses some sort of Mercator projection. To troubleshoot, I reprojected all of the points and the line into Web Mercator (auxillary sphere) and I get the same result. Tried with WGS UTM and same result as well. How is it that the points line up in ArcMap when unprojected (no on the fly projection) but as soon as one is applied, they jump off of the line?


texts:
Sometimes clicking on different features close to window boundary makes part of popup out of window's boundary.

layerInfoWindow = new InfoWindowLite(null, domConstruct.create("div", null, null, map.root));

How can I fix this issue?


texts: Extract raster layer data by attributes in RasterStacks R

texts:
I have a RasterStack with 2 raster layers of the same area, one from a SpatialPolygonsDataFrame (layer1) and another NDVI satellite image (NDVI).  layer1 has a series of polygons, each with various land-use attributes.

I am interested in using attributes in layer1 (those partitioning the layer according to various Factors), to query the NDVI layer.  I'd like to be able to compare different levels of the factor statistically, or graphically by boxplots or similar.  I'd also like to be able to add additional NDVI images, and compare across NDVI layers for the same Factors.

Is it possible to do this - which functions / packages should I look at?  extract() allows queries by separate Spatial objects, doesn't seem to allow query by attributes.  I haven't been able to find a solution on this site.

Clearly these operations can be done by using separate Raster and Spatial objects, but I suspect using a RasterStack would be more efficient.  Or is there another way altogether?


texts: How to create border around multiple polygons

texts: Spent hours on a search. No luck. I need to create a border around selected adjacent polygons. Concave Hull and Convex Hull don't give the desired results. It seems to be a simple request. The problem is when you deal with thousands of them. Please see before and after image attached.


texts: Is there a geodetic benchmark that is fixed with respect to plate tectonics?

texts:
I see that NGS benchmarks are used to monitor the movement of geologic plates.

Is one of the benchmarks assumed to be in a fixed location, with movements of all other benchmarks measured with respect to it, or are all benchmarks moving as a result of plate tectonics?


texts: Can I save a batch process as a default within a project?

texts:
I have a clip batch process saved as 'project-abc-clip.json' and would like it to be the default batch process for clipping when I open 'project-abc'

The batch is project specific so I don't need or want it to be the default for other projects.


texts:
I have a set of sentinel 2A images. I eliminated those that contained too many clouds, and then I created a cloud mask using cloud probabilities and Otsu thresholding method to eliminate cloudy pixels and replaced them with zeros (black pixels) as shown here:

I want to know if such an approach is valid and how can I use the before and after image (s) (time series) to interpolate pixels with zero values.


texts: Converting data from gml.gz to ESRI format

texts: I am using the Productivity Suite v3 Data Converter tool to convert Urban Paths (from OS Master Map ITN layer (UK)) from gml.gz format to ESRI format. However, there appears to be a bug in this application as it is impossible to select the Urban Paths layer within OS Master Map ITN. Also, none of the windows displays properly. I have uninstalled and reinstalled Productivity Suite v3 but the tool still doesn’t work. I have used it in Productivity Suite v2.1 with no problems but now that I have ArcGIS v10.1 I am stuck with Productivity Suite v3 as v2.1 isn’t compatible with ArcGIS v10.1. InterPOSE doesn't work for my data and Interpose is unable to provide technical support as I am a PhD student and get the software free. Are there other ways to decompress and convert gml.gz data to ESRI format? I hope you can help. Many thanks.


texts: saga & grass configuration in sextante (ubuntu)

texts:
I have some trouble in running saga and grass algorithms in sextante. When I double click it appears a pop-up saying:

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

I read the documentation, but i didn't understand what I have to do.


texts: Why does "arcpy.FeatureClassToFeatureClass_conversion” Remove the Target Feature Class from the ArcMap Project TOC (Arc 10.2.2)?

texts:
I have a script that successfully converts CSVs to Feature Classes.  The only problem is that the final line is causing my target feature class to be removed from the Table of Contents in the .mxd.

Code Snippet:

import arcpy
Source_CSV = r"\\int.ec\Data\Stations.csv"
Target_FC = r"Q:\Data\Stations.gdb\Stations"
Description = arcpy.Describe(Target_FC)
Target_FC_name = Description.name
Target_GDB = os.path.split(Description.catalogPath) [0]
Temp_Layer = "Temp_Layer"
SR = arcpy.Describe(Target_FC).spatialReference
Field_Mapping = """Muni "Muni" true true false 255 Text 0 0 ,First,#,Temp_Layer,Muni,-1,-1;LSName "LSName" true true false 255 Text 0 0 ,First,#,Temp_Layer,LSName,-1,-1;Lat "Lat" true true false 8 Double 0 0 ,First,#,Temp_Layer,Lat,-1,-1;Lng "Lng" true true false 8 Double 0 0 ,First,#,Temp_Layer,Lng,-1,-1;PercFlow "PercFlow" true true false 255 Text 0 0 ,First,#,Temp_Layer,PercFlow,-1,-1;OutLat "OutLat" true true false 8 Double 0 0 ,First,#,Temp_Layer,OutLat,-1,-1;OutLng "OutLng" true true false 8 Double 0 0 ,First,#,Temp_Layer,OutLng,-1,-1;AlarmSystemType "AlarmSystemType" true true false 255 Text 0 0 ,First,#,Temp_Layer,AlarmSystemType,-1,-1;CanOverFlow "CanOverFlow" true true false 255 Text 0 0 ,First,#,Temp_Layer,CanOverFlow,-1,-1;Address "Address" true true false 255 Text 0 0 ,First,#,Temp_Layer,Address,-1,-1;CSSPUrl "CSSPUrl" true true false 255 Text 0 0 ,First,#,Temp_Layer,CSSPUrl,-1,-1;Comment "Comment" true true false 8000 Text 0 0 ,First,#,Temp_Layer,Comment,-1,-1"""
arcpy.MakeXYEventLayer_management(Source_CSV, "Lng", "Lat", Temp_Layer, SR, "")
arcpy.AddMessage('Beginning Feature Class to Feature Class conversion...')
arcpy.FeatureClassToFeatureClass_conversion(Temp_Layer, Target_GDB, Target_FC_name, "", Field_Mapping)

I'm quite sure the problem is with the last line because when the print statement just before it prints my target FC is still there.  Seconds later I see it disappear from the TOC and the script ends successfully.

Here are my parameters.  Though you can't see it here the 2nd one is set to "Direction: Input".  Don't worry about the 3rd parameter, it's just used (successfully) in the validation script to auto-populate certain fields and variables.

The 4th parameter I recently added at the suggestion of MichaelStimson, but obviously I misunderstood something because now I get the following error:

ERROR 000733
New Feature Class: Same as input

I have since removed the 4th parameter.

Again, there's no problem with the execution of the script per se, I just want to know how to prevent my target FC from being removed from the map project.  Ideas?


texts: Catching signal when rule toggles (active/inactive) using PyQGIS?

texts:
I would like to catch a signal when a rule within a rule based layer toggles visibility. How to permanently check this

layer.renderer().rootRule().children()[0].active()==True

the same way we can receive a signal when a node in the layer tree toggles visibility:

layer= iface.layerTreeView().currentNode()
layer.visibilityChanged.connect(dosomething)

The problem is I cannot catch the visibility change on a rule.

To add more context:

The layer "SM_GIS pds_electricity < 10000" is a copy of "PDS Electricité <2000" but with other scale ranges.

(I will hide it for the user but that's not the question here).

What I want:
if I set the rule "Prosumer" to visible in one layer , I want it to be set to visible in the same rule of the other layer.

A workaround is to make copies of the same layer and use single symbol and applying each rule to a new copy of the layer.


texts: PyQGIS: how to delete layer from TOC when attribute table is closed?

texts:
I'm developing plugin where I want to be able to edit non-spatial table inside the attribute table dialogue. As it seems that the only way to do so is to add this table to the TOC first, I do so. But it is pointless to keep this table inside the TOC after the editing is done and the attribute table is closed. I would like to remove table from TOC right after the attribute window is closed. Is there a way to catch the signal from the showAttributeTable() when it is destroyed? Or is there a way not to add table to TOC in the first place?

Here is the code that I use:

def qgisOpenTable(self, layer_name, schema, table, geom_column=None, subset=None):
      '''
      Opens table in QGIS attribute table window
      '''
      uri = QgsDataSourceURI()
      uri.setConnection(self.server, self.port, self.db_name, self.login, self.password)
      uri.setDataSource(schema, table, geom_column, subset)
      vlayer = QgsVectorLayer(uri.uri(), layer_name, "postgres")
      QgsMapLayerRegistry.instance().addMapLayer(vlayer)
      layer_id = vlayer.id()
      i = iface.showAttributeTable(vlayer)

      # I would like to have something like this:
      i.destroyed.connect(QgsMapLayerRegistry.instance().removeMapLayer(layer_id))

The only workaround that came to my mind is to remove table after some time, but this is suboptimal.


texts: Finding ObjectClassID of feature class in file geodatabase?

texts:
Where do I find the ObjectClassID of a feature class in an ESRI GDB?

I am asking as I am writing a script with arcpy to delete a topology rule and need to know the ObjectClassID of the associated feature classes. I feel like this should be simple but I have found no online documentation from google.


texts: Finding overlap and sum of rasters using ArcGIS ModelBuilder?

texts:
I have about 300 rasters that I need to find the overlap and sum of to find 'hotspots'. I set each raster value to 1 and used the Mosaic to New Raster tool to create a new raster. I tested this with two files (test), the test raster has a value of 2 where the other two rasters overlapped.

How do I manage to find all the overlapping rasters and add them together in ModelBuilder?


texts: How to change the function of cost of osm2po?

texts:
As the column 'kmh' shows speed limits wrong for my city, and I didn't want to modify the configuration file of osm2po for each type of road, is there a way to change the cost function? I wish:

cost= length

and not

cost= length/kmh


texts: Changing Visible Field Properties on Multiple Layers at once in ArcGIS Desktop?

texts:
I am new to using ArcGIS 10.0.

I have a map with a layer dealing with electrical primary circuits, that I split into multiple layers based on their unique circuit value.

Is there a way of changing which fields I want visible for all my layers at once?

Since I split the initial Primary Circuit layer, I now have about 120 layers to work with.

I tried changing the visibility of the fields in the initial Primary Circuit layer, but when the layer was split into all of the individual circuit layers, all of the fields turned back on.


texts:
If I have a multi-part polygon layer and apply labels with every part of multi-part features and then try to place those labels, they all get placed in the same location.

How can I place each duplicated label for each multi-part feature separately?


texts: errors when creating for loops for KDE in GME

texts:
I am trying to create kernel density estimates for bird territories over a number of years. So I have all of the x,y coordinates that mark the locations of each bird in my spreadsheet, and columns for Year and Bird ID. I want to create a kernel density estimate for each bird's territory each year - some birds have returned in multiple years and established territories, so I need a KDE for each bird, each year. I can get it to work doing it one at a time, but that would be time consuming and unpleasant with 100's of unique combinations of Bird ID and Year to go through, so I have been trying to batch automate it and am running into trouble.

This is what I put in the command text on the GME GUI:

inpath <- ”V:\shapefiles\”
outpath <- ”V:\shapefiles\”
for (i in 1:44)
   { for (j in 2009:2015)
       { kde(in=paste(inpath, ”Master6.shp”),
            out=paste(outpath, ”kde an”, i, ” m”, j, ”.img”),
            bandwidth="SCV",
            cellsize=0.000168,
            where=paste(”Bird ID=”, i, ” ANDYear=”, j));
        };
    };

This is the output and error I get:

inpath <- "V:\shapefiles\"
outpath <- "V:\shapefiles\"
for (i in 1:44);
kde(in=paste(inpath, "Master6.shp"),
out=paste(outpath, "kde an", i, " m", 2009, ".img"),
bandwidth="SCV", cellsize=0.000168,
where=paste("Bird ID=", i, " ANDYear=",   2009));

  Error: The default input/output working folders have not been
  specified, therefore not enough information has been supplied to open
  the specified data source

  Error: Could not open input point data source.

I'm new to GME.


texts: Unable to create object class extension COM component?

texts:
I'm getting the error:

  Unable to create object class extension COM component

in ArcMap 10.2 when trying to open feature classes from old geodatabases.

I'm also getting "error repairing the layer" when trying to open other feature classes from the same old personal geodatabases.

Any ideas how to fix this?


texts:
I want to do projection from UTM/oblique mercator CRS to WGS84. And I know the solution to use a proj.4 string in commandline like+proj=omerc +lat_0=51.4 +lonc=7 +alpha=-10 +k=1 +x_0=0 +y_0=0 +gamma=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs

However, I wonder if there is a way to do such transformation using plain code. I have configured the gdal jar for my eclipse and want to use the java bindings to do such transformation. From the OGR projection tutorial,I know how to define a Geographic Coordinate System and projected Coordinate Sytem with OGRSpatialReference class. I know how to define a transformation using OGRCoordinateTransformation class. But the only thing missing there is the possibility to customize my source UTM. I don't know how to set the lon,lat of my orgin point. I also don't know how to set the oblique angle. There seems to be no such pre-built method in the classes.

Anyone can give me some hints?


texts: Removing pixels in band using an inequality in Google Earth Engine?

texts:
My current code:
https://code.earthengine.google.com/5ff735e22e894a6c1b5ddc628cfccae7

I have an inequality from line 99-106.  I want this inequality to assign a value of 1 to all pixels that satisfy the inequality and remove all pixels that do not satisfy the inequality to be removed entirely.

At the moment, it creates a binary image where pixels that are less than the threshold have a value of 0 and pixels that are greater than the threshold have a value of 1.

I have set an image to automatically display for testing purposes (black = 0, teal= 1.  I ultimately want to have the displayed image on have teal that will change in extent as the inequality threshold changes.


texts: Cloud-based WMS service: transactions estimator?

texts:
My organization is quite a medium-large organization (5,000 employees) and is facing some severe budget cuts. Resources are sparse and we are looking at using cloud-based service for our Base-mapping tiles as we do not have the resources to update and cache base-maps internally, let alone regularly.
The cloud-based services look appealing due to the fact that data management is done elsewhere and base-maps are always up-to-date without us having to do anything.
Of course it comes at a cost, and the cost varies based on number of usage / tile transactions per year.

At the moment, GIS usage is limited to a certain number of staff within the organization and is only desk bound. We are rolling mobiles and will allow all our staff to access our web-mapping applications, so usage will probably dramatically increase. I have no idea how I can work out the oragnisation's yearly usage in order to build a business case to procure such a service or even compare it with paying consultants to create a cache for us and internally serve it.

Is there a way of estimating the tiles used based on the size of the area my organization cover and the number of staff??
I can't find a tool which helps calculate that. Does anybody know of a good methodology?


texts:
I am using Geopy. I get following error for the code.

I have using the same code as on https://code.google.com/p/geopy/wiki/ReverseGeocoding

from geopy import geocoders

g = geocoders.GeoNames()
(place, point) = g.geocode("Palo Alto, CA 94306")
print place
>> "Palo Alto, US 94306"
print point
>> (37.418008999999998, -122.127375)

(new_place,new_point) = g.reverse(point)
print new_place
>> 3998 Ventura Ct, Palo Alto, US 94306
print new_point
>> (37.417850000000001, -122.12793000000001)

Works fine till print point. Error occurs with g.reverse(point)

Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "C:\Python27\lib\site-packages\geopy\geocoders\base.py", line 9, in reverse
    raise NotImplementedError
NotImplementedError

Any suggestions?


texts:
Using the working stuff reported here, I've written the following django model:

from django.contrib.gis.models import SpatialRefSys

class LandCover(models.Model):
    shp_name  = models.CharField(max_length=100)
    geom_srid = models.ForeignKey(SpatialRefSys)

But syncdb gives me this error :

[user@host]$ ./manage.py syncdb
CommandError: One or more models did not validate:
myapp.landcover: 'geom_srid' has a relation with model <class 'django.contrib.gis.db.backends.postgis.models.SpatialRefSys'>, which has either not been installed or is abstract.

Is there a way to solve this?


texts:
The default tolerance of PostGIS ST_Intersects query is "0.00001 meters" as indicated in the doc. I need to use the same query with another tolerance value but ST_Intersects takes only 2 input parameters (geom A and geom B).

Is there a way to change this default value?


texts: Find and replace single word in string using QGIS Field Calculator?

texts:
How do I find and replace a single word of a string?

e.g.
Calle Iparraguirre to Iparraguirre

I've tried:

replace( 'Calle\\s', 'Calle\\s', '')

replace( "name",'calle','')

and all combinations of code, but nothing is working :/

*I've read other Q&A's but no result


texts: Robust formula to get row,column of raster given X,Y

texts:
I'm looking for a robust method to get the row and column of a pixel in a raster, given the coordinates of the origin and the cell spacing. This seems like a problem with an incredibly obvious solution, which I've tried implementing (for a column):

x0 = 8.5
dx = 0.1

function col(x) {
  return (int) ((x - x0) / dx)
}

However, this method frequently gives an incorrect column number because of floating point arithmetic issues. For example, with the origin coordinate and spacing shown above, the x values of 16.1 and 16.2 both return a column number of 76. In reality, the the x value of 16.2 should be in column 77.

Here is another example, using the raster package in R (which applies the same formula as above):

r <- raster(xmn=8.5, ymn=1.6, xmx=16.4, ymx=13.1, res=c(0.1, 0.1))
colFromX(r, seq(8.5, 9.5, 0.1))

This outputs the following:

1  1  2  4  5  6  6  7  9 10 11

This is wrong 40% of the time! So, the question: is there a robust formula to find a row/column number?


texts: Adding trailing zeros to specific records in my database

texts:
I created a model that automatically adds a field to a database and concatenates the values in two other fields (block & lot) to create my "pin" field called IDNUM. The problem is that when I download the tax assessment database, I'm losing trailing zeros in both the block and lot fields (ex: 70.10 is 70.1)

Is there a way within the model to analyze the fields before concatenation and add the trailing zeros? I don't have any control over how the tax assessment database is created so I'm looking for a way to streamline this process. Any information would be helpful!

# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# IDNUM.py
# Created on: 2017-11-28 11:49:18.00000
#   (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------

# Import arcpy module
import arcpy

# Local variables:
GISDATA = "G:\\ModIV\\GISdata.mdb\\GISDATA"
GISDATA2 = GISDATA
GISDATA3 = GISDATA2

# Process: Add Field
arcpy.AddField_management(GISDATA, "IDNUM", "TEXT", "", "", "", "", "NULLABLE", "NON_REQUIRED", "")

# Process: Calculate Field
arcpy.CalculateField_management(GISDATA2, "IDNUM", "[Block] & \"-\" & [Lot]", "VB", "")


texts: Error installing r.stream.basins on GRASS GIS 7.8.3 on MacOS

texts:
I am running GRASS 7.8.3 on MacOS 10.12.6. I have this error.

Fetching <r.stream.basins> from GRASS GIS Addons repository (be patient)... Compiling... clang: warning: no such sysroot directory: '/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot] In file included from basins_fill.c:1: In file included from ./local_proto.h:1: In file included from ./io.h:1: /Applications/GRASS-7.8.app/Contents/Resources/include/stdio .h:101:10: fatal error: '__config' file not found #include <__config> ^~~~~~~~~~ 1 error generated. make: *** [OBJ.x86_64-apple-darwin18.7.0/basins_fill.o] Error 1 ERROR: Compilation failed, sorry. Please check above error messages. (Fri Jul 10 10:53:13 2020) Command finished (3 sec)


texts:
I am in linux Mint 17.0

I am trying to develop a small application in Qt using libqgis library.

When I create a Class inherit from QgsMapCanvas, I get mistakes related with 'undefined references to...'

I have search the *.cpp files (e.g. qgsmapcanvas.cpp) and I haven't it.

I have installed libqgis-dev. I can found all the *.h files into the packet installed in /usr/include/qgis, but there aren't cpp files, and this is the reason that compilar is claiming.

And this is the question. ¿Where are the cpp files?


texts: I am using ArcGIS 10.4.1 which comes bundled with Python 2.7.10. I am aware of the fact that to install external python packages, one needs to install "pip". I already have "pip" as "pip" is pre-installed in Python 2.7.9 and in newer versions of Python. I have tried to install the Python module with the correct name "pykalman" from within Windows Command Prompt and not the Winows Python Interpreter. Still, I am getting errors as follows:


texts: Plotting sample stations upon contour line in QGIS?

texts:
I need to create point sample stations on two contour lines (-10m and -20m). What I'm intending to do is, put markers (circle with stroke) on the contour lines, with equal distance from one point to another. I'm also willing to add a specific amount of station (30) for a specific amount of area in the map.

Although I have been able to make contour of both elevation mentioned, I don't know how to plot the sample stations as markers on map. How can I do this? Or is there a better way of doing this?


texts:
I try to write a geoJSON from a shp with the fiona package.
Works, but fiona does not include the CRS information.

with fiona.open(path) as shp:
    takeCRS = shp.crs
    takeSCHEMA = shp.schema
    with fiona.open(str(newPath) + "someName.geojson", "w", driver = "GeoJSON", crs = takeCRS, schema = takeSCHEMA) as newFile:
        ....

Why is it leaving out the CRS information?!


texts: Alternate of intersects ?# operator in postgres

texts:
Is there any way to find if a path is intersecting with a box in postgres without using ?# or using an alternative?

I have this query below and hibernate's EntityManager is throwing an exception related to questionmark (?)

SELECT p.id, p.constraint_id, p.distance, p.height, p.coordinates, p.gtype, p.name
FROM geometry p
WHERE p.gtype='PolylineVolume'
AND path(polygon(box(point(15.740013406952562 - (180/pi()) * (p.distance/(6378137*cos(pi()*15.740013406952562/180))),46.97849625047054 - (180/pi()) * (p.distance/6378137)),point(16.007686681509206 + (180/pi()) * (p.distance/(6378137*cos(pi()*16.007686681509206/180))),47.07276572929793 + (180/pi()) * (p.distance/6378137))))) ?# popen(p.coordinates)


texts: How do I get the number of rows in an attribute table?

texts: In processing modeler in Qgis 3.14, how do I get the number of rows in an attribute table?


texts: Transferring mxd file from one system to another using ArcGIS Desktop?

texts:
When I transfer one mxd file from ArcMap 10.4.1 to another system, the file was added but I am not able to see content.  I am getting as per added pic name error.

What should I do?


texts:
I have some GeoTIFF files that I want to bring into the web.

The spatial reference of these GeoTIFF files are multiple but are never WebMercator (EPSG:3857) and I need the web map to be in the same projection system than the original image.

So, I intend to use Leaflet with the Proj4Leaflet plugin to set a custom projection.
Then, I need a software to generate tiles from a GeoTIFF in the same projection system than it.

Does anyone know what software could I use, knowing I have ArcGIS Desktop but not Server and I'm looking for a freeware solution?


texts: Updating polygon with attribute from ALL intersecting polylines in ArcGIS for Desktop?

texts:
I have a polyline layer with road information such as the road it beings from and the road it ends at. Some of these are digitised incorrectly and I am trying to pull out the road name (or unique ID so I can look up road names later) of all roads that intersect a buffer of both the start and end node of the line.

For example:

The above highlighted polyline has two (including itself) sections intersecting the buffers at both the start and the end. Some will have >1 section (excluding itself) intersecting. Each polyline has a unique ID and I would like to update a field within the buffer to include all unique IDs intesecting it (followed by a unique character such as a "_" so I can later delimit it).

Is this possible within ArcGIS for Desktop?


texts: Extracting and summarize raster for a large polygon set

texts:
I have a large multipolygon (5x5km grids) file (1.23 million polygons) that I would like to exact raster data to each polygon. Specifically I want to calculate the fractal dimensions (a user defined function), Morans I (from the raster package), and the mean NDVI value of all the pixels that fall into each polygon.
The raster covers the extent of Australia. Each band has an associated date (919 total bands in the raster). Importantly, all polygons need only one specific band.
However, this loop takes such a long time (roughly 2 seconds per polygon). The crop command is what makes the loop run slowly. What is the best way to speed this loop up?
Below is the basic for loop
#adding column for final values to be returned
#spdf3_buffed is a sf object

spdf3_buffed$FractID <- 0
spdf3_buffed$meanNDVI$Moran <- 0
spdf3_buffed$meanNDVI <- 0

for (i in 1:nrow(spdf3_buffed)){
  print(i)
  spSubset <- spdf3_buffed[i,]
  BandNumber <-spSubset$BandNumber
  r <- raster(MODIS_raster_location,band=BandNumber)
  cropped_raster <- crop(r, st_bbox(spSubset))
  b <- as.numeric(fractalD(cropped_raster))
  c <- as.numeric(Moran(cropped_raster))
  layermeans <- cellStats(cropped_raster, stat='mean', na.rm=TRUE)
  u <- mean(layermeans)
  spdf3_buffed$FractID[[i]] <- b
  spdf3_buffed$Moran[[i]] <- c
  spdf3_buffed$meanNDVI[[i]] <- u
}

write.csv(spdf3_buffed,file="test.csv")


texts: How can I make integers on a join SHP file stay as INT and not as qlonglong?

texts:
So I've been trying to join a CSV file with a polygon SHP file and everytime I try to save the joint SHP into a new file it transforms the type from int to qlonglong and prevents me from using some other plugins.

Is there a way to prevent that conversion from happening or do I have to use the field calculator and convert each column to int?


texts: Graphical error while reprojecting Shapefile with QGIS

texts:
I'm trying to retroject Natural Earth's Shapefile of the world (Admin 0 – Countries on this page: https://www.naturalearthdata.com/downloads/10m-cultural-vectors/).

Here's the original Shapefile in QGIS 3.4.1:

Reprojected in Robinson World, centered at Long 0:

All seem good. However, when I try to reproject centred at a different longitude (say Montréal at -73.3), here's what happens:

The polygons aren't sliced at the edge of the new map, and the software is confused as to where polygons start and end.

What's a good way to deal with these problems?


texts:
I had a problem during post installation of ArcSDE for SQL server 2008, and this is the message :

The ArcSDE Repository was unsecessfully completed. would you like to view this error?
then when I click on OK, what appears is:

  Connection to sde failed(0)


texts: Determining search radius for proximity search in ArcGIS API for Java?

texts:
I am using Java's Esri-geometry-api, to find out given a point A the 50s nearest points within a radius of distance from the point A:

MultiPoint g = new MultiPoint()
GeometryEngine.getNearestVertices(g, new Point(0.283437724779, 52.9060144241), searchRadius, 50)

where the Point is in WGS84 coordinates. How do I calculate the searchRadius for a given distance from that point (for example 1 Miles or 1.6 Km)???


texts:
I am using the following select statement to enter the a record in a cartodb database.

INSERT INTO catch (
  site_code,
  have_catch,
  fishtype1,
  fishtype2,
  fishtype3,
  fishtype4,
  fishtype5,
  number_of_species,
  **catch_date**,
  fisherman_id
)
VALUES (
 '$siteCode',
 1,
 '$fishtype1',
 '$fishtype2',
 '$fishtype3',
 '$fishtype4',
 '$fishtype5',
 $numbFish,
 **now()**,
 '$fishermanId'
);

The catch_date, created_at and updated_at dates being written is a day ahead if the actual date.  E.g. 2016-03-31 instead of 2016-03-30.

Any idea as to the cause?

This is a recent issue that seems to have started after I upgraded to the latest version of cartodb.js.

Also, the data is being written to a database in my cartodb cloud account.

I'm not sure as to the time zone.


texts: A way to find all footway and street interesections in openstreetmap

texts:
I would like to find all intersections of streets with highway=footway, that don't have highway=crossing tag added.

Right now I have a query:

[bbox:{{bbox}}];
way[highway]["highway"~"primary|secondary|tertiary|residential|unclassified|primary_link|secondary_link|tertiary_link|service"];node(w)->.n1;
way["highway"="footway"];node(w)->.n2;
node.n1.n2["highway"!="crossing"];
out meta;

Which works fine until it finds nodes that are not on intersections:

street changing to footway (street ends and a footway starts just
after it)
footway joining with street (footway ends on a street, so no crossing)

Basically I would need to have a way to find an intersection of two ways, such that both of the ways have nodes before and after the intersection - they should not end on the intersecting node.

Is there a way to exclude the above two cases somehow using overpass turbo? Or should I do post processing?


texts:
I am using QGIS for analysis of aerial images.

I have used the properties>style menu to create colour-banding for my raster map layer. This created 2 colour bands - but I want to convert these to seperate vectors.

Is it possible to do this - and do I require a plugin?

See below for screen grab:


texts:
I am using ArcGIS and arcpy to process some shapefiles.  When I try to use the function

arcpy.JoinField_management()

the program stops and Python says that the tool is not licensed.  This confuses me because the documentation for the tool does not ask for any special licenses.

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000065000000

An extract of my code and the error follow (the code is quite long but I run it ineractively to check it as I go).

import arcpy
arcpy.env.workspace = 'C:/Data/'
arcpy.CheckOutExtension('Spatial')
outZSaT = arcpy.sa.ZonalStatisticsAsTable('mb06.shp', 'MB_NUM', 'slope', 'sum_slope.dbf', 'DATA', 'SUM')
arcpy.JoinField_management('mb06.dbf', 'MB_NUM', 'sum_slope.dbf', 'MB_NUM')

Traceback (most recent call last):
  File "<pyshell#2>", line 2, in <module>
    workspace + '/sum_slope7.dbf', 'MB_NUM')
  File "c:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 3667, in JoinField
    raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000824: The tool is not licensed.
Failed to execute (JoinField).


texts: How to compute an interpolation raster from the python console in QGIS?

texts:
I am trying to add an interpolation layer based on an existing vector layer by using the Python Console (initially in the menu Raster/Interpolation), but can't find anything related in the documentation.

I saw the QgsIDWInterpolator in the API, but can't get it working. It seems it expects a list of LayerData but it doesn't work neither. Here my current code:

ld = qgis.analysis.QgsIDWInterpolator.LayerData
ld.vectorLayer = vlayer
ld.zCoordInterpolation = 0
ld.interpolationAttribute = 5
ld.mInputType = 0
ldlist = [ld]
itp = qgis.analysis.QgsIDWInterpolator(ldlist)

I get the following error for the last command:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: arguments did not match any overloaded call:
  QgsIDWInterpolator(list-of-QgsInterpolator.LayerData): argument 1 has unexpected type     'list'
  QgsIDWInterpolator(QgsIDWInterpolator): argument 1 has unexpected type       'list'


texts:
I try to insert same values in my table and I write this code:

String sql = "INSERT INTO points (gid, osm_id, name, type, geom)
         VALUES (?, ?, ?, ?,ST_GeomFromText('POINT(?, ?)', 2100));";
         pst = con.prepareStatement(sql);
         pst.setInt(1, 40001);
         pst.setInt(2, 2);
         pst.setString(3, "General");
         pst.setString(4, "Heller");
         pst.setDouble(5, 69.6);
         pst.setDouble(6, 80.3);

         pst.executeUpdate();

but is show me an exception

  org.postgresql.util.PSQLException: The column index is out of range:
  5, number of columns: 4.

If someone can help me.

Solved it by using:

pst.setString(5,"POINT("+lat+" "+log+")" );

"INSERT INTO points (gid, osm_id, name, type, geom)VALUES (?, ?, ?, ?,ST_GeomFromText(?, 2100));"


texts: ArcPy if part of string not in field, then delete row

texts:
I am able to use UpdateCursor to find and delete rows if a field contains part of a string (code below works). Now I want to do the opposite--if part of this string is not in my field, I want to delete the row. Is there a "not_in" function/syntax?

with arcpy.da.UpdateCursor(mySHP, ['OID@', 'Comments']) as cursor:
    for row in cursor:
        if 'this phrase' in row[1]:
            cursor.deleteRow()


texts: Quantum GIS Garmin Maps62 device and GPS utility - making a polygon for random point

texts: I have a Garmin GPSMaps62 unit and GPS utility. I have logged tracks and need to get these to load as polygon layers in Quantum so that I can then ask Q to give me random sample points and upload these back to the unit and use the find option. Any help in simple steps (I am learning) would be fantastic please. I am particularly struggling with getting the tracks downloaded to quantum via GPS utility to show as polygon layers.


texts: Adding contour values to Contour List tool of ArcMap?

texts:
I use ArcMap and I have a bathymetry raster (ESRI ASCII). I want to produce certain contours with the contour list tool

I put the negative values of contours (depths) but I get error 000859: The required parameter contour value is empty or is not the type of multiple value.

I have tried several formats (space between values, put them in brackets, square brackets) but nothing

Is there a problem due to the negative contours or I have to prepare in someway the list of values I want?


texts: Edit a layer by "ShapeLib C library" and "QGIS" at the same time

texts:
I want to edit a layer by "ShapeLib C library" and "QGIS" at the same time. It means there is two reader/writer on one file (blah1.shx , blah1.dbf , blah1.shp).

I added a layer (etc: "point1.shp") to QGIS project , then add a point to this layer by ShapeLib simultaneously. Finally I see this point is added in QGIS.

When I add a point in QGIS, after save it, previous point (which added by Shapelib) will be removed unexpectedly!

How can I solve this problem?


texts: When creating the Thiessen polygon for a X,Y co-ordinates. It is showing like this. When I set the extent manually I'm not getting the polygon properly.


texts:
I was applying a style and there was no validation error. But when I am about to press submit I am getting the following error

org.apache.wicket.WicketRuntimeException: java.io.FileNotFoundException: /var/lib/tomcat7/webapps/geoserver/data/styles/bangalore_poi_others.sld (Permission denied)

I am using geoserver 2.1.2 and apache tomcat 7.


texts: How to discard sites when there is overlap between buffers?

texts:
I have 1,000 sites in a landscape that were sampled along a road.
However, I think my sites are too close together. A lack of independence between my sites many be influencing my statistical models.

I would therefore like to select the maximum number of sites that don't overlap each other (500m buffers). I am using ArcGIS 10.2.

How can I do this?