texts: QGIS pyqgis custom/standalone script QSQLITE driver not loaded

texts:
I'm using PyQGIS/Python 2.7 on a Mac and trying to create a script (for the first time) which will read in a list of csv files and load them as layers. I'll want to define the style of the layers and then display them in the QGIS canvas.  I am at the beginning stages of writing my script, shown below, and am executing it line-by-line using ipython.  When I execute the app.initQgis() line, I get

    QSqlDatabase: QSQLITE driver not loaded
    QSqlDatabase: available drivers:
    ERROR: Opening of authentication db FAILED
    QSqlQuery::prepare: database not open
    WARNING: Auth db query exec() FAILED

and when I execute the app.exitQgis() line, I get

    ERROR: Opening of authentication db FAILED

Is this some error/warning I should be concerned with and how do I fix this? I do not get the above responses when I execute these lines in the QGIS console.

Here is my script so far:

import os
import sys
from qgis.core import *
import qgis.utils

app = QgsApplication([], True)
QgsApplication.setPrefixPath("/Applications/QGIS.app/Contents/MacOS", True)

app.initQgis()

csv_filename = "/myDataPath/modRes_All_d20141118_t1813404_e1815046.csv"
uri = csv_filename + "?delimiter=%s&xField=%s&yField=%s" % ("\t", "lon", "lat")
csv_layer = QgsVectorLayer(uri, "csvmodRes", "delimitedtext")
if not csv_layer:
   print "CSV Layer failed to load!"
QgsMapLayerRegistry.instance().addMapLayer(csv_layer)

app.exitQgis()


texts: Reconfiguring Sewer Network from Geometric Network (ArcMap) to Utility Network (ArcGIS Pro)

texts:
I've been creating sewer networks using geometric network in ArcGIS 10.8 but I am switching over to Pro soon. I am having trouble trying to re-configure the geometric network to utility network.
How do I go about doing that?
I tried looking for documentation but the Utility Network seems so intricate & I don't believe I have all the inputs for it.
My geometric network includes:

Pipes
Manholes
Pump Stations
Public Connections (sink)

The ultimate goal is to be able to trace upstream/downstream from anywhere along the system.
I want to be able to create the same "geometric network" using utility network.


texts: when placing a certain type of sundial one needs to point it at true north as apposed to magnetic or the other one.That being said if the meridian line of true north for the location in question is 112 degrees W do you use a compass and adjust 112 degrees W of magnetic north or what?


texts: Problem when calculating longitude and latitude for points

texts:
I have a PostGIS database with SRID=900913 (Google Mercator) and I would like to know the latitude and longitude of points.

I use this command:

ST_X(ST_TRANSFORM(the_geom,4283))

Following what is written here, but it doesn't work. I get the error:

ERROR: AddToPROJ4SRSCache: Cannot find SRID (4283) in spatial_ref_sys
SQL state: XX000.

I tried to add 4283 in the spatial_ref_sys:

INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) values ( 94283, 'epsg', 4283, '+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ', 'GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]]');

But I still have the same error.

What does that mean?


texts: Obtain County names (labels) for unlabelled polygons in R

texts:
I am working with a data example from the GWmodel package. The dataset is called USelect.

library(GWmodel)
data(USelect)
View(USelect2004)

USelect contains election outcome data at the county level from the 2004 US election as well as several census variables. Each county has an id number but hasn't been supplied with their county or even state names. The head of the data is below.

head(USelect2004)

 winner unemploy pctcoled PEROVER65 pcturban WHITE
1   Bush      4.1     11.0      17.2      0.0  97.2
2   Bush     13.3     12.0      12.6      0.0  75.5
3   Bush      9.4     12.1      12.9     14.1  90.0
4   Bush     10.5     12.0      14.0     12.3  75.3
5   Bush     13.4     12.0      14.9      0.0  93.5
6   Bush      8.8     13.3      13.4      0.0  95.2

Is there is a method to retrieve and apply such names/labels to this file? I would like to have labels so that I can do effective interactive mapping with Leaflet.

I am aware of the Geocode package but unsure if can do what I'm looking for.


texts: GRASS 7.4 addons look installed but not accessable

texts:
I'm tring to install the addon v.centerline using the GRASS GUI 'Fetch & install extension from GRASS Addons'.  I get the following message saying it's installed yet it doesn't show up.  I tried restarting GRASS and still no addon available.  Ultimately I'd like to be able to run it in QGIS 2.18 but just getting it working here would be nice.  I've tried other addons with the same result.

Downloading precompiled GRASS Addons <v.centerline>...
Downloading source code for <v.centerline> from <http://wingrass.fsv.cvut.cz/grass74/x86_64/addons/grass-7.4.0/v.centerline.zip> which is identified as 'remote_zip' type of source...
Updating addons metadata file...
Manual page for <v.centerline> updated
Installation of <v.centerline> successfully finished

error


texts: How to extract attributes of polygons at specific points into new point layer in PostGIS?

texts:
I am not very practiced in PostGIS. However, my volume of data forces me to use it. I have a large polygon layer containing several million polygons and a grid layer that has a point every 10 meters within the bounding box of the polygon layer (see picture). I now want to extract the attributes of the underlying polygon at each point into a new point layer. It should be an outer join where the point id from the original grid and all attributes from my polygon shapefile are added to the resulting point layer. I achieved this in R with a small test data set pretty easily and now need a PostGIS equivalent. My attempts so far have failed.

R version for little data set:

polygons <- st_read("polygons.shp")

grid <- st_read("grid.shp")

result <- st_intersection(polygons, grid)

My attempt so far in PostGIS which has failed:

DROP TABLE IF EXISTS result;

CREATE TABLE result AS
 SELECT a.geom AS ageom, b.geom AS bgeom,
        ST_Intersection(a.geom, b.geom) As intersect_ab
 FROM polygons a
   INNER JOIN grid b ON ST_Intersection(a,b)
 WHERE ST_Overlaps(a.geom, b.geom);


texts:
I'm trying to process the daily rainfall data provided by Jaxa

The documentation says that the format of the dat file (say: gsmap_nrt.20170514.0.25d.daily.00Z-23Z.dat) is: 4-byte float plain binary,little-endian

How can I read/process this data in QGIS or GDAL?


texts: Looking for an "introduction to photogrammetry" book with a well documented chapter on UAV

texts:
I would like to recommend a book for my students to learn the basis of photogrammetry. I've read "Introduction to modern photogrammetry", 2001, from Mikhaïl, Bethel and McGlone. Unfortunately, the field has evolved a lot since 2001. I've found only a few other books on the net, but I would really like to have a chapter including UAV photogrammetry (and if possible also LiDAR, but this is secondary).

Is there a photogrammetry textbook with a good chapter on UAV's ?

EDIT: my students are either following a master in Environmental sciences or professionals from different domains who want to learn more about GIS.


texts:
Imagine that I have collected a large set of GPS tracks of objects moving from A to B, and for the sake of simplicity assume they avoid obstacles in a consistent way, so that their path is just "noisy", but not very different.

Are there any algorithms that average those paths to a path that is "representative" of the path all users took?


texts: Why is number of entities displayed in Layers panel for particular layer different from actual number of entities in QGIS?

texts:
Why is the number of entities displayed in the Layers panel for a particular layer different from the actual number of entities?

The database used is "SpatiaLite" type.

Has anyone noticed this kind of problem so far?

The problem disappears if the data is saved as "shape" format.


texts:
i have a SHP file of a building converted from a DXF file. This SHP file is unprojected and have no specific coordinates (origin 0,0). I find WGS84 coordinates (lat, long) of this building from Google Maps.
My aim is to replace these coordinates to the SHP file on QGIS.
Could you explain the process step by step?

(I read lots of similar questions, about affine transformation. But i don't know the paramaters.)

What i ask is how to make this transformation in QGIS (step by step)?

SHP file coordinates (not projected)

Scale: 1:142.670.713

X1,Y1: 16.70824, 253.74534

X2,Y2: 1.03521,-6.34918

X3,Y3: 244.00248,-7.49189

Target WGS84 coordinates

X1,Y1: 41.047773, 28.896241

X2,Y2: 41.045452, 28.895929

X3,Y3: 41.045436, 28.899039

I need a second vector layer with coordinates.
I have just a SHP file of a building converted from a DXF file. That is not projected. I know where this building is, and can find the WGS84 coordinates from Google Maps. My aim is add WGS84 coordinates to this SHP file and export to replace the building on Google Maps.

My Questions are:

1) I think my SHP file has measurements in meters and unprojected. I have WGS84 lat long coordinates from Google Maps. How can i project this SHP file, for being ready to transformation?
Right Click -> Set Layer CRS -> Choose WGS84 EPSG: 4326.
Is this enough?

2) qgsAffine plugin just need transformation matrix paramaters.
But the answer of @Jochen Schwarze is a bit complex for me. Is there a online calculator? (Just give the source XYs and target XYs and calculate the parameters.)

I think, I have a projection problem before affine transformation.
I have a DXF file of a building from AutoCAD. I saved this DXF file as a SHP file in QGIS. But this SHP file is converted from a plain DXF file and is not referenced/projected, it is drawn from coordinates 0,0 in AutoCAD in meters. And the drawing has meters, WGS84 has decimal degrees.

When I set Layer CRS as WGS84 in QGIS, the coordinates don't change.

How can I project this SHP file as WGS84 in QGIS?


texts: ModelBuilder - Convert Empty line feature class to a point

texts:
I have a ModelBuilder to work as a tool.
The workflow is that buffer 30 meters in the rivers and then intersect with classification feature class (vegetation and production area) then the result is selected (only the production area) and is converted to "feature to line" and then "feature to point" but when the feature class resulted from intersection is empty I find a error and the tool does't run completly.
My wish is to run the tool to delivery even a empty feature class (point).


texts:
I'm trying yo execute the RastertoPolygon conversion tool in ArcGIs 10.1. I'm executing it through a for loop, then it resulted to an error (Unable to open feature class Failed to execute (RasterToPolygon)) at the python console. As I checked for some output, the first raster from the list is successfully converted to shp file while the rest are not. Any suggestions?
Note: (All of my rasters are already in integer data type)

    #import the module
    import arcpy
    from arcpy.sa import *
    from arcpy import env
    arcpy.CheckOutExtension("Spatial")
    env.overwriteOutput = True

    #set the workspace
    arcpy.env.workspace = r"C:\Users\Windows\Documents\JO_GIS_Analyst"

    #Get a list of rasters and convert to shapefile
    for raster in arcpy.ListRasters("nofpt*", "TIF"):
        print raster #check the presence of rasters"
        #convert the raster to polygon
        arcpy.RasterToPolygon_conversion(raster, raster +".shp", "SIMPLIFY")
    print "Finish converting the rasters to polygon"

the output of print is the name of my raster file, the first item on my list:

    nofptreprojected_2014121_geog.tif

the exact error message is:

    Traceback (most recent call last):
     File"C:\Users\Windows\Dropbox\PythonScripts\batch_convert_raster_to_polygon.py", line 22, in <module>
      arcpy.RasterToPolygon_conversion(raster, r"C:\Users\Windows\Documents\JO_GIS_Analyst\\" + raster + ".shp", "SIMPLIFY")
     File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\conversion.py", line 178, in RasterToPolygon
      raise e
     ExecuteError: ERROR 010157: Unable to open feature class C:\Users\Windows\Documents\JO_GIS_Analyst\nofptreprojected_2014121_geog.tif.
     Failed to execute (RasterToPolygon).


texts: QGIS Field Calculator provides incorrect answer when using the Maximum function

texts:
I'm using:

The field calculator in QGIS

I'm trying to:

Find the winner of each election

Problems:

When there there is NO WINNER in an election, the field calculator incorrectly picks the candidate in the column furthest to the left as the winner.
When there is A TIE in an election, the field calculator incorrectly picks the candidate in the column furthest to left as the winner.

Example:

+------------+----------------+------------+---------------+----------+
|  District  | Terry Tortoise | Harry Hare | Chuck Cheetah |  Winner  |
+------------+----------------+------------+---------------+----------+
| District 1 |              1 |          0 |             0 | Tortoise |
| District 2 |              0 |          1 |             0 | Hare     |
| District 3 |              0 |          0 |             1 | Cheetah  |
| District 4 |              0 |          0 |             0 | Tortoise |
| District 5 |              0 |          1 |             1 | Hare     |
+------------+----------------+------------+---------------+----------+

What I've been inputing in the field calculator:

CASE
WHEN "Tortoise" = max (Terry Tortoise, Harry Hare, Chuck Cheetah) THEN 'Tortoise'
WHEN "Hare" = max (Terry Tortoise, Harry Hare, Chuck Cheetah) THEN 'Hare'
WHEN "Cheetah" = max (Terry Tortoise, Harry Hare, Chuck Cheetah) THEN 'Cheetah'
END


texts:
I have to use a script to convert AscII to Raster, and I used one I found from GeoNet. But now, the problem is to reduce the name of the AscII files, because I can't name the Raster with more than 13 characters.

MDT05-0561-H30-LIDAR.asc is the name of files, and then, without changing the ".asc", because there is a looping reading this part, how can I reduce the formentioned name to "MDT05-0561.asc" name?

import arcgisscripting, os

# Create the Geoprocessor
gp = arcgisscripting.create()

# Set local variables
InAsciiFile = None
inDir = ""
OutRaster = ""
gp.outputCoordinateSystem = "etrs_89_wkd.prj"

for InAsciiFile in os.listdir(inDir):
    InAsciiFile =list(InAsciiFile)
    InAsciiFile.remove('-H30-LIDAR')
#because all of them have the last part: -H30-LIDAR

if InAsciiFile.rsplit(".")[-1] == "asc":
     print InAsciiFile
   # Process: ASCIIToRaster_conversion
    gp.ASCIIToRaster_conversion(os.path.join(inDir,InAsciiFile), os.path.join(OutRaster,InAsciiFile.rsplit(".")[0]), "FLOAT")


texts: Multi-string data-set without z layer, applying ordinal values as a workaround

texts:
I'm new to GIS and have been learning a lot over the last few weeks, however, I've finally come to a point where I could use some help.

I'm working with the pdx_streets data-set from http://www.civicapps.com, which doesn't include a z-layer or elevation relating to the rendering order for ramps, overpasses, tunnels, bridges, etc.

This data-set does include F and T ordinal values(-2 to 5), which can be applied as a work-around; but what is the best way to apply this?

Currently, I have all of the street styles entered, one solution would be list each value and apply using the render order, however, this would create a lot of duplication for each style.

QGIS 2.10

Metadata: http://www.portlandmaps.com/metadata/index.cfm?&action=DisplayLayer&LayerID=52058

OS: Ubuntu 14.04


texts:
I am using QGIS 3.12.
I am new to QGIS after having worked with ArcGIS Desktop for a while. I am having issues with adding a grid to my project.
I am using CRS ESPG:3587 WGS 84 / Pseudo-Mercator and noticed that the grid is showing the wrong coordinates and have included the parameters I have set for the grids.


texts: change easy.button to get the location of user

texts:
I want to add a button to my leaflet that zooms to the position of the user. I can't figure out the right way. This is what I tried:

L.easyButton('<img src="myimage.png">', function(btn, map){
  map.locate({setView: true, maxZoom: 18});
}).addTo(map);

var Test = L.popup().setContent("Your Location");

this does not work...


texts: Missing special characters in Leaflet popup

texts:
I'm trying to display the proper name of cities with special characters in spanish such as 'tilde' Á, however I'm getting false encoding in the popup layers as you can see in the image:

I have my html charset defined as <meta charset="utf-8" /> and the .geojson is also alright:

{"type":"Feature","geometry":{
"type":"Point","coordinates":[-74.1059716,4.650528403]},
"properties":{
"DPTO_CCDGO":11.000000,
"MPIO_CCDGO":1.000000,
"CPOB_CNMBR":"BOGOTÁ D.C.",
"CPOB_NANO":2011.000000,
(...)

Any idea on how to fix it?
I already checked with Chrome 58 and Firefox 53 with same result.


texts: TileCache and Openlayers Problem - Projections?

texts:
I have a very known problem, but I can't solve it.

I have set the same maxExtents in the config as in the Openlayers init JS. I have done the same thing with the projection (EPSG:900913) and done all the transformation on OpenLayers FW. But there is still an error, that the tiles can't be shown because they don't start at the right point.

It seems that they are not constraint. Why? Any idea? Where is the keypoint in the solution!

Thanks.
Martin

Edit:

I don't see any pics as tiles. I just see red-loadfail boxes. If I click with the right mouse button on the tile and let me show the picture I get this message:
"An error occurred: Current x value 967644.673573 is too far from tile corner x 939258.202600"

My tilecache.cfg config is:

[osm]

type=MapnikLayer

mapfile= /var/www/tilecache/osm.xml

#layers=osm

spherical_mercator=true

#tms_type=google

srs=EPSG:900913

bbox=654558.60577333,5745163.8837113,1173307.4327978,6075303.6111284

#bbox=5.88,45.78,47.81,10.54

#maxReolution=19567.879237500

maxResolution=156543.03390000001

resolutions=156543.03390000001, 78271.516950000005, 39135.758475000002,
19567.879237500001, 9783.9396187500006, 4891.9698093750003, 2445.9849046875001, 1222.9924523437501, 611.49622617187504, 305.74811308593752, 152.87405654296876, 76.43702827148438, 38.21851413574219, 19.109257067871095, 9.5546285339355475, 4.7773142669677737, 2.3886571334838869, 1.1943285667419434, 0.59716428337097172, 0.29858214168548586

maxResolution=78271.51695

extent_type=loose

levels=20

OSM CODE

  function init() {
    var tilecacheBbox = new OpenLayers.Bounds(5.88, 45.78, 10.54, 47.81).transform(
        new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
        new OpenLayers.Projection("EPSG:900913") // to Spherical Mercator Projection
      );
    alert(tilecacheBbox);

    var map_options = {
        maxExtent: tilecacheBbox,
        restrictedExtent: tilecacheBbox,
        maxResolution: 156543.03390000001,
        resolutions: [156543.03390000001, 78271.516950000005, 39135.758475000002, 19567.879237500001, 9783.9396187500006, 4891.9698093750003, 2445.9849046875001, 1222.9924523437501, 611.49622617187504, 305.74811308593752, 152.87405654296876, 76.43702827148438, 38.21851413574219, 19.109257067871095, 9.5546285339355475, 4.7773142669677737, 2.3886571334838869, 1.1943285667419434, 0.59716428337097172, 0.29858214168548586],
        //maxResolution: 78271.51695,
        projection: new OpenLayers.Projection("EPSG:900913"),
        //units: "meters",
        numZoomLevels: 20
    };

    map = new OpenLayers.Map("basicMap", map_options);
    map.addControl(new OpenLayers.Control.PanZoomBar());
    map.addControl(new OpenLayers.Control.LayerSwitcher());
    var mapnik = new OpenLayers.Layer.OSM();
    // var tilescache = new OpenLayers.Layer.TileCache();
    tiles = new OpenLayers.Layer.WMS("OSM@Mapnik", "tilecache/tilecache.cgi?",{
        layers: 'osm', format: 'image/png', srs: 'EPSG:900913'
    });

    map.addLayer(mapnik);
    map.addLayer(tiles);
    map.setCenter(new OpenLayers.LonLat(8, 46.5)  // Center of the map
      .transform(
        new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
        new OpenLayers.Projection("EPSG:900913") // to Spherical Mercator Projection
      ), 8 // Zoom level
    );
  }


texts: How to get only part of a WMS GetCapabilities request

texts:
Is it possible to modify the WMS GetCabilites request URL in order to get back a certain part?

For instance I am only interested in this part of the XML:

<LatLonBoundingBox minx="16.6176088621753" miny="44.782391955068526" maxx="53.325886544307956" maxy="62.785875486994094"/>
<BoundingBox SRS="EPSG:32632" minx="1000000.0" miny="6000000.0" maxx="4000000.0" maxy="7000000.0"/>


texts: How do I select points within a specified distance of a polygon's border?

texts:
I have a table with points and another table with polygons (multipolyons to be more accurate). How do I find the points that fall within a specified distance of the polygon's border? Most of the points fall within a polygon but I want a list of points that fall within 100 meters of a polygon edge. If a point is 20 meters from a boundary that is shared by adjacent polygons, I'd expect that point to be listed within 100 meters of two polygons.

The SQL below selects too many points. It select points inside the polygon but outside the interior buffer. It should not select points inside the polygon and greater than 100 meters from the edge.

select *
from towers t, areas c
where st_dwithin(t.geom, c.geom, 100.00)
order by t.description

How do I modify this query to return points that are within 100 meters of a polygon's boundary, not necessarily all points within the poylgon?


texts: Arcpy.GetRasterProperties_management values do not match values found via ArcCatalog or ArcView

texts:
I am using Arcpy to extract the mean and standard deviation values of tiff Landsat satellite images and I get very high values. Values in the thousands rather than in the low hundreds! If I look at the same images via properties in ArcCatalog or ArcView I get reasonable values that I would expect.

Question is, why am I seeing different values and how can I get the correct values using arcpy.GetRasterProperties_management? Has anyone seen this before?

Example:

>>> arcpy.GetRasterProperties_management(zeronodat1, "STD", "Band_1")
<Result '5505.54904039909'>

actual values = 5.072720773551549

Any suggestions on how to trouble shoot this are welcomed.


texts: matching a border of one polygon to another

texts: I have a polygon (A) that I drew the eastern border of in QGIS. I have another polygon(B) whose western border I want to nest against the eastern border of polygon a so they are touching but not overlapping each other. Is there away I can do this other than reshaping polygon B's western border by hand as I had to do with polygon A's eastern border?


texts: Calculating distances in Geographic Coordinate System using ArcGIS for Desktop?

texts:
I work in a Geographic Coordinate System and using the "Generate Near Table" tool in ArcGIS 10.2 for Desktop.

I want to calculate the distances that each feature of the point layer has to the closest point (vertex) of the coastline (the coastline is a line shapefile).

The distance method I use in GEODESIC, but I cannot understand what is the formula with which it calculates distances, since euclidean distance is used only in PLANAR for projected data.


texts:
I confused that how to call python gdal module in the path such as gdal_calc.py(C:\Program Files (x86)\GDAL\gdal_calc.py)
a test code below,but it don't work.

import os
os.sys('python C:\Program Files (x86)\GDAL\gdal_calc.py -A D:\temp\m2000049.tif -B D:\temp\m2000057.tif --outfile=D:\temp\result.tif --calc=(A+B)')

refect the error:

  os.sys('python C:\Program Files (x86)\GDAL\gdal_calc.py -A
  D:\temp\m2000049.tif -B D:\temp\m2000057.tif
  --outfile=D:\temp\result.tif --calc=(A+B)')
  --------------------------------------------------------------------------- TypeError                                 Traceback (most recent call
  last)  in ()
  ----> 1 os.sys('python C:\Program Files (x86)\GDAL\gdal_calc.py -A D:\temp\m2000049.tif -B D:\temp\m2000057.tif
  --outfile=D:\temp\result.tif --calc=(A+B)')

  TypeError: 'module' object is not callable


texts: Extracting residuals of maxent model in R?

texts:
I used "dismo" package in R, and ran a build a maxent model. Now I want to extract the residuals from the model in order to run a Moran I test later. But I got an error.
The code was like:

xm<-maxent(pridictors, p=sdmdata, factors="landuse")
sdmresiduals<-cbind(sdmdata,resid(xm))

And the error appearred:

Error: $ operator not defined for this S4 class

I don't understand what S4 class is. When I tried to have a look at the correlation between variables, using "car" package in R

vif(xm)

The same error happened.

How do I solve this problem?


texts:
I'm trying to do a simple conversion of a polygon to vertices and I get an error that says:

  AttributeError: 'QgsProcessingProvider' object has no attribute
  'isSupportedOutputValue'  Traceback (most recent call last):   File
  "C:/PROGRA~1/QGIS3~1.6/apps/qgis/./python/plugins\processing\gui\AlgorithmDialog.py",
  line 180, in runAlgorithm

  parameters = self.getParameterValues()   File
  "C:/PROGRA~1/QGIS3~1.6/apps/qgis/./python/plugins\processing\gui\AlgorithmDialog.py",
  line 168, in getParameterValues ok, error =
  self.algorithm().provider().isSupportedOutputValue(value, param,
  context) AttributeError: 'QgsProcessingProvider' object has no
  attribute 'isSupportedOutputValue'

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
QGIS version: 3.6.0-Noosa Noosa, 58734527ab

Does anyone have an idea on what's causing this issue?


texts:
This should be simple, but not sure why I'm not getting it. Does anyone have a stub for showing how to flash a graphic? I want to be able to call it from a button in the JSAPI UI. I am using the AMD, hopefully this isn't steering away from it.

function showResults(featureSet) {
//remove all graphics on the maps graphics layer
map.graphics.clear();

//Performance enhancer - assign featureSet array to a single variable.
var resultFeatures = featureSet.features;

//Loop through each feature returned
for (var i = 0, il = resultFeatures.length; i < il; i++) {
    //Get the current feature from the featureSet.
    //Feature is a graphic
    var graphic = resultFeatures[i];

    // allow different symbols
    markerSymbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_DIAMOND, 28,
    new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
    new dojo.Color([255, 255, 255]), 2),
    new dojo.Color([255, 0, 0, 0.85]));
    lineSymbol = new esri.symbol.CartographicLineSymbol(esri.symbol.CartographicLineSymbol.STYLE_SOLID,
    new dojo.Color([255, 0, 0]), 10, esri.symbol.CartographicLineSymbol.CAP_ROUND,
    esri.symbol.CartographicLineSymbol.JOIN_MITER, 5);
    fillSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,
    new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
    new dojo.Color([255, 0, 0]), 2), new dojo.Color([255, 255, 0, 0.85]));

    // figure out which symbol to use
    if (graphic.geometry.type === "point" || graphic.geometry.type === "multipoint") {
        symbol = markerSymbol;
    } else if (graphic.geometry.type === "line" || graphic.geometry.type === "polyline") {
        symbol = lineSymbol;
    } else {
        symbol = fillSymbol;
    }
    //g = new esri.Graphic(evt, symbol, null, null);
    //selGraphicsLayer.add(g);

    graphic.setSymbol(symbol);

    //Set the infoTemplate.
    graphic.setInfoTemplate(infoTemplate);

    //Add graphic to the map graphics layer.
    map.graphics.add(graphic);

    //zoom to graphics
    var graphicsExtent = esri.graphicsExtent(map.graphics.graphics)
    if (graphicsExtent !== null) {
        map.setExtent(graphicsExtent.expand(5));

        //flashFeature(graphic, 8, symbol);
        }
    }
}


texts: GeoServer Label Placement - Place Always Inside Polygon

texts:
Is there a way within the SLD to ensure that the label always appears within the polygon?

For example, in odd shaped polygons (with a hole, or a horseshoe shape) my labels are sitting outside.

I'd prefer not to create a another layer/ view on the database of the centroids - it's a very large dataset.


texts: Why are points collected with a Trimble FM 750 off by more than a mile when displayed in QGIS?

texts:
I have a grower that has a FM 750 and is trying to make points in a field.  When finished he takes the file out of the display and goes to his computer and he can bring up the points in the right field using Google Maps.

When he tries to lay the points in QGIS the points are more then a mile off from his field or show up in another field.  Guess what I'm looking for is a support number to get a hold of to visit about this or if the display and the QGIS systems are not compatible.


texts: Open Street Map export to QGIS Lines not Polylines

texts:
I recently updated to QGIS 2.10.1 and have found that I can no longer view .OSM files.

Before I simply dropped and dragged downloaded .OSM files into QGIS and it automatically split into four different layers: points, Lines, multilinesring, and multipolygons.  This no longer works.

I have tried to use the import and export topology options from the OSM plugin, however, there is no Lines  "export type" option in the export OSM topology to spatiaLite box. These means I am now missing a large amount of my road, footpath, ect data (I am working with rural areas which will not receive much attention with the OSM community) which is obviously saved as a line not a polyline.

Is there anyway to export line data?


texts: Export attachments from a feature class with сyrillic symbols

texts:
I found a .py script which export attachments from a feature class (here)

But it doesn't work with Cyrillic symbols in name of attachments.
How to specify the value of the encoding in the script and correct the error?

import arcpy
from arcpy import da
import os

inTable = arcpy.GetParameterAsText(0)
fileLocation = arcpy.GetParameterAsText(1)

with da.SearchCursor(inTable, ['DATA', 'ATT_NAME', 'ATTACHMENTID']) as cursor:
for item in cursor:
    attachment = item[0]
    filenum = "ATT" + str(item[2]) + "_"
    filename = filenum + str(item[1])
    open(fileLocation + os.sep + filename, 'wb').write(attachment.tobytes())
    del item
    del filenum
    del filename
    del attachment


texts: OpenLayers and OpenStreetMap as source, style issue using Angular

texts:
Map is displayed, but zoom in/out buttons and logo of OpenStreetMap appears at the bottom of the map. It seems like styling is not applied, but I'm importing ol.css (code in Angular 4), not sure what I'm missing here.
I've used this example: https://openlayers.org/workshop/en/basics/map.html

Section of my code (imports and init method):

//npm install ol

import 'ol/ol.css';
import Map from 'ol/map';
import View from 'ol/view';
import TileLayer from 'ol/layer/tile';
import OSM from 'ol/source/osm';
import XYZSource from 'ol/source/xyz';
import proj from 'ol/proj';
import VectorLayer from 'ol/layer/vector';
import VectorSource from 'ol/source/vector';
import Feature from 'ol/feature';
import Point from 'ol/geom/point';
import Style from 'ol/style/style';
import IconStyle from 'ol/style/icon';
import { IAddress } from "./address";
...implements OnInit {
    this.map = new Map({
            target: 'map-container',
            layers: [
                new TileLayer({
                    source: new OSM()
                    //new XYZSource({
                    //    url:
                    //    //'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png'
                    //    //'http://tile.stamen.com/terrain/{z}/{x}/{y}.jpg'
                    //})
                })
            ],
            view: new View({

                center: proj.fromLonLat([144.9, -38.1]),
                zoom: 7
            })
        });


texts: how to add different data frames in QGIS?

texts: How can I add different data frames in QGIS and show all data frames in single map like we add different data frames in ArcGIS and in single map we show these data frames?


texts: Kriging results in log mode and SpatialPointsDataFrame manipulation

texts:
I've a little problem, probably because I'm not fully expert with R data manipulation.
I've perfomed a kriging elaboration of mydata, in log mode, as the classical meuse example, but how can I export a grid in real data ?
I.e. from previous idw map I've used this simple statement:
idw = idw(Var~1,mydata,grd,idp=2)
write.asciigrid(idw,"Var IDW.asc")

Unfortunately, Qgis not perform, actually, the "exp" function, I've found also the R calc utility of raster package but it doesn't apply to SpatialPoinsDataFrame, it seems ...
fun =function(x) {exp(x)}
krg_exp = calc(krg,fun)
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘calc’ for signature ‘"SpatialPointsDataFrame", "function"’

Can you help me ?


texts: ArcSDE performance and table changes on upgrade from 9.3 to 10.1?

texts:
I'm using ArcSDE 9.3 and SQL Server 2008 R2 and I want to migrate from ArcSDE 9.3 to ArcSDE 10.1.

Is there any performance  differences between ArcSDE 10.1 and ArcSDE 9.3 ?

Is there any change in tables of ArcSDE 10.1 and ArcSDE 9.3?

I'm familiar with  Online Help about how to upgrade ArcSDE for SQL Server from 9.3 to 10.1 .

I couldn't find resources about performance changes in 9.3 to 10.1.


texts: Applying a batch process of image mosaicking using spatial modeler in ERDAS Imagine

texts: I am working on a data set of 30 years. I have to mosaic 3 images of every year for my work. So instead of doing it one by one I want to apply a batch process on it (as ERDAS supports batch processing for various processes). Can it be done using spatial modeler? If yes, then how? Or is there any other way to do this using ERDAS?


texts: QGIS 2.8.2 Print Composer Attribute Sorting

texts:
I need to sort an attribute table added to the Print composer layout with Alphanumeric characters.
I understand this is not desirable but the field is for naming farm paddocks...hard to avoid that. How can I sort by alphanumerically?

Name:
paddock1
paddock2
calf3a
calf3b
Feedpad1
1
2
3

Please note, I have searched and searched for an answer or idea before posting this.


texts: how to Find nearest line for the given point from a collection of lines?

texts:
I have table with lines(linestring).For a point wich i give it , I want to find out nearest line in point.
I almost developed a query, but it is return the same line every point i give.

the query

   SELECT "NAME_LABEL", ST_Distance(ST_Transform(ST_GeomFromText('POINT(40.587840 22.951521)',4326),2100),geom) AS distance FROM geom ORDER BY distance ASC LIMIT 1;


texts:
How do I set conditions in QGIS (ie. temperature map, show only areas that meet certain condition (avg temp 9-21 celsius) ?

basically, I want my map to show only areas that meet the condition (certain temperature, certain hours of sunlight per years...) stuff like that. Would also be cool if I could overlap those.


texts: grib2 idx files - dealing with bands with identical byte ranges

texts:
I am using GDAL to process grib2 data. This data is downloaded from NCEP using HTTP random access based on the byte ranges specified in the index file for each grib file. This .idx file looks like this:

1:0:d=2019101400:PRMSL:mean sea level:30 hour fcst:
2:2285226:d=2019101400:REFD:263 K level:30 hour fcst:
3:2892001:d=2019101400:PRES:1 hybrid level:30 hour fcst:
4:5329680:d=2019101400:CLWMR:1 hybrid level:30 hour fcst:
5:5615579:d=2019101400:CICE:1 hybrid level:30 hour fcst:
6:5880098:d=2019101400:RWMR:1 hybrid level:30 hour fcst:
7:6228703:d=2019101400:SNMR:1 hybrid level:30 hour fcst:
8:6478687:d=2019101400:REFD:1 hybrid level:30 hour fcst:
9:7924976:d=2019101400:TCOND:1 hybrid level:30 hour fcst:
10:8217813:d=2019101400:RIME:1 hybrid level:30 hour fcst:
11:8510802:d=2019101400:HGT:1 hybrid level:30 hour fcst:
12:9925562:d=2019101400:TMP:1 hybrid level:30 hour fcst:
13:12075121:d=2019101400:RH:1 hybrid level:30 hour fcst:
14:14803802:d=2019101400:SPFH:1 hybrid level:30 hour fcst:
15.1:17668539:d=2019101400:UGRD:1 hybrid level:30 hour fcst:
15.2:17668539:d=2019101400:VGRD:1 hybrid level:30 hour fcst:
16:21815010:d=2019101400:VVEL:1 hybrid level:30 hour fcst:

For some models, there is an issue which is shown in the above example. Band 15 has two sub-bands, with identical byte markers. I am not sure how to extract the data pertaining to UGRD and VRGD separately. I have not encountered any documentation that describes this.

Opening the associated grib2 file with GDAL splits those bands up properly, so they are definitely isolated datasets.


texts: Inserting group into existing group using PyQGIS

texts:
I would like add one group into another (already existing one) in layerTreeRoot using PyQGIS.

How can i do it?

Adding layer group using PyQGIS? is not the answer to my question, because it allows only to create 2 groups at the same time. Group and sub group.


texts: Calculate field by comparing a field value to two other fields as min and max

texts:
Using ArcMap 10.5, I'm trying to compare recommended fire regimes for different veg types (min/ max fire frequency) with actual burns from the past 10 years to see whether they are in or out of regime.... but I'm stumped on how to achieve this.

I have 2 layers:

'Since burnt' with attribute 'no. of years since burnt'
'Veg groups' with attributes 'veg type' (3 types), 'min freq' and 'max freq'

First, I spatial joined the 2 layers using 'Since burnt' as the target so now I have a table with the required fields (no of years since burnt, min freq and max freq) to do the calculation. My idea was to then add a field and populate it with 'over', 'under' or 'within' according to where the 'since burnt' value fits in the min/ max range.

With my limited knowledge of python, I came up with:

def calc(y1,y2,y3):   #where y1=yrs since burnt, y2=max, y3=min
  if y1 > y2:
    return "OVER"
  elif y1 < y3:
    return "UNDER"
  else:
    return "WITHIN"

Of course this doesn't account for equal to, which I couldn't get to work. And I assume there's a much better way of using y2, y3 as a range.


texts: Is there any way to 'clean' up ASTER v2 DEM data?

texts: I downloaded all the tiles I needed, then plotted them to find that they don't all seem to have the same quality. Basically, you can see all the edges of a lot of the tiles. Is there any way to clean this up?


texts: Display ESRI MapService (WMTS) with EPSG:28992 coordinate system in Leaflet web map with OpenStreetMap base layer

texts:
ESRI MapService https://tiles.arcgis.com/tiles/nSZVuSZjHpEZZbRo/arcgis/rest/services/Historische_tijdreis_1870/MapServer have EPSG:28992 coordinate system.
In QGIS I can add this layer via WMTS https://tiles.arcgis.com/tiles/nSZVuSZjHpEZZbRo/arcgis/rest/services/Historische_tijdreis_1870/MapServer/WMTS  (layer: Historische_tijdreis_1870, format: image/jpgpng, tileset: default028mm, crs: EPSG:28992)
Is there any way display this layer directly on Leaflet web map with OpenStreetMap base layer (or I need reproject tiles using MapProxy)?

Fiddle: https://jsfiddle.net/ewzjdmLf/1/


texts: How to change layers in OpenLayers 3 with radio buttons?

texts:
I work on my map with more layers as source, I use inputs to set source layer. I need to change layer value.

I have inputs type radio :

<input type="radio" id="1" name="4">
<input type="radio" id="2" name="4">
<input type="radio" id="3" name="4">

I need to change value of my :

  var layer = "a"

By click on the radio inputs. In this rule :

id="1" is layer = "a"

id="2" is layer = "b"

id="3" is layer = "c"

var layer is my source layer to my map.


texts: Using Closest Facility with Delete Identical tool?

texts:
I am trying to figure out a work around for a problem I have.

I ran a Closest Facility operation on a set of about 200 points. Each point is an entrance to a building, and the underlying network is walking paths. I have named each of my facilities and incidents based on building number, and ran the operation so that each building was a facility as well as an incident, producing routes to and from each building.

What I am looking for is for any given path, (1-2, 1-3, etc.), I would like the shortest route (in time). In the Route output, there are routes for each entrance. For example if building 1 has four entrances, there will be four routes from building 1 to building 2. I only want the shortest (time-wise) for each route.

This is where I thought I would be able to use the Delete Identical tool. I advanced sorted the table, first based on the name of the route, then on the travel time. After this sort, the first unique record for each route name (1-2) had the shortest time. However, Delete Identical appears to delete all but the lowest Object_ID. This is a problem because as the routes were created and subsequently exported, they did not go in the order that I want now, so the lowest Object_ID is not always the shortest time for a specific building to building route.

I'm using ArcGIS 10, with an ArcInfo license.


texts:
I'm using Geoserver 2.6.2 and QGIS 2.10 to check my WMTS display. According to the documentation, I have tried 2 different ways to draw a line offset for a line-type layer, but none is working correctly.

If I test my SLD within Geoserver GUI, I get an error message on the PerpendicularOffset line. In QGIS, my layer is displaying but the offset is not taken into account.

Test 1:

   <LineSymbolizer>
     <Stroke>
       <CssParameter name="stroke">#0000FF</CssParameter>
       <CssParameter name="stroke-width">3</CssParameter>
     </Stroke>
       <PerpendicularOffset>3</PerpendicularOffset>
   </LineSymbolizer>

Test 2:

   <LineSymbolizer>
     <Stroke>
       <CssParameter name="stroke">#0000FF</CssParameter>
       <CssParameter name="stroke-width">3</CssParameter>
     </Stroke>
       <VendorOption name="PerpendicularOffset">3</VendorOption>
   </LineSymbolizer>


texts: Labeling Grid Index Features according to location in another Grid?

texts: I am trying to create a product using Arc in which one Grid Index is subdivided into a smaller Grid Index.  Creating the two grids is no problem, however the automatic naming convention is not ideal for the subdivisions.  I would like to come up with a method of quickly naming the smaller grid squares according to where they are located within the larger grid, without having to manually label each grid square.  For example, Grid A1 would contain 4 smaller squares, labeled 1,2,3,4.  For scalability, I am really trying to create a workflow for this process that is not horrible.


texts: How to calculate Bearing between two GPS points

texts:
The following returns 150 degrees using C# converted from JavaScript Bearing formulas, but Google earth returns 210 degrees for the same values.
The broken code is GetBearing() but I've also included Calculate() to show hard coded test values and ParseCoordinate() to show that I am converting Degree-Minute-Second to radian decimal degrees for GetBearing(). Are the JavaScript Bearing formulas wrong?

double DEG_PER_RAD = (180.0/Math.PI);
// Return Bearing (degrees)
private double GetBearing(double lat1, double lon1, double lat2, double lon2)
{
    var dLon = lon2 - lon1;
    var y = Math.Sin(dLon) * Math.Cos(lat2);
    var x = Math.Cos(lat1)*Math.Sin(lat2)-Math.Sin(lat1)*Math.Cos(lat2)*Math.Cos(dLon);
    return DEG_PER_RAD*Math.Atan2(y, x);
}
private void Calculate()
{
    var lon1 = ParseCoordinate("38 51 30.5");
    var lat1 = ParseCoordinate("78 12 33.8");
    var lon2 = ParseCoordinate("38 45 46.2");
    var lat2 = ParseCoordinate("78 16 46.0");
    var bearing = GetBearing(lat1, lon1, lat2, lon2);
    // Show bearing
    ...
}
// Convert Degree-Minute-Second to Degree.ddd
private double ParseCoordinate(string coordinate)
{
    var dms = coordinate.Split(' ');
    var rVal = 0.0;
    var i = 0;
    foreach (var s in dms)
    {
        double d;
        double.TryParse(s, out d);
        rVal += (d/(Math.Pow(60.0, i++)));
    }
    rVal /= DEG_PER_RAD;
    return rVal;
}


texts: Making empty parts of aerial imagery transparent in QGIS?

texts:
I have a raster file (ECW format) that covers a very large area, however the contents comprise a thin strip of aerial imagery (100m strip centered over the rail line).  The bounding box for the image is hundreds of kilometers in each direction.

When I load the image, the areas outside of the thin strip of aerial imagery show up as white, and obscure everything behind it.

Is there a way in QGIS to make the parts not containing the aerial image transparent, whilst still showing the image?


texts:
I can see that DenseNodes are one of the primitive node types (nodes, DenseNodes, ways, relations).

I can understand the rest, but I couldn't figure out what a DenseNode is.


texts: How do I call the objects created with QtDesigner (or QtCreator) in my code in python? Where is this information in python? PyQt4 please

texts: Where can I find a good documentation on how to refer (to call) to the Dialog created with QtDesigner? For example, a buttomBox (or any other) just created. I’m trying to make a plugin, but the tutorials I’ve seen just throw this information in and I just don’t get how to do with the others Widgets. How do I link them in my code? Where is this information? I need to know it for PyQt4. The API I find is not in python. Or is just specified for the use of PyQt4, and I just don’t find, or don’t understand, how to call them to my scripts I already have. PS: I use the Plugin Builder and already have some code of my own, but don’t know how to use them together to work as a plugin.


texts: Find and replace with Greek letters returns question mark in ArcGis 10.3

texts:
When I try to replace values in a field with Greek Characters they appear as it should be in attribute, but when I save the edits and re open the attribute I see question mark.

The same thing happens also in Qgis 2.8.1.

I use windows 7 x64 ultimate.

On an other machine which runs windows 8.1 and ArcGis 10.2.1 I see the replaced Greek letters and after reopen the attribute but when I export the attribute in .dbf I don't see anything.

How can I fix this problem?


texts:
There is something that I like alot in QGIS, and that is actions. From automatic wikipedia search, to opening an image, this use makes QGIS feel very dynamic.

Unfortunately I have no idea how to automatically load up a default list of actions when opening a specific shapefile. So I have to create new actions every time I reload the exact same shapefile. Very annoying.

Please help.


texts: Rasterizing vector layer (polygon) in ArcGIS Desktop?

texts:
I am using ArcGIS Desktop 10.6.

While rasterizing my vector layer, lots of noise creates, I remove most of them by applying different cell sizes and the best one is 45.

The only problem left is the one showing in the picture with an arrow. There is nothing behind those pixels and I am wondering why a kind of bridge between pixels at the edge are created.

I tried  Region Group, Set Null, and Nibble tools but it does not help me as it removes most of small pixels which are key for my analysis.

How can I remove those red pixels?

The original vector map is as follows.


texts: proj4 fails to create projection with "+units=degrees"

texts:
basically my problem is that pj_init_plus works fine with

+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs

but fails with

+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +units=degrees

I undestand there is a bit of overspecification there, but that is not conflicting. Or is it?

(proj4-4.9.2 compiled with gcc 5.3, on x64 linux)


texts: QGIS graphical modeller joining input layers to processing algorithms

texts:
I am trying to learn how to use the graphical modeler application in QGIS 3.14
I have encountered a problem early on. If I pull vector layers into the modeler canvas and then add in an algorithm to act on the layer, when I try to set the input within the algorithm dialogue, the layer as added to the modeler canvas is not available in the input drop-down list of the algorithm. Only layers added into the QGIS map canvas seem to be available. As such when I close the algorithm dialogue box no input link is established on the modeler canvas between the input and the algorithm, as various tutorials indicate should happen.

Am I missing something very simple here?


texts: Creating line geometry from latitude/longitude dictionary

texts:
I want to create LineString geometry between points, based on a latitude/longitude dictionary.
My code worked in QGIS 2.x but in QGIS 3.x, my new shapefile is empty.
I have replaced QgsPoint and fromPolyline by QgsPointXY and fromPolylineXY but it doesn't resolve my problem.
My code is below:
self.writer = QgsVectorFileWriter.create(path_layerout, self.fields, QgsWkbTypes.LineString, crs, transform_context, save_options)

for (ky, vals) in points_dict.items():

    for i, v in enumerate(vals[:-1]):

        start = vals[i]  # lat
        end = vals[i + 1]  # lon

       self.feat = QgsFeature()
       self.verticies = [QgsPoint(start[1], start[2]), QgsPoint(end[1], end[2])]
       self.feat.setGeometry(QgsGeometry.fromPolyline(self.verticies))
       self.feat.setAttributes([str(start[0]), str(end[0])])
       self.writer.addFeature(self.feat)

Have you any suggestions?


texts: Is there a way to automate POI collection from websites?

texts:
I am searching for an easy method to get lots of points geotagged/georeferenzed into several shape files.

I am working at a project where I need to collect all parcel shops in germany (but I will try it with Berlin first) of the 5 most important service providers.
They are all not willing to give me any data of their locations but they all have a web formular to search the shops in a specific region.

I like to create 1 shape file for each company with all their shops in Berlin.

Do you have another idea how to do that while avoiding to search and add every single point (or just using google maps and tag/screenshot the points)?

To have an impression of the material I use:

The points you can see on the map (and on the left side with some explanation) need to be transferred into QuantumGis.


texts: Deleting multiple feature classes simultaneously?

texts:
I created a number of feature datasets to temporarily store the output of some ModelBuilder models. Each dataset contains several thousand feature classes, and the idea was that I could just delete the feature dataset when I was finished with the ModelBuilder output, instead of deleting each feature class individually (which would take forever!).

However, I've been using the Delete (Data Management) tool to delete the feature datasets, and have found that all the feature classes within the dataset, rather than being deleted, are just turning up in the folder the feature dataset was stored in. I assumed that deleting the dataset would remove all that dataset's content also, but this doesn't appear to be the case. I Have tried to delete the feature classes using Windows Explorer (where I could highlight them all simultaneously and then press delete) but they don't show up.

So, could someone please tell me if there is a way to delete multiple feature classes (or all content within a feature dataset) in one go? Either in ArcGIS (using v10) or through Windows Explorer?


texts: How do I specify an outsize for gdal translations to an ENVI file?

texts:
I'm trying to create an elevation map using the output from gdal_translate.
When I run gdal I can convert to both PNG and ENVI and combine the results to make something like the following image.

Here's the command I use:
gdal_translate -of PNG -scale 23.000 4367.000 0 256 Rainier.tif Rainier.png
gdal_translate -of ENVI -scale 23.000 4367.000 0 256 Rainier.tif Rainier.bin

That's great. In fact it's exactly the result that I want, except for one thing,
I want to be able to specify an outsize. Let's say that I want the image to be 200x200.

Here's the command I use:
gdal_translate -of PNG -scale 23.000 4367.000 0 256 -outsize 200 200 Rainier.tif Rainier.png
gdal_translate -of ENVI -scale 23.000 4367.000 0 256 -outsize 200 200 Rainier.tif Rainier.bin

The PNG image turns out the way that I expect but when I try to utilize the ENVI map to change the elevation it gives me an unexpected result.

Is gdal_translate -outsize broken for ENVI? or am I doing something wrong?

edit: Adding image of the results after using -r lanczos while scaling in gdalwarp


texts: Routing with set of points and barriers individually using ArcGIS Network Analyst

texts:
I need to run network analysis routing (to calculate distance) on pairs of points with barriers. I have 3 feature classes:

Origins

Destinations

Barriers

All 3 of which share a common unique ID field called [RouteName], (which has a data type of Long.)
The barriers represent culvert failures on a road network. I would like to calculate how much travel distance is added to get from the origin (on one side of the failure barrier) to the destination (on the other side of the failure barrier).
I have set up the routing problem and it solves the route for each set of points using all barriers along the network. I am trying to find a way to for the routing to look at each Origin, Destination, and Barrier set (sharing a common [RouteName] attribute) individually to calculate the route, while ignoring all other Origins, Destinations & Barriers on the road network  For each routing solution, I only want to use one origin, one destination and one barrier.
I have a model set up that successfully routes for one [RouteName] set using the "Select Layer By Attribute" tool in Model Builder. I have attached photos of my current model and my test result for using the expression "[RouteName]=21" in the select Layer by attribute tool for my Origins, Destinations and Barriers.

What I would like to do is be able to set the model to run through each "set" of [RouteName] (Origin, Destination, & Barrier all sharing the same value) and output/append that successful routing to a new feature class with the set's [RouteName} as an attribute. I'm assuming I have to use the For Iterator but I'm not quite sure how to use the inline variable to do so.


texts: spatial join that works like select by location?

texts:
Using ArcGIS 10.2.1

I have two polygon feature classes.  The features in each are
identical, but they have different tables with no common attribute
(long story).  In each FC there are overlapping polygons.  If I do a
select by location, using "are identical...," all of the approriate
features are selected.

I'm trying to get the attributes from FC #1 into the identical
feature in FC#2.  I can select them easily enough but can't join them.
Any ideas?


texts:
We are using GeoServer version 2.7.6 and recently we added monitor extension plugin and our main objective is to have an audit logging mechanism.

For that reason, we install monitor core and hibernate extensions separately. After installing the core, we tested GeoServer and it's working fine but the major problem is, it is creating the log files with 0 KB. So then we added hibernate extension, GeoServer is getting stopped.

What could be the reason behind this?


texts: Postgis - Split linestring between point A and B

texts:
I need to find the different trajectories between point A and B. In the image is possible to see 2 differents trajectories.
The way i use to calculate them is: Found the min time and the max time (in a specific date), and make a linestring with the points between this two times.
The problem is that the min and max are near one of the other and the result is only one linestring.
My problem now is split the line string, and stay with different trajectories for example 1 and 2 (image), because what i want is the different trajectories between A and B like image.

Way to found nearest points of A and B

SELECT *
from tese.cars
WHERE (((

  st_dwithin(
          (SELECT geom
          FROM tese.cars
          WHERE (carid = 1 AND rdate = 190101 AND rtime = 85000)) -- Point A
  , geom, 20))
  OR
  st_dwithin(
          (SELECT geom
          FROM tese.cars
          WHERE (carid = 2 AND rdate = 120101 AND rtime = 153804)) -- Point B
      , geom, 20))
      )

Way to found Points between A and B

INSERT INTO tese.cars2
SELECT t.*
FROM tese.cars as t
INNER JOIN tese.pontosAB as tt
ON    t.carid=tt.carid
      AND
  t.rdate=tt.rdate
      AND
          (
          t.rtime > (SELECT min(rtime) from tese.pontosAB where carid=t.carid and rdate=t.rdate)
              AND
          t.rtime < (SELECT max(rtime) from tese.pontosAB where carid=t.carid and rdate=t.rdate)
          )

Point to LineString

SELECT rdate, min(rtime), max(rtime), st_makeline(geom)
FROM tese.cars2
group by rdate


texts:
Is it possible to retrieve Python code based on the action performed?
I am not very familiar with Python and I would like to know what code could be implemented based on what I just did from the menu.  For example, when I join attributes by location, I want to know what code would have been used if I had run the same action using Python.


texts: Snap GPS coordinates to closest line, get line ID, generate and execute URL

texts:
I have a web map in Portal that has a sidewalk line layer.

Using Portal, I plan to collect sidewalk deficiencies using GPS (on a Microsoft Surface/Windows 10 device).

I would like to add the following functionality to the web map:

Using the device's current GPS coordinates, snap the coordinates to the closest sidewalk line.
Get the ID of the sidewalk line.
Generate a URL from the ID and the snapped coordinates.
Execute the URL.

The URL will open a work order management system form that is pre-populated with the sidewalk ID and the snapped coordinates.

How can I do this in Portal?


texts: How to get the geometry type of a layer in GeoServer?

texts:
I need to programmatically know the geometry type (lines, polygons or points) of a layer in GeoServer. I'm trying to do this using the REST API but can't seem to find a way.

Any clues?


texts:
I have a geopackage with a point feature. Which contains points along 19 lines. So, the number of points per line is exactly the same. Therefore, I could see it as a matrix in numpy. Moreover, each point has an attribute "AffectedbyRiver", where 1 (white) and 0 (red). How can a extract that information from geopandas to numpy array as an array 204-by-19 ? I mean, as a matrix with zeros and ones.

Note: The figure below is a screenshot from QGIS3x

import geopandas as gpd
preplot = gpd.read_file('geodatabase.gpkg', layer='SourceRegularPoints')
preplot.plot(figsize=(12,8))

Link to geopackage

here is my code (manually):

indexline = [19,18,17,16,15,14,13,12,11,10,1,2,3,4,5,6,7,8,9]

array = np.zeros((204,19))
x_coor =  np.zeros((204,19))
y_coor = np.zeros((204,19))

for i in indexline:
    array[:,i-1]=preplot.loc[preplot['org_fid']==i].AffectedbyRiver.values
    x_coor[:,i-1]=preplot.loc[preplot['org_fid']==i].X.values
    y_coor[:,i-1]=preplot.loc[preplot['org_fid']==i].y.values

plt.scatter(x_coor.flatten(),y_coor.flatten(),c=array.flatten(),cmap='gray')


texts: How to solve sqlite_rtree_geometry_callback error?

texts:
I have just installed qgis 1.8 and it show error message

  the procedure entry point sqlite3_rtree_geometry_callback could not be
  located in the dynamic link library sqlite3.dll

How to fix this?


texts: Show unqualified field names in ArcGIS Server map service

texts:
We have two tables:

[Server1].[Instance1].[Database1].[dbo].[Districts] -- a versioned polygon feature class with only two fields: a shape and a foreign key
[Server1].[Instance2].[Database2].[dbo].[vwDistricts] -- a rather straightforward view on a non-spatial table containing the other end of the foreign key and useful information about the districts.

I have created a map service--on a standalone ArcGIS Server instance running v 10.6.1--that contains a join between these two tables. The view is fed by a separate table in [Database2] that holds the authoritative values for these data so it is necessary to maintain this join to keep the data fresh.  The problem is that the resulting map service publishes fully qualified field names (Database1.dbo.Districts.DistrictNumber and Database2.dbo.vwDistricts.Name), and I'd like very much to avoid revealing specific database names & table names to the world.
I've tried publishing from ArcMap and from ArcGIS Pro (v 2.6.1).  In ArcGIS Pro, I unchecked the Join Tool's "Maintain Fully Qualified Field Names" setting; but that gives me no love, not even intermittently. Is there a reliable way (either in ArcMap or Pro or elsewise) to get that map service published with unqualified names?


texts: Mapping between two different agencies roadway shapefiles of Las Vegas in ArcGIS

texts: I have two roadway shapefiles of Vegas. But they do not overlap. One of the file has a certain shift from its exact location. Can anyone help me how can I move the location so that they overlap exactly and I can map those two different shapefiles in ArcMap?


texts: Copy data attribute into QGIS layer (not external link)

texts:
I need to copy data from an external file .xls to a layer.
I have to share a project with only shape file (no .xls).

Now the layer has normal data attribute with join

I do not understand that request, but that's it


texts: WMS tile cache that works with time dimension

texts:
Is there a good WMS tile cache that understands the WMS time dimension? And what configuration is necessary? Open source preferred.

I am serving some WMS layers with the time dimension, so the map requests from the client include dates. For example http://…?…request=GETMAP&…&TIME=2010-12-10 returns the map for 10 Dec 2010. In my undestanding the tile cache will need to treat the TIME parameter as an identifier for the maps, just like the layer name.

I'm aware of Geowebcache, Tilecache, and MapProxy but I can't find any reference to the time dimension in their documentation. The time dimension has existed since WMS 1.1.0 so I would hope it's been considered by someone? Our layers are served by ncWMS and MapServer, if that's relevant. We would like to use a tile cache to increase the speed for our most frequently requested content. Can anyone recommend a tile cache, and preferably point us to the relevant documentation too?


texts:
I'm using ArcMap and work with a dataset that contains all the buildings of north rhine-westphalia. This dataset contains different attributes for every object.
My task is to count all neighboring buildings of a building. For that I create a buffer (100m) for every building and want count every other building within this buffer.

How do I do that?

Additionally, how do I get the mean height of all buildings in this buffer?


texts: Generating equal-distance band regards to one boundary of polygon in R?

texts:
I have a polygon that is made up of several points:

Basically, this reflects the contour of a tumor tissue.
Now I have another polygon, which is defined as 'front', means a region where tumor and normal tissue in contact with tumor (the gray region):

Now what I want to do is generate multiple lines, whose distance towards the inner boundary of the 'front' is linearly increased with a factor of 0.15, as the figure shows:

I tried to use function 'gBuffer' from package 'rgeos', however, it seems like doing buffer for a single line does not make any sense. I also tried doing gBuffer for the entire polygon, however, I want to remain the lower boundary, which means gBuffer for entire polygon is not doable...

Quite confused about what to do, any suggestions?


texts:
I have one shapefile which has 78765 polygons of different year, path and row.
I want to remove the polygons which has more than 80% of overlap.
Can somebody help me because symmetrical difference, find identical did not work for me.


texts: How to find a point on given line that its distance from another point is given also?

texts:
I have this input:

(lat1,lon1), (lat2,lon2) - Two coordinates that create the line
(lat0, lat0) - Point on this line
d - distance

I want to find a point (lat, lon), where

(lat, lon) is on the line (mentioned above)
The distance between (lat, lon) and (lat0, lon0) is d

The direction of (lat0, lon0)-to-(lat, lon) is not importent right now.
[and of course, the lat/lon is given as geographic coordinates in degrees].

Can anyone knows any algorithm for that?

Many thanks!


texts: How to calculate a Label Point for a (multi)polygon

texts:
ESRI software has a concept of a 'label point' for a (multi)polygon. It is like the centroid, except it is guaranteed to be within the (multi)polygon. Like for a U-shaped polygon, the label point is somewhere in the bottom of the U. See the ArcGIS REST API Reference on the subject.

I'd like to know a reference, English description, or pseudocode for how something like this is calculated for a polygon or multipolygon.

I get the vibe from results in ArcGIS that the label point is somewhere on the the medial axis transform (skeleton). But not just in its middle, because a big bulge at one end of a polygon will pull the label point into it. So it has a 'center of mass' aspect.

I haven't found an equivalent function in PostGIS (there is ST_PointOnSurface, but that is not quite the same thing). Nor have I found something in QGIS, but maybe I'm not looking for the right non-ESRI terminology.

This duplicates this question, but that one didn't get any high-rated non-hacky answers so I thought I'd ask again. Forgive me if it isn't the done thing.


texts: Are there any known issues with using database triggers for reacting to a WMX Job status change?

texts:
I'm looking to notify another system when a WMX job (of particular job type) has been closed.  And I know this will be a call to an Oracle package. I'm considering a database trigger because it seems to be the most straightforward approach, but cautious because I'm not finding a lot of chatter in the forums.  Are there any "gotchas" (WMX  or Oracle) to look out for with this approach?

Notes:

Workflow Manager for ArcGIS 10.0
Oracle 11g
Want to avoid using custom notifiers and/or python scripts on client
workstations.


texts: Formula for calculating the local point scale factor of a secant Mercator projection with Autochart

texts:
I am looking at a projected coordinate system with the following parameters:

Datum WGS-84
Spheroid  WGS-84
Semi-Major Axis (a)   6 378 137.000 m
Inverse Flattening (1/f) 298.2572235634
Latitude of Origin of Projection  0°N
Longitude of Origin of Projection 25°W
False Easting (metres)    0 000
False Northing (metres)   1 000 000
Standard Parallel 25°N
Scale Factor  1.00000 at Standard Parallel

When using Autochart for Autocad (Inquiry --> Point Id) when I click at a point, I get a Scale factor value.
For 25° N and 25° S, the scale is 1.000, for 0° N it is about 0.90685. It increases above 1 towards the poles.
From googling I understand that this is a secant Mercator projection, where two parallels offset from the equator have a unity scale factor.
I am trying to find the proper formula to calculate this for a given lat/lon point, but the fact that I also get values below 1 mystifies me.
In this answer the graph clearly shows the scale factor increasing with the latitude and always being above 1.
This answer also provides formulas, but they still refer to the case where the equator is the latitude of origin.
What I don't see in these formulas is where I would specify what my latitude of origin is, so I could then also solve for the case between the two secant parallels.


texts: What is the easiest way to summarize/aggregate/cluster point features?

texts: I have a file with more than 2000 point features and I want to summarize them. However the points that interest me the most, are the ones with the fewest neighbours. The point features which appear in groups are less interesting and therefore should be summarized to simplify my further analysis. It would be best to aggregate them solely on the attribute of the distance between each other, because they have no other attributes. Any ideas? See images below.


texts: Custom pop-up for multiple results in ArcGIS Online application

texts:
I have a point layer that contains business locations where the businesses offer services from different providers. i.e. competing businesses.

A customer is requesting a modified pop-up to display, as to not imply that one service is "better" than another. Gotta make the customer, as well as the competing businesses happy, right??

Rather than having a pop-up display (1 of 2) and (2 of 2) is there a way to:

A. Create a blank pop up first, preferably with some sort of index or key that says something to the effect of "There are 2 providers at this location, scroll right to see providers"?

or

B. Have all pop-ups display at once in separate panes (some kind of multi pop-up) displaying all info at once. Or alternatively, have one large popup pane that displays all location information at once.

Preference B. would be best and likely the easiest, I would imagine. Any tricks, tips or hacks are welcome.


texts: Script (ArcPy) vs field calculator (Python Parser) behaviour of getPart in ArcGIS for Desktop?

texts:
From time to time I have to access geometry field and shuffle through points in it. Process is simple:

Get shape
Get it's part
Iterate through part's points

This is how it looks like in a script

import arcpy
fc = r'd:\scratch\line.shp'
with arcpy.da.SearchCursor(fc,"Shape@") as cursor:
   for row in cursor:
      shp=row[0]
      part=shp.getPart(0)
      for p in part:
         print p.X

However, when I try to do similar thing using field calculator:

def plineM(shp):
 part=shp.getPart(0)
 for p in part:
  return p.X

plineM( !Shape! )

I got 999999 error.

To make it work I am forced to a) define the length of an array and b) use getObject() method to access the point:

def plineM(shp):
 part=shp.getPart(0)
 n=len(part)
 for i in xrange(n):
  p=part.getObject(i)
  return p.X

Question: why simple array iterator works in script and does not work in field calculator?


texts: Why do area calculations of OSM polygon shapefiles return negative values in ArcMap?

texts:
Whenever I tried to calculate the area of polygon shapefiles (OSM, Geofabrik) part of the polygons have negative values. All values appear to be right except the fact that around half of them are negative (f.e. -5734 m² instead of 5734 m²).

Before I calculated the area I reprojected the shapefiles from WGS84 to UTM33.


texts: Split line by nearest points using geopandas

texts:
I have two GeoPandas Dataframes.
One is a combination of linestrings, when plotted is a single line. The other GeoDataFrame contains rows where each row is a unique point close to to the first line.

Now I would like to split the line using the locations of the points returning a GeoDataFrame.

Where my input looks like this:


texts: Real time map matching using ArcGIS Desktop?

texts:
I am working on a project which requires real time map matching. I am currently using ArcGIS but not sure whether it will work.

Here is what happens with my system:

the cell phones sent GPS fixes every five seconds to my server and I need to do real time map matching to snap the point on to one of the links of the map and store the matched points.

ArcGIS has a 'near' tool for snapping the point to nearest link. However, the input to the tool has to be a shapefile for the points.

I am wondering how I can deal with the real time data I get in ArcGIS. Creating a shape file for each point?

Any other suggestion for accomplish this work?


texts: definition query with 3 plus variables to loop with python and save layer files

texts:
I have a script that takes an input feature class and uses a field within this class to create a definition query for each unique field. A question on how to do this is listed below
saving layers for each unique attribute

My Script works when I have one file.

I am now interested in using more than one field variable within the query. Ideally I like to use three.

My Fields are going to be COUNTRY , SPORT , MEDIA

The definition query would be something like

"Country"= 'a_country' AND "Sport"= 'a_sport' AND "MEDIA "= 'a_Media_type'

Now the problem is that this definition will only work in some cases. Not all countries will do a given sport and therefore will not have a media type associated with that sport. Also if a country does have a sport, it might not have that media type. So i need some way of not creating layers if these relationships between the fields do not exist.

At the moment the below code will create layer files for all the possible examples, many of which don't exist. See code below

import arcpy
from arcpy import env

# This is where the environment is being set , and the file is being picked up from

location = r"U:\Stage_Area\GIS\Users\Team_Members\TWATER\DATA_SPORTS.gdb"

arcpy.env.workspace = location

# the feature class
Source_File = "OVERVIEW"

# Field to be used
User_Feild_1 = "COUNTRY"
User_Feild_2 = "SPORT"
User_Feild_3 = "MEDIA"

## This is the part where a seperate list of unique values are being created for each feild

The_list_User_Feild_1 = [row[0] for row in arcpy.da.SearchCursor  (Source_File,User_Feild_1)]
# All of the values are listed and they need to be stripped down to only unique   ones , which can be used within the lopp
Unique_list_1 = set(The_list_User_Feild_1)
print Unique_list_1

 The_list_User_Feild_2 = [row[0] for row in arcpy.da.SearchCursor(Source_File,User_Feild_2)]
 # All of the values are listed and they need to be stripped down to only unique ones , which can be used within the lopp
 Unique_list_2 = set(The_list_User_Feild_2)
 print Unique_list_2

 The_list_User_Feild_3 = [row[0] for row in arcpy.da.SearchCursor(Source_File,User_Feild_3)]
 # All of the values are listed and they need to be stripped down to only unique   ones , which can be used within the lopp
Unique_list_3 = set(The_list_User_Feild_3)
print Unique_list_3

## The Where_clause builds the defination query inside the last loop

for value in Unique_list_2:

    for Second_Value in Unique_list_1:

        for thrid_value in The_list_User_Feild_3:

            #This the name the layer that is being temporily created

            name_of_layer = str(Second_Value)+'_'+ str(value) + '_'+ str(thrid_value)

            out_layer = name_of_layer

            #MakeFeatureLayer variables
            in_features = Source_File

            where_clause = '"' + User_Feild_1 + '"' + " = " + "'" + Second_Value  + "'" + " AND " + '"' + User_Feild_2 + '"' + " = " + "'" + value + "'" + " AND " + '"' + User_Feild_3 + '"' + " = " + "'" + thrid_value + "'"

            print '\n',where_clause
            arcpy.env.workspace = r"U:\Stage_Area\GIS\Users\Team_Members\TWATER\DATA_SPORTS.gdb"

            try:
            # Execute MakeFeatureLayer
                arcpy.MakeFeatureLayer_management(in_features, name_of_layer, where_clause)

             # Execute SaveToLayerFile
                ## this is the location where i like the files to be saved out
                arcpy.env.workspace = r"U:\Stage_Area\GIS\Users\Team_Members\TWATER\DATA_SPORTS"
                arcpy.SaveToLayerFile_management(name_of_layer, out_layer, "ABSOLUTE")
            except:
                    print arcpy.GetMessages()

I was wondering some had some approaches, ideas of working with these variables. I found a similar post here.

This has a definition, but it seems to be specific to the tool it's using. Also i was struggling to understand the concept

similar question


texts: ArcGIS '+' operator not working in Spatial Analysis package

texts:
The following python script is working:

import arcpy
from arcpy import env

env.workspace = 'C:/Users/Matthew/Desktop/ARC_processing'

file_path = 'C:/Users/Matthew/Desktop/ARC_processing/MERRA_test_file_0_T.tif'

print(arcpy.CheckOutExtension("Spatial"))

arcpy.Plus_3d(file_path + '/Band_2', file_path + '/Band_3', 'added_bands_4.tif')

print(arcpy.CheckInExtension("Spatial"))

But when I replace the arcpy.Plus_3d . . . command with the following:

(arcpy.Raster(file_path + '/Band_2') + arcpy.Raster(file_path + '/Band_3')).save('added_bands_4.tif')

I get the error message:

Process finished with exit code -1073741819 (0xC0000005)

I get the same error message when I use other Map Algebra tools that are unique to the Spatial Analyst package (as opposed to also being available from the 3D analyst package, as Plus_3D() is).

Does anyone have any ideas why this might be happening and how to fix it?

I'm using ArcGIS Desktop 10.5.1.


texts: After performing a table join, all the fields are "NULL"

texts:
Within QGIS, I joined .dbf table containing population data to a shapefile of Census tracts.
The join field is called GISJOIN in both the target table and the shapefile's table, and this attribute has the "string" data type in both tables.
When I look at the attribute table of the population table after it is loaded within QGIS, all the data is there and looks fine.
When I compare the values of the GISJOIN fields in each table to each other, they match up perfectly.

HOWEVER when I perform the join, inside the Properties dialog, and then look at the shapefile's attribute table, all the new attribute headings are there, added in, but all the values are "NULL."

Any idea what is going on here?


texts: ASCII coordinates to geographic coordinates with GDAL?

texts:
I'm curious if anyone out there has written a python script or knows of one that allows the input of an ASCII file (pixel coordinates) and output of a numpy array or similar format for storing the actual geographic coordinates?

I can easily use GDAL to convert from ASCII to GeoTiff or something similar and then extract values using that raster but I'm curious if there is an easy way to do this directly without a GIS from:

ASCII Header Information
Known Coordinate System of ASCII

I think I should be able to use gdal_translate and gdal warp if I knew the projection equation.


texts: Error during visualization of many layers on Chrome (ExtJS, GeoExt, OpenLayers)

texts:
I've noticed that on the latest version of Chrome (36.0.01985) my application crashes when a lot of layers are displayed (and/or the browser is maximized and the map is zoomed out). In particular, the panels are not shown at all and the map is only partially rendered. No matter the kind of layer (raster, vector), the problem is always present when there is a lot of data to render. The problem doesn't occur on other browsers. I've also tested it also on an older version of Chrome (26) and interestingly, there was no error.

I'm actually using ExtJS 3.4, GeoExt 1.1 and OpenLayers 2.13.1 (I know they are oldies, but till now they worked very well).
I'm also wondering if an upgrade of these tools could solve the problem or only make me feel younger.

Tips?


texts:
I am trying to run a python script to merge some files in a folder test, called test1.shp, test2.shp, test3.shp.
The code is this:

import os
import arcpy
workspace = "C:/mypath/test/"
prefixed = [filename for filename in os.listdir(workspace) if filename.startswith("test")]
total = "C:/mypath/test/Merged.shp"
arcpy.Merge_management(prefixed, total)

and I keep having the same error:

ERROR 000732:  Dataset test1.cpg;test1.dbf;test1.prj;test1.sbn;test1.sbx;test1.shp;test1.shp.xml;test1.shx;test2.cpg;test2.dbf;test2.prj;test2.sbn;test2.sbx;test2.shp;test2.shp.xml;test2.shx;test3.cpg;test3.dbf;test3.prj;test3.sbn;test3.sbx;test3.shp;test3.shp.xml;test3.shx does not exist or is not supported Failed to execute (Merge).

I tried to force to merge only .shp files adding 'and filename.endswith(".shp"), and I have the same error, only with only .shp files.

I tried with a list in which each file has the entire path:

l =[]
for i in prefixed:
     l.append ('"'+workspace +i+'"')
total = "C:/mypath/test/Merged.shp"
arcpy.Merge_management(l, total)

I tried to write my path using ' or using '//' instead, but I always have the same error message.

If I try a simple:

total = "C:/mypath/test/Merged.shp"
arcpy.Merge_management(["C:/mypath/test/test1.shp", "C:/mypath/test/test2.shp", "C:/mypath/test/test3.shp"], total)

everything works fine.

Can anybody help me?


texts: Feature linked annotation subtype removal in migrating to ArcGIS 10

texts:
I have a question about emergent properties of deleting an annotation subtype.  If we delete an annotation subtype how will this effect the annotation feature class, will there be any changes to the visible annotation the active data frame?  I haven’t seen any changes with the removal of the subtype, but it seems too good to be true.

Background info:

In our enterprise implementation, we are in the process of upgrading from a 9.2 to 10 data format, to help achieve this we came up with a Python script, turns out there are quite a few databases that fail at the  arcpy.UpgradeGDB_management() method.  The exception is:"The feature class' default subtype code cannot be retrieved or is invalid” In order to resolve this issue we removed the Annotation’s subtype and the script will run just fine.

Thanks in advance.


texts: When does a local system introduce errors in a map due to the earth's curvature?

texts:
If the extent of a map is very small, like a building plan, there is no coordinate reference system used.

To which scale/size of building is that acceptable? Of course it depends on the precision requirements, but maybe there is a general rule of thumb or some fixed values?


texts: Best method to aggregate 1m DEM mosaic to 10m DEM

texts: I have a mosaic of a 1m LiDar derived DEM.  I need to output a subset of the data as a 10m DEM.  I am currently using the aggregate tool in ARCGIS 10 to produce a mean value for each new 10m pixel.  Any advice on whether this is the best technique for such as task?  Is the mean value the best approach with this type of data?


texts:
This is a question in regard to requesting town/city GIS data that is hosted on a private server.

For example, one of the towns I am working with, Mattapoisett MA USA, has its GIS data hosted with the group at www.peoplegis.com. I have used state data before which is easily accessible on the Massachusetts government repository however is not very up to date. The town data is more up to date and thus the interest in tapping that resource.

That being said, does anyone have any experience requesting data like this from towns/cities where the GIS systems they use are private and only accessible to the public via GIS web maps?

Is going to the town hall asking the assesor my best bet? Thought I would reach out to the community first and see what anyone has to say. Any input would be awesome, good or bad haha!


texts: Grid interval settings crash before changing values in print composer of QGIS

texts:
I am using QGIS 2.4 in Mac OS 10.10 Yosemite. Just trying to produce a map with cartographic symbology in the print composer. Map data: polygon and line shapefiles projected in SAD69 / UTM zone 23S/ EPSG:29193, drawing scale 1:124,051. First, I add a new map on canvas and change map scale; thereafter, I try to create a grid from item properties, in the following order: I select the Show grid checkbox; then, I select cross option as the grid type; next, I change both X and Y interval to, say, 10.0000000. Here is the point: after changing Y interval, Mac OS spinning beach ball of death appears and QGIS stops responding.

What am I doing wrong or skipping steps in the construction of the grid?


texts: Using PyShp to convert polygons in *.csv to *.shp files?

texts:
I'm converting csv data to shapefiles using the pyshp python library. What I want to do is very similar to Using pyshp to convert .csv file to .shp?, except that I don't know how to handle polygons.

My data is in a csv file. Each row corresponds to a named rectangle, i.e. a string and the latitude or longitude coordinates of each side of the rectangle:
left side (xl), right side (xr), top (yt) and bottom (yb).

So my data looks like this:

name,xl,xr,yt,yb
some Name,-25.3125,22.5,47.517193,31.353634
another Name,-103.359375,-0.703125,80.87282,74.40216
...

And my python code is pretty simple. It is only slightly modified from the points example. But when I try to import this data into google maps, it has some errors parsing it. So I think I'm doing something wrong, but I'm not sure what?

#Set up blank lists for data
name, polyPart = [],[]

#read data from csv file and store in lists
with open(in_file, 'rb') as csvfile:
  r = csv.reader(csvfile, delimiter=',')
  for i,row in enumerate(r):
    if i > 0: #skip header

      # parse data into a point array representing the bounding box
      xl = float(row[1])
      xr = float(row[2])
      yt = float(row[3])
      yb = float(row[4])
      tl = [xl, yt]
      tr = [xr, yt]
      br = [xr, yb]
      bl = [xl, yb]
      parr = [tl, tr, br, bl, tl]

      # array of one "part", the part is an array of points
      polyPart.append([parr])
      name.append(row[0])

#Set up shapefile writer and create empty fields
maxStringLength = 50
w = shp.Writer(shp.POLYGON)
w.field('name','C',maxStringLength)

#loop through the data and write the shapefile
for j, name in enumerate(name):
  w.poly(parts=polyPart[j])
  w.record(name)

#Save shapefile
w.save(out_file)


texts: Transferring attributes based on location in QGIS?

texts:
I am using QGIS and I have a shapefile (shp1) mapping all private properties in a region, and another one, with the states boundaries.

The attributes tables have no field in common.

What I would like to do is to add a field on shp1 regarding the state that polygon is located.


texts: Truncate a Shapefile field with SQL and ogr2ogr

texts:
I want to create a new attribute which is the first 8 characters of another, using ogr2ogr. To my surprise, this didn't work:

ogr2ogr -f "ESRI Shapefile" a.shp b.shp -sql "select FID,left(FLOORKEY,8) AS BLDGKEY,*"
ERROR 1: SQL Expression Parsing Error: syntax error, unexpected LEFT. Occured around :
select FID,left(FLOORKEY,8) AS BLDGKEY,*
           ^

Choosing the sqlite dialect didn't help either:

ogr2ogr -f "ESRI Shapefile" a.shp b.shp -dialect SQLITE -sql "select FID,left(FLOORKEY,8) AS BLDGKEY,*"
ERROR 1: In ExecuteSQL(): sqlite3_prepare(select FID,left(FLOORKEY,8) AS BLDGKEY,*):
  near "(": syntax error

What am I missing? It's GDAL 1.11.0, released 2014/04/16.


texts: Does multimodal network need a physical intersection between a point (terminal) and a line (rail or road)?

texts:
I have created a network dataset with rail, road, and intermodal terminals and set up the connectivity so that you can only travel in-between the two at the terminals. Terminals realistically can be hundreds of yards long and wide, and can connect to multiple roads and rails. It makes sense that my points are located between rail and road but none of them are intersected, so I cannot traverse through both segments. I am working with all of North America so manually creating lines is out of the question. I would think to be realistic that I should not have to connect them, and ArcMap would pick up on this (in an ideal world). Any suggestions would be great! Also help with setting parameters for terminals that transfer one way or both ways between rail and road would be beneficial as well.

Thank you
Ben


texts: How to label GeoJSON polygons from properties using OpenLayers 3?

texts:
I have a working script to show GeoJSON feature and style them by properties/attributes. But when I tried label the feature browser said 'feature is not defined'. Can anyone help with a working label script?

code:

    var areal = new ol.layer.Vector({
    source: new ol.source.GeoJSON({
        defaultprojection: 'EPSG:4326',
        projection: 'EPSG:3857',
        url: 'data/tes.geojson'
    }),
    style: (function() {
      var style08 = [new ol.style.Style({
        fill: new ol.style.Fill({color: '#ff0000'}),
        stroke: new ol.style.Stroke({color: 'black', width: 1}),
        text: new ol.style.Text({
            font: '12px Verdana',
            text: feature.get('ARESTA'),
            fill: new ol.style.Fill({color: 'black'}),
            stroke: new ol.style.Stroke({color: 'white', width: 0.5})
            })
      })];
      var style12 = [new ol.style.Style({
        fill: new ol.style.Fill({color: '#55ff00'}),
        stroke: new ol.style.Stroke({color: 'black', width: 1}),
        text: new ol.style.Text({
            font: '12px Verdana',
            text: feature.get('ARESTA'),
            fill: new ol.style.Fill({color: 'black'}),
            stroke: new ol.style.Stroke({color: 'white', width: 0.5})
            })
      })];
      var style13 = [new ol.style.Style({
        fill: new ol.style.Fill({color: '#0070ff'}),
        stroke: new ol.style.Stroke({color: 'black', width: 1}),
        text: new ol.style.Text({
            font: '12px Verdana',
            text: feature.get('ARESTA'),
            fill: new ol.style.Fill({color: 'black'}),
            stroke: new ol.style.Stroke({color: 'white', width: 0.5})
            })
      })];
      return function(feature, resolution) {
        if (feature.get('ARESTA') == 'Areal Tahun Tanam 2008') {
          return style08;
        } else if (feature.get('ARESTA') == 'Areal Tahun Tanam 2012') {
          return style12;
        } else {
          return style13;
        }
      };
    })(),
});

var map = new ol.Map({
    target: 'map',
    layers: [
        new ol.layer.Tile({
        source: new ol.source.OSM()
    }),
    areal
    ],
    view: new ol.View({
        center: ol.proj.transform([104.15, -5.06], 'EPSG:4326', 'EPSG:3857'),
        zoom: 13
    })
});

geojson (not a complete code, just for example):

    {
"type": "FeatureCollection",
"features": [
{ "type": "Feature", "properties": { "ESTATE": "COBA", "AFDELING": "01", "BLOK": "C016", "KODE_ORG": "SOGE01C016", "ARESTA": "Areal Tahun Tanam 2013", "TT": "2013 - 03", "BIBIT": "MARIHAT" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 104.160343, -5.059834 ], [ 104.160346, -5.059834 ], [ 104.160841, -5.059825 ], [ 104.160850, -5.059825 ], [ 104.160851, -5.059825 ], [ 104.161012, -5.059816 ], [ 104.161145, -5.059825 ], [ 104.161145, -5.059825 ], [ 104.161147, -5.059826 ], [ 104.161552, -5.059826 ], [ 104.161553, -5.059826 ], [ 104.161796, -5.059817 ], [ 104.162750, -5.059818 ], [ 104.163308, -5.059828 ], [ 104.163309, -5.059828 ], [ 104.163310, -5.059828 ], [ 104.163616, -5.059819 ], [ 104.163617, -5.059819 ], [ 104.163618, -5.059819 ], [ 104.163725, -5.059810 ], [ 104.164434, -5.059811 ], [ 104.164595, -5.059820 ], [ 104.164748, -5.059829 ], [ 104.164750, -5.059829 ], [ 104.164966, -5.059830 ], [ 104.164967, -5.059830 ], [ 104.165309, -5.059821 ], [ 104.165849, -5.059821 ], [ 104.165850, -5.059821 ], [ 104.166453, -5.059813 ], [ 104.166453, -5.059813 ], [ 104.166994, -5.059804 ], [ 104.167578, -5.059796 ], [ 104.167748, -5.059805 ], [ 104.167750, -5.059805 ], [ 104.167772, -5.059805 ], [ 104.167794, -5.059813 ], [ 104.167796, -5.059813 ], [ 104.167798, -5.059814 ], [ 104.167799, -5.059814 ], [ 104.167799, -5.059973 ], [ 104.167799, -5.059975 ], [ 104.167800, -5.059978 ], [ 104.167800, -5.059979 ], [ 104.167808, -5.060030 ], [ 104.167808, -5.060605 ], [ 104.167798, -5.060803 ], [ 104.167798, -5.060805 ], [ 104.167797, -5.061934 ], [ 104.167790, -5.062050 ], [ 104.167790, -5.062050 ]

The part of error is:

    text: feature.get('ARESTA'),

Any help?


texts: Line to feature from label in ArcGIS Pro?

texts:
I want to have a line from each label to the features it labels. I am trying to a label a lot of features in a small space and need it to be clear which label coresponds to which feaure.

How can I achieve this in ArcGIS Pro 2.3?


texts: Is it possible to change the measurement unit in QGIS 3.2 for the select features by radius tool?

texts:
Is it possible to set the default units for the select features by radius tool?

I believe the default is set to meters but I can not seem to get it to use kilometers or miles for example. I know you can set the default units for the measure tool under Settings > Options > Map Tools but this does not effect the units in the selection tool.


texts: Mapping Australian election results using QGIS?

texts:
I am interested in mapping Australian election results. There is a good tutorial here using British elections as an example. However, it relies on him joining two datasets using vlookup. I can't work out how he did that so can't follow the tutorial any further as he doesn't supply the completed file.

Also, I have downloaded a shp file of Commonwealth Electorates from here. However, they do not contain the names of the electorates so I cannot label them.


texts:
I have roads(MultiLineString)table in postgresql database. The roads are classified based on priority attribute i.e.

  priority = 6 for motorway
  priority = 5 for highway
  priority = 4 for expressway
  priority = 3 for major road
  priority = 2 for minor road
  priority = 1 for street

i need to select all roads that are parallel to motorways(priority = 6)and are within 50 meters distance from either side.

From the above image, i want to select the green color roads which are parallel to blue color roads.

Update:
i tried using buffer but this also returns the line which is not parallel to the blue line. As shown in the image below, the lines perpendicular to blue lines are also selected as a result.


texts: Prevent labels being cut off at edge when using Layout-Atlas

texts:
Im creating an atlas but the labels on the edges sometimes get cut off:

When it should look like this:

The text is coming from a Point layer, and the Point is located at the "E" letter above. I know of this question: Prevent labels being cut off / clipped at edge of map, but the solution is to not draw "Ekebäckshult" at all.

How can I make the labels draw correctly on the edges?


texts:
I have faced a problem with data preparation for hub line(s) analysis in Qgis. I have searched for a whole day for the solution to my problem. There are a few topics related with that subject, although I haven’t found any detailed and useful information that would help me to solve my problem.

I’d like to visualize the network of air/train connections between cities in Europe. I have the vector layer containing 20k cities as points.

I prepared a csv. sheet in which I marked hub cities and other cities to which connections are established.  The table looks like that:

I wanted to join that csv. table i.e. columns ‘hub id’ + ‘City_hub’ to the first copy of 20k cities layer.

Then columns “connected to” + “connected id” I’d like to join to the second copy of the20k cities layer.

However in that second layer, in the column: ‘connection id’ e.g. Berlin should have ‘1’, ‘2’ and ‘3’. How to do it where that particular column could store only one number?

I have seen a lot of images in the Internet f.e. http://michaelminn.com/linux/mmqgis/screenshots/mmqgis_hub_lines.png

This is the effect I’d like to achieve. The only solution that comes to my mind at the moment is that maybe should I copy and past ‘Berlin’ three times in the second layer? (but that method means a lot of work cause I cannot imagine how to automate it)


texts: Combining rows in an attribute table based on field

texts:
I am using ArcMap 10.2.2 on a Windows 7 PC.

I have shapefile range data for multiple species (multiple species in one layer), and this range data is accompanied by information relevant to the species.

Some of the species I am working with have discontiguous geographic ranges.  If species X has three disconnected places it lives, I have three different rows in my attribute table, with lots of redundant data (i.e. there are three rows with identical information EXCEPT the information that relates to the polygon size).  Because of this, I have about 3,300 rows for ~250 species.

I would like ArcMap to combine rows based on the species, but I can't seem to figure out how to do this properly.

I've tried dissolving based on the species name field (with multipart features), but when I do this, I just get a new layer with nothing in it.

Any suggestions?

I've tried all the things suggested in How to combine rows in attribute table using ArcGIS for Desktop? but none seem to be working.

ETA: Posted these in a comment, but here are some relevant screenshots:

My intended output would be for all of the highlighted rows in the first screenshot to become a single row.  And I would like that done for all ~250 species.

What I'm getting when I use dissolve:


texts: Intersection between a ray from lat, lon, alt, with pan, tilt and earth's surface

texts:
I have a problem that consists of finding the intersection point between a ray from a given lat, lon, alt, that is looking to a given pan and tilt angles and the earth's surface. I need the lat, lon point where this ray intersects with the earth surface.

Pan is a horizontal clockwise angle from true north, and tilt is a vertical angle: 0 pointing to earth's center, 90 to horizon, 180 sky. Depending on the given altitude, and the pan and tilt values, the ray may not intersect in any point with the earth.

Is there an easy way to compute this intersection?


texts: Change page setup in composer window using the QGIS API

texts:
Is it possible to use the QGIS API to change the orientation within page setup in the composer window.

We have a plugin that builds a map template based on user defined options. When they choose to print portrait maps page setup defaults to landscape.

I have trying adding this snippet of code to the plugin but that does not seem to do anything - perhaps it just changes the orientation of the map item?

    # Set orientation
    resText = self.ui.orientationComboBox.currentText()
    if resText.startswith('Portrait'):
        orient = 0
    else:
        #Landscape
        orient = 1
    composerView.composition().PaperOrientation(orient)


texts: Classifying concrete material through greyscale in ArcGIS Desktop?

texts: I get greyscale image successfully , but I have some query about pixel value classification, because concrete have cement,fine and coarse aggregate. How can I classify this material through greyscale? I need an unique identity pixel value for each material classification.or whether their are another method to get unique identity value for each concrete image.