texts: Is it possible to add polygon type of feature class into network mesh?

texts:
According to this article Network dataset contains basic features. Like Point and Line.
I want to add Polygon feature classes into the dataset, how do I do it?
Is there an additional step to connect the polyline to the roads?


texts: Stratified sampling from point data in ArcGIS Desktop?

texts:
I have 8000 points with a zipcode number.

Actually those are tweet points talking about zipcode, so multiple points have same number (e.g. 300 points with zipcode 32,805).

I want to get 800 sample points (as rule of having sampled mostly 10% of data) with stratified sampling where samples are drawn according to total number of points having same zipcode. e.g. 50 sample points from 300 points having 32,805 zipcode, maybe 10 from 100 points having zipcode 10,000 and so on.

I tried to find out sample questions to solve my problem but failed.

How can I do this in ArcGIS Desktop 10.3?


texts: leaflet problems displaying postgis table geoserver wms

texts:
I have a published postgis county table on geoserver. In the layer preview it looks like this

in my very simple JS code

<!DOCTYPE html>

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Leaflet Test</title>

Highlands Leaflet Test

what happens is when I display in the browser it looks like this

and gets all out of whack when I zoom around. I have tried setting the map view to another place and changed the zoom level and the problem remained.

I should note this layer is originally in 3424 (NJ state plane) and the reproject native to delcared. image shown below

EDIT 1

I brought a county layer that is in 4326 into geoserver and put it in place of the county0 layer and the same error occurs... does this have something to do with the tile settings?

EDIT 2

I replaced my own layer with a sample layer that came with the geoserver download 'usa:states' and the same problem occurred.

EDIT 3

I added the '?' after WMS and did not work, specified the version to 1.3.0 in the arguments. nothing is working at all. No idea why

what is going on here? why is this wrong???!!! I'm following the leaflet tutorial to a T


texts: Python script: "points to polygons" skipped fourth vertex

texts:
Using ArcGis 10.2

I have a script converting the nodes of a net into polygons. The polygons should be either triangles or rectangles but the script doesn't build polygon as rectangle, skipping the fourth vertice. Being not fluent in python, I can't spot the mistake: it looks like the Array stores or restitute only 3 values instead of 4. Could you please help me to fix this?

Here the code:

import sys
sys.setdefaultencoding('UTF8')
import arcpy
import os
outfileGDB =arcpy.env.workspace= arcpy.GetParameterAsText (0)
arcpy.env.overwriteOutput = True
polygonsFile = arcpy.GetParameterAsText (1)
verticesFile = arcpy.GetParameterAsText (2)
srtxt = arcpy.GetParameterAsText(3)
sr = arcpy.SpatialReference()
sr.loadFromString(srtxt)
Output = arcpy.GetParameterAsText(4)
polygontable = arcpy.TableToTable_conversion(in_rows=polygonsFile,
                                  out_path= outfileGDB,
                                  out_name="polygons_table",
                                  where_clause="")
vertextable = arcpy.TableToTable_conversion(in_rows=verticesFile,
                                  out_path= outfileGDB,
                                  out_name="vertices_tables",
                                  where_clause="")
outfc =arcpy.CreateFeatureclass_management (outfileGDB,Output,"POLYGON","#","DISABLED","ENABLED",sr)
arcpy.AddField_management (outfc,"ID_el", "LONG", "", "", "", "", "NULLABLE")
with arcpy.da.SearchCursor(polygontable,["OID@","Eltyp","ID_el","IDpt1","IDpt2","IDpt3","IDpt4"]) as poly_cur:
    print "polygons"
    if "ELtyp"== "E3T":
        poly_dict = {x[2]: x[3:5] for x in poly_cur}
    else:
        poly_dict = {x[2]: x[3:6] for x in poly_cur}
with arcpy.da.SearchCursor(vertextable,"*") as vertex_cur:
    print "vertices"
    vertex_dict = {x[1]: x[2:] for x in vertex_cur}
polyArray = {}
for polykey in poly_dict:
    polynodes = poly_dict[polykey]
    coordsList = []
    for polynode in polynodes:
        coords = (v for k,v in vertex_dict.iteritems() if k == polynode)
        for coord in coords:
            coordsList.append(coord)
    polyArray[polykey] = coordsList
features = []
for key,values in polyArray.iteritems():
    features.append((key,arcpy.Polygon(arcpy.Array([arcpy.Point(*value) for value in values]), sr,
                                      True))) #True - for has_z parameter
for feature in features:
    with arcpy.da.InsertCursor(outfc,["ID_el","SHAPE@"]) as cur:
        cur.insertRow(feature)
arcpy.JoinField_management(outfc,"ID_el",polygontable,"ID_el",["IDpt1", "IDpt2", "IDpt3", "IDpt4", "Mat"])


texts:
Whenever I'm attempting to perform Switch selection in ArcMap table I'm always presented with this friendly prompt:

I'm fully aware of 'dangers' of this operation, and I think I could live without this warning.

Is there a way to switch it off?


texts: ArcGIS files exported using 10.3 gives error when opening in ArcGIS 10

texts:
I received two gdb files that were exported using 10.3.

When opening/ importing to a geodatabase in ArcCatalog 10 I get an error that one file is missing, ArcCatalog continues to open but the geodatabases have all the feature classes and datasets they are supposed to have but there is no data in each feature class, is this an ArcGIS versioning mismatch issue or is the data corrupted?


texts: Different page sizes in Data Driven Pages?

texts:
Is it possible to set different page dimensions for maps within a single Data Driven Page series? For example have some of the series 11 x 17 inches, others 17 x 11 and a third 18 x 24.

The only solution I've come up with to date is split the series up into 3 sets, but then I'm jumping back and forth between them when symbols are tweaked and so on; something is always left out.


texts: Get Intersections of polygons in same layer in R (or Qgis)

texts:
I am trying to get the intersection of the following buffers in R:

I know that for two shapefiles with gIntersects or st_intersection I can get the intersected areas between two shapefiles. However, these belong to the same shapefile, and hence are stored within the same layer. How could I get back ALL of the intersections? For instance, in the image we can see that there are 3 intersecting circles. I would like to get all 4 intersections: 1U2,2U3,1U3 and 1U2U3. Is this possible?


texts: Creating a raster layer from scratch in pure PyQGIS

texts:
How can I create a raster layer from scratch in pure PyQGIS?
Let's say I have everything necessary:

A bunch of numeric values (which are easily turned into a compatible form like Python bytes or a Qt QByteArray if necessary)
Information on the raster's georeferencing parameters (CRS, transform, pixel size, dimensions, whatever, ...)

How do I turn this into a raster layer in memory and load that as layer in QGIS?
I have read the documentation and searched the web without finding any pointers.
I am looking for a "canonical", pure pyqgis solution. Only APIs that are always available in a current, default QGIS installation are allowed. I will not accept answers using the gdal or rasterio package APIs.


texts: How to extract raster attributes by lat/long location?

texts:
How can you extract an attribute value from a raster from a point (lat/long)?

Example data: Raster with attribute table - value of interest is temperature

I have a list of points with lat/long values, which I want to extract the temperature values for. The raster contains multiple attribute values, temp is not the "pixel" value


texts:
We recently migrated from ArcMap 9.3 to 10.6.1. Since migrating we are experiencing issues with polygons changing after we hit finish sketch. This usually happens when there are curves or indents present.

I found Why is ArcMap editor deleting some added vertices and simplifying polygon? and was wondering if any of the answers solved the user's problem.

I am new to ArcMap.

We had our consultant's take a look and here is what they said they did, which seems to have mostly fixed the issue (for now): "I grouped all of the feature classes together and copied them from the original data frame to a new one in the same mxd. This kept them in the same drawing order. The new data frame was set to use a reference scale of 1:1500 and the maps table was added to the mxd (as user cmaccarthy). The maps table was rejoined to the data driven page feature class. The original data frame was removed which also removed the north arrow and the scale bar from the layout. A new north arrow and scale bar was added to the new data frame."  Does this make sense to any of you seasoned ArcMap users?  I'm still trying to understand what was wrong and how to fix it.


texts: One single cURL command to delete a GeoServer raster layer (coverage) from a coveragestore via REST

texts:
I have published a GeoTIFF image to a GeoServer coveragestore as a layer.

In order to delete the layer I had to run the following two cURL commands:

curl -v -u admin:geoserver -XDELETE http://localhost:8090/geoserver/rest/layers/{WORKSPACE}:{LAYER}.xml

curl -v -u admin:geoserver -XDELETE http://localhost:8090/geoserver/rest/workspaces/{WORKSPACE}/coveragestores/{COVERAGESTORE}/coverages/{COVERAGE}.xml

I was unable to find any documentation regarding deleting a coverage on GeoServer, so I am wondering if it's possible to just run one command to complete the coverage delete via GeoServer REST.


texts: Creating thematic map where individual values are displayed as colors and range values are displayed as shades of those colors?

texts:
I am trying to create the following thematic map using Mapinfo professional:

I have point data that is displayed as a grid. I need to create a thematic map where I show two fields - one representing the land use type (individual values) and one representing  emissions (ranges). I need to show each of the four land use types with different colors. The shade i.e. darkness of each color represent the emissions produced by that land use type. I want to make two legends, one displaying the land uses (colors), one showing the ranges for emission data.

Below is an example of what I am trying to create.


texts: Getting coordinates at location n meters from known point to NW and SE using ArcPy?

texts:
I have a point shapefile or feature class and I want to create bounding boxes around each point.  The size of the bounding box will depend on user input, for example the user might want a bounding box of 50 x 50 meters.

The shapefiles are in WGS 84.  This boils down to getting the x/y coordinates of a point x meters away from the existing point to the South East and to the North West (bearing 135 and 315 degrees).

How can I use arcpy to get the x/y coordinates of a point n meters away to the NW and the SE?


texts: Batch mxd processing returns AssertionError: Invalid mxd filename?

texts:
I have a number of .mxd files in a folder, in which i need to run certain operations. On one of them, specifically, when I try assigning it to a variable, I keep getting this error (and it's not the first of the lot):

Traceback (most recent call last):
  File "<pyshell#29>", line 1, in <module>
    mxd = arcpy.mapping.MapDocument(mxd_path)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\arcobjects\mixins.py", line 611, in __init__
    assert (os.path.isfile(mxd) or (mxd.lower() == "current")), gp.getIDMessage(89004, "Invalid MXD filename")
AssertionError: Invalid MXD filename.

However, I'm pretty sure the name of the file is correct, and I can normally open it in ArcMap. Would anyone know what could be causing it? Here is the code I've been using to do it (fully functional for the others...):

import arcpy
import os
from os.path import join
mxdPath = "C://1331/DB/Original Files/MXD/"
for root, dirs, filenames in os.walk(mxdPath):
        for f in filenames:
        mxd_path = os.path.join(root, f)
        mxd = arcpy.mapping.MapDocument(mxd_path) #This line returns the error for one specific file

        #Some processing on the file: changing references, saving it as new file, etc;
        del mxd

If it helps, the problematic file is called: "Figura 2.11 - Áreas Prioritárias.mxd". I've tried changing its name (other files have spaces and special characters, but the code runs without an issue for them), but it didn't help either.
All the other files in the folder were made by the same person and in the same version of ArcGis, and are named alike. Eg: "Figura 2.10 - Unidades de Conservação", "Figura 2.13 - Densidade Demográfica", etc. The code works for these without an issue.


texts: Save Polygons as new Features in geoserver

texts:
I enabled the functionality to draw Polygons, as in the example. http://dev.openlayers.org/examples/draw-feature.html

Now I want that, once I created a polygon, this polygon is saved as a feature from an underlying WFS layer.

How can I do this?


texts: restrict quantity of features displayed with OpenLayers

texts:
I have 14000 point vector features in the map. Displaying them all is very slow (renders at like 1 fps in chrome).

How can I tell Openlayers to only display a subset of them, for example features with the highest priority attribute ?

I've seen that there is a max-scale and min-scale property that could be useful, but it's layer-wide and I think I need a per-feature option.


texts:
UPDATE: LEAFLET fixed support for EPSG 4326 (LL84) in the latest betas: https://github.com/Leaflet/Leaflet/issues/1207

Leaflet says it supports EPSG 4326 (Plate Carree, aka ll84) projections. I think it does, but take a look at these two jsfiddles:

http://jsfiddle.net/drysg/cBzVc/  - This is the original 3857 web Mercator. As you can see the overlay of both the tiles and the red outline are properly placed near Kraknow. (click the mouse on the map and you get the lat/long as a popup).

Ok, now look at:

http://jsfiddle.net/drysg/XPP54/ - This is in EPSG 4326 (ll84).

The background is a MapCarta ll84 slippy tiles. It seems that leaflet does not know about the 2x1 aspect ratio that OSG wants. That is why the background wraps (http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#global-geodetic)  Well, if they want to support that fine. I am actually happier with with a 1x1 map (I can generate that with SAFE FME). So ignore that for a while.

Switch the background to the CloudMade OSM map (ingore that the origin is at 85N, so that the map is 5 degrees shifted to the south).

Now everything looks correct, to me.

The only thing I need now is to figure out the formula for the SLIPPY tile numbering. The web page at http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames

Shows how to do this for Web Mercator. What would the formula be for LL84, where the map bounds are not (-85, -180; 85, 180) but rather (-90, -180; 90, 180)


texts:
I have two lines in ArcMap 10.2.2 and was wondering if it is possible to create a raster showing the Euclidean Distance between them.

How do I map each cell on one line to its nearest cell on the other line?


texts: Making spatial lag variable in ArcGIS Desktop?

texts:
How do I make a variable in ArcGIS 10 called a 'spatial lag'?

I'm trying to set up this variable in GIS for use in a regression model.


texts: Skipping rows when double white space pandas

texts:
My textfile raw data looks like this:

 ID   x1    x2
 1    4.3   4.7
 2          3.2
 3    3     5.6
 4          2.1

There are double spaces in the text file where there is no x1.

Then when reading into pandas using:

 df = pd.read_csv(filename,delim_whitespace=True)
 #or trying
 df = pd.read_csv(thia_concat,  sep = "\s+")

creates a data frame like this:

 ID   x1    x2
 1    4.3   4.7
 2    3.2   nan
 3    3     5.6
 4    2.1   nan

I can't figure out how to tell pandas what to do with the double space to assign the value to x2 and not x1. Any suggestions?


texts:
I am trying to install the midvatten plugin, and the following error is given:

QGIS version is 2.18, running on Ubuntu 18.04 LTS.
Has anyone come across this error or has any suggestions?


texts:
I have created contour lines from DEM and now I need to create hachures/bergstrich for them. I believe that spatial analyst should solve this, but I'm not used to it and I didn't found any similar tutorials.

Any solutions will help.


texts: Installing python-mapscript in virtualenv

texts:
I am on a django project where I want to use the python implementation of the mapserver mapscript library. I was able to install mapserver and python-mapscript from source.

However, due to the project setup I am forced to run django in a virtualenv that does not allow site-packages in my virtual environment.

Since mapscript is installed as a global site-package my django app can't see the mapscript installation. When I try to install mapscript through pip install mapscript I get an error 'mapserver.h' file not found.

How can I install python-mapscript in my virtual environment?

I thought of copying the installed egg into my virtual environment, but I am not sure if that is possible.


texts: Why can't I share project files with another QGIS user?

texts:
I am working with another QGIS user at a separate location and we want to share the projects that I have already created using QGIS. However, the other user is unable to open the project files in QGIS. This problem has occurred when sharing via USB stick or via files shared in Dropbox.

Could there be an issue with the fact that I installed the standalone version of 1.8.0 whilst my colleague installed the OSGeo4W version?


texts: AoInitialize - "ArcGIS product not specified." 10.1 Student Edition single use license

texts:
I have a Student Edition of ArcGIS 10.1 for Desktop Advanced.  My license is set up on my machine as single use.  I am trying to initialize the license in ArcObjects, however I get the following error:

"ArcGIS product not specified.  You must first bind to an ArcGIS version prior to using any ArcGIS components."

This occurs when I call AoInitialize.IsProductCodeAvailable() which doesn't make sense, since that is how you figure out what license to initialize in the first place.  Here is my code:

public static esriLicenseStatus Intialize(
        ESRI.ArcGIS.esriSystem.esriLicenseProductCode esriLicenseProductCode)
    {
        IAoInitialize aoInitialize = new AoInitialize();
        esriLicenseStatus esriLicenseStatus =
            aoInitialize.IsProductCodeAvailable(esriLicenseProductCode);

        if (esriLicenseStatus == ESRI.ArcGIS.esriSystem.esriLicenseStatus.esriLicenseAvailable)
            esriLicenseStatus =
                aoInitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeAdvanced);

        return esriLicenseStatus;
    }

What am I doing wrong?  Does this have to do with it being Student Edition?


texts:
I'm trying to apply one of predefined color ramps to a categorized field in a vector layer.  To do this, I'm using the code below suggested by Irssvt in another post.

However, I can't see the result in map canvas unless I manually use the "Classify" button on the layer properties dialog. Is there something missing in my code? Is there a way do programmatically make the classify action?

myStyle = QgsStyleV2().defaultStyle()
defaultColorRampNames = myStyle.colorRampNames()
ramp = myStyle.colorRamp(defaultColorRampNames[4])
renderer = QgsCategorizedSymbolRendererV2("SETOR", [])
renderer.setSourceColorRamp(ramp)
sslyr.setRendererV2(renderer)
# Publica e dá zoom
QgsMapLayerRegistry.instance().addMapLayer(sslyr)
iface.setActiveLayer(sslyr)
iface.zoomToActiveLayer()
canvas = iface.mapCanvas()


texts: pyproj does not properly convert EPSG:3760 to WGS 84

texts:
I have coordinates stored in EPSG:3760. I can use https://epsg.io/transform to transform these properly to WGS 84 GPS coordinates, like so:

As seen in the photo, my coordinates (1728779.950564162, 81827.07350218101) are successfully converted to GPS (-157.7402677, 21.3917278). I have verified these coordinates using a map.

Trying to use pyproj, however, gives me a different result.

>>> import pyproj
>>> pyproj.__version__
'1.9.5.1'
>>>
>>> p1 = pyproj.Proj(init='epsg:3760')
>>> p2 = pyproj.Proj(init='epsg:4326')
>>>
>>> x = 1728779.950564162
>>> y = 81827.07350218101
>>>
>>> pyproj.transform(p1, p2, x, y)
(-146.20443693009113, 21.483194748289176)

Why is pyproj giving me different and inaccurate results?


texts: Determining the Coordinate system for set of points


texts: How to extract transformation coefficients calculated with GDAL based on GCPs?

texts:
I want to precompute the least squares fit polynomials from a provided set of GCPs, and store the coefficients for later transformation of points between pixel/line and georeferenced coordinates. Thus I could transform only a part on an image using precomputed transform. Is it possible to extract the transform calculated with GDAL based on GCPs?

I know it's possible to transform only a part on an image based on a RPC model, by slightly changing the RPC file to correspond to the given part of an image. So I've tried to use Orfeo Toolbox utility GenerateRPCSensorModel to convert GCPs into RPC model, but the results weren't good...

EDIT
I'm writing code in Python


texts:
I need to join a polygon shape to the attributes contained in a shape containing three points ( all within the polygon ) with different information.

Using the command  merge attributes by position  I get a new shape that includes only the attributes of the first point .

Is there a command to acquire the attributes of the three points so that querying the polygon I have the attributes of the three points on one line in the table ?


texts: Arcpy iteration in folder for all shp equivalent

texts:
I want to write a scrpit that automatize the process of clip and project (in one GCS) to many .shp in folders and subfolders (row downloaded data), with 2 different GCS (CH1903+ or Lambert93).

For that, my script creates a new gdb with 2 feature_class: "Row" and "Clip_Project" then, I'm trying to create a loop to iterate all the feature class in my folders and subfolders.

I understood that the equivalent of "iterate feature class" in python is to define a list with

fcList=arcpy.ListFeatureClasses()

and then you create a loop: for fc in fcList

and add your function

The problem is that this function creates only a list of the .shp in the defined workspace . Since all my raw datas are classified in different subfolders, I want to find a way to get all .shp in all subfolders.

For now, my script looks like this:

# Import arcpy module
import arcpy, sys, string, os

# allow overwrite
arcpy.env.overwriteOutput = True

# Set Geoprocessing environments
workspace=arcpy.env.workspace = "C:\\PROG"

# Local variables:

Test_classement = "C:\\PROG\\MB_PROG\\Test_classement"
Coordinate_System = "PROJCS['RGF_1993_Lambert_93',GEOGCS['GCS_RGF_1993',DATUM['D_RGF_1993',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['False_Easting',700000.0],PARAMETER['False_Northing',6600000.0],PARAMETER['Central_Meridian',3.0],PARAMETER['Standard_Parallel_1',44.0],PARAMETER['Standard_Parallel_2',49.0],PARAMETER['Latitude_Of_Origin',46.5],UNIT['Meter',1.0]];-35597500 -23641900 10000;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision"
Output_Coordinate_System_LV95 = "PROJCS['CH1903+_LV95',GEOGCS['GCS_CH1903+',DATUM['D_CH1903+',SPHEROID['Bessel_1841',6377397.155,299.1528128]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Hotine_Oblique_Mercator_Azimuth_Center'],PARAMETER['false_easting',2600000.0],PARAMETER['false_northing',1200000.0],PARAMETER['scale_factor',1.0],PARAMETER['azimuth',90.0],PARAMETER['longitude_of_center',7.439583333333333],PARAMETER['latitude_of_center',46.95240555555556],UNIT['Meter',1.0]]"

Brute_gdb = "C:\\PROG\\MB_PROG\\Test_classement\\Brute.gdb"
Brute = "C:\\PROG\\MB_PROG\\Test_classement\\Brute.gdb\\Brute"
ClipLV95 = "C:\\PROG\\MB_PROG\\Test_classement\\Brute.gdb\\ClipLV95"

# Process: Create File GDB
arcpy.CreateFileGDB_management(Test_classement, "Brute", "CURRENT")

# Process: Create Feature Dataset
arcpy.CreateFeatureDataset_management(Brute_gdb, "Brute", Coordinate_System)

# Process: Create Feature Dataset (2)
arcpy.CreateFeatureDataset_management(Brute_gdb, "ClipLV95", Output_Coordinate_System_LV95)

#Loop->iterator
fcs = []
walk = arcpy.da.Walk(workspace,datatype="FeatureClass",type="All")
for dirpath, dirnames, filenames in walk:
    for filename in filenames:
    fcs.append(os.path.join(dirpath, filename))

        for fc in fcs:
        root, ext = os.path.splitext(fc)
        arcpy.FeatureClassToFeatureClass_conversion(fc , Brute, root + "_brute" + ext, "")

Execpt for typing and indentation errors, my loop didnt work to rename new feature classes because the root was all the path.

I fixed the last part like this:

workspace_brute=arcpy.env.workspace="C:\\PROG\\MB_PROG\\DONNEES\\"

fcs = []

walk = arcpy.da.Walk(workspace_brute,
                     datatype="FeatureClass",
                     type="All")

for dirpath, dirnames, filenames in walk:
    for filename in filenames:
        fcs.append(os.path.join(dirpath, filename))
        for fc in fcs:
            name=os.path.splitext(filename)[0] # Here we remove the extension from filename
            arcpy.FeatureClassToFeatureClass_conversion(fc, Brute_fd, name + "_brute")


texts:
i've just been saving (via /save as) a geopackage in qis (2.18.11) - which worked pretty fine. the output layer CRS information is correctly identified as WGS84 includig EPSG code (4326).

the same geopackage in arcgis 10.4 (and 10.5) is identified as a WGS84 but EPSG information is missing - thus the feature class properties are set to "Custom" by arcgis. as a consequence the relavant information for arcgis' semi-automatic transformation is missing, which results in serious troubles with projection on the fly for any kind of non WGS84-based projection.  as far as i could figure out the CRS settings of the geopackage can't be changed within arcgis.

is there

a way to verify the CRS-settings of the geopackage (with an external tool) ?
a way to edit that settings with any kind of tool ?
or a known workaround for arcgis ?


texts:
I get the following error when trying to run rio-terrain on a GeoTIFF file :
$ rio aspect input.TIF output.TIF
Running aspect on sequential raster blocks
Blocks done:  [#################################---]   93%  00:00:30
Traceback (most recent call last):
  File "rasterio/_io.pyx", line 1389, in rasterio._io.DatasetWriterBase.write
  File "rasterio/shim_rasterioex.pxi", line 142, in rasterio._shim.io_multi_band
  File "rasterio/_err.pyx", line 182, in rasterio._err.exc_wrap_int
rasterio._err.CPLE_AppDefinedError: An error occurred while writing a dirty block from GDALRasterBand::IRasterIO

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/rio", line 8, in <module>
    sys.exit(main_group())
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/zenaterra/.local/lib/python3.6/site-packages/rio_terrain/cli/aspect.py", line 77, in aspect
    dst.write(result.astype(profile['dtype']), 1, window=write_window)
  File "rasterio/_io.pyx", line 1391, in rasterio._io.DatasetWriterBase.write
rasterio.errors.RasterioIOError: Read or write failed. An error occurred while writing a dirty block from GDALRasterBand::IRasterIO

Although input.TIF didn’t seem corrupted, I downloaded it again but it did not help.
What can I do ?


texts:
i am using arcgis server 10. first i opened arcmap and added a.tif file. then i saved it using

 File ->  Save As

as a ArcMap Document (*.mxd) file, let's say b.mxd.

Now i open arccatalog and added arcgis server let's say "test". then by right click on this server i added new service (my b.mxd). when i press finish, it says the following:

 Server Object instance on machine arcgis-server is created with errors.
    The Layer: 'a.tif' in Map: 'Layers' is invalid.
 Failed to open raster dataset

Can you explain what am i doing wrong?


texts: Creating lines from points in QGIS, python error ( 'NoneType' object has no attribute 'asPoint' )

texts:
I'm new to Qgis, and i'm stuck with a simple task, I have a csv file with points coordinates and i would like to connect those points in a path, I'm working with wildlife movement data.
i've tried with the qgis algorithm and several plugins like Points2one, PointsToPath, and Point Connector but every time I get the same python error.
This is the log:

Traceback (most recent call last):
              File "/home/gabriele/.qgis2/python/plugins/pointstopaths_v02/pointstopathsdialog.py", line 89, in accept
                points = processor.generatePointDict()
              File "/home/gabriele/.qgis2/python/plugins/pointstopaths_v02/processfeatures.py", line 52, in generatePointDict
                self.coords = self.geom.asPoint()
AttributeError: 'NoneType' object has no attribute 'asPoint'

Since I've zero knowledge of python code, what I'm doing wrong?


texts: Polyline map (left-hand and right-hand attribute)

texts: I'm working with a land-use map which was converted from polygons to lines, I need to export this map as a shapefile where each feature has the left-hand land-use and right-hand land-use, is there any tool to have both attributes? So far my map only has one attribute per feature.


texts: Modify raster layer display and symbology properties programmatically with arcpy or ArcObjects

texts:
I have over 1500 NITF files that I need to be able to modify the layer display and symbology of programmatically from within ArcMap. I need to set the properties outlined in red below:

I've looked through the arcpy docs and it doesn't look like these properties are exposed - honestly, I didn't expect them to be. I have a feeling I can get to them through ArcObjects. Anyone had any experience/luck modifying these properties programmatically?


texts: QGIS 3.4: Why does DEM not appear after 3D configuration?

texts: I have a problem with the 3D map view of my DEM in QGIS 3.4. When I open the 3D map view, the DEM is there. Then I go to 3D configuration and choose the DEM for elevation. When I click ok, the map canvas goes blank.


texts: Draw tool not properly drawing polygon; selects layer underneath instead

texts:
I am trying to draw a rectangle around an outline of a river basin for a step in a project. I wasn't having any trouble yesterday just inserting a polygon, but now whenever I try to create the rectangle, it instead is transparent around the basin and changes the basin to the fill color of the rectangle.

I can draw a polygon when it is outside of the basin layer, but everytime it is on top it will not draw properly.

I have made all layers unselectable, so I am not sure why it is doing this. I am using ArcMap10.5.


texts:
I've generated a map of ecoregions based on some environmental data using a semi-supervised classification where I combined a statistical clustering with random forests to generate my map.

I created the map at a 30m resolution and to remove some of the small scale variability I've re-sampled (with the majority filter) to 2.5km. I was thinking of using McNemars test to investigate for any significant differences between my original (30m) and re-sampled (2.5km) data, but my validation dataset becomes significantly clustered at less than 2.5km (according to Ripley's K).
Also, my validation dataset is quite large (~2000 samples) and from what I've noticed so far is that the difference is coming back as significant (p<<0.001) using McNemars test even though % agreement is ~95% with a kappa of .96. I think it's due to the large sample size of my validation set.

Would it be suitable to compare the differences in the map with something like a Mann-Whitney or Wilcoxon test on an independent random sample of pixels? i.e. create x amount of sampling points, extract class info from the 30m and 2.5km maps and then compare?

The other thing I've thought about doing, was to look at lumped class accuracy with McNemars test i.e. lump the class information from my validation sites on both maps and compare those counts across classes to the validation dataset. An issue I can see here though (apart from the clustering of my validation samples at less than 2.5km) is that there only needs to be a difference of 1 pixel between the validation set and my classification sets for it to counted as misclassified.

Any help would be greatly appreciated.


texts: Missing Grass Toolbox plugin running QGIS 2.18.13

texts:
I am running QGIS 2.18.13 with Grass 7.2.2[1? ... can't remember which number was shown ... see comments below] installed via the OSGEO4W installer on both Windows 7 and Windows 10 (64bit).

(I have double checked within the OSGEO4W "advanced install" directory that the "qgis-grass-plugin7" and qgis-grass-plugin-common" are installed as for version 2.18.13-1)

The Grass Plugin/Toolbox is no longer in the Plugins Manager.

This plugin/toolbox was very handily available in recent versions but seems to have vanished though I am not sure with which update.

Is the plugin/toolbox still available?

How do I re enable it?


texts: How to reference jQuery in Javascript API 3.23

texts:
I'd like to hookup jQuery in my application to use along side with Dojo just to be able to use animations and a few other styling type of things on my map layout, but am unsure of what the best practice is. I am wondering if someone could give me a quick guide on how to hook up jQuery, via CDN?

Following along with the documentation here, this is what I have so far. I'm just unsure it'll work. I'm also not sure if I should encapsulate my entire javascript code in the jQuery() function or if I should only encapsulate those things that actually use jQuery. The example makes it seem like you should put everything in there, so that way you know that the page isn't doing anything before jQuery is ready. Is that sound logic?

I have tried the below code, and while I don't get any errors in the browser console, the basemap loads really weird. It loads all the labels, but none of the imagery until I zoom in a level, then it rights itself and the imagery shows up:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<title>FeatureLayer</title>

<link rel="stylesheet" href="https://js.arcgis.com/3.23/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.23/esri/css/esri.css">
<script src="https://js.arcgis.com/3.23/"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>

<style>
//more styles
</style>

<script>
require([
    "esri/map",
    "dojo/parser",
    "dojo/domReady!"
  ],
  function(
    Map,
    parser
  ) {
    parser.parse();

    var map = new Map("map", {
      basemap: "hybrid",
      center: [-90.603281, 36.241294],
      zoom: 5
    });

    on(map, "load", function(){
      $(document).ready(jQuery);
    });

    function jQuery(){
      //rest of my application goes here
    });
  });


texts: What causes the error "FeatureType XX does not have lat lng fields named 'Lat' and 'Lon'"

texts:
I am using the GeoServer Importer REST API to import some CSV data to an Oracle database(datastore). This is what I do:

create an export task:

curl -XPOST -H "Content-type: application/json" -d @import.json "https://server:8043/geoserver/rest/imports"

{"import": {
  "targetWorkspace": {
     "workspace": {
        "name": "gds"
     }
  },
  "targetStore": {
     "dataStore": {
        "name": "TestData"
     }
  }
} }

Define the data:

curl -F name=test -F filedata=@RS_Data.csv "https://server:8043/geoserver/rest/imports/${TASK_ID}/tasks"

Data:Modified sample from the GeoServer manual

ID,AssetID,SampleTime,Lat",Lon,Value
1,1,2015-01-01T10:00:00,10.00,62.00,15.2
2,1,2015-01-01T11:00:00,10.10,62.11,30.25

Output is as follows:

{"layer":{
    "name":"RS_Data",
    "href":"https://server:8043/geoserver/rest/imports/9/tasks/0/layer",
    "title":"RS_Data",
    "originalName":"RS_Data",
    "nativeName":"RS_Data",
    "srs":"EPSG:4326",
    "bbox":{"minx":0,"miny":0,"maxx":-1,"maxy":-1},
    "attributes":[
        {"name":"ID","binding":"java.lang.Integer"},
        {"name":"AssetID","binding":"java.lang.Integer"},
        {"name":"SampleTime","binding":"java.lang.String"},
        {"name":"Lat","binding":"java.lang.Double"},
        {"name":"Lon","binding":"java.lang.Double"},
        {"name":"Value","binding":"java.lang.Double"}],"style":
        {"name":"point","href":"https://server:8043/geoserver/rest/imports/9/tasks/0/layer/style"}}}

Update CRS:

curl -XPUT -H "Content-type: application/json" -d @updateSRS.json "https://server:8043/geoserver/rest/imports/${TASK_ID}/tasks/0/layer"

the above call works fine:

create a transformation mapping the Lat/Lon columns to a point:

curl -XPOST -H "Content-type: application/json" -d @topoint.json "https://server:8043/geoserver/rest/imports/${TASK_ID}/tasks/0/transforms"

Works fine too

The import call is as follows:

curl -XPOST "https://server:8043/geoserver/rest/imports/${TASK_ID}"

However, running the task itself yields the following result with error:

{"task":{
    "id":0,
    "href":"https://server:8043/geoserver/rest/imports/9/tasks/0",
    "state":"ERROR",
    "updateMode":"CREATE",
    "data":{"type":"file","format":"CSV","file":"RS_Data.csv"},
    "target":{"href":"https://server:8043/geoserver/rest/imports/9/tasks/0/target",
    "dataStore":{"name":"TestData","type":"Oracle NG (OCI)"}},
    "progress":"https://server:8043/geoserver/rest/imports/9/tasks/0/progress",
    "layer":{"name":"RS_DATA0","href":"https://server:8043/geoserver/rest/imports/9/tasks/0/layer"},
    "errorMessage":"FeatureType http://www.opengis.net/gml:RS_DATA0 does not have lat lng fields named 'Lat' and 'Lon'",
    "transformChain":{"type":"vector","transforms":[
        {"type":"AttributesToPointGeometryTransform","href":"https://server:8043/geoserver/rest/imports/9/tasks/0/transforms/0"}]}}}

Checking from Geoserver Webinterface, I get the following error:

java.lang.Exception: FeatureType http://www.opengis.net/gml:RS_DATA0 does not have lat lng fields named 'Lat' and 'Lon'
at org.geoserver.importer.transform.AttributesToPointGeometryTransform.apply(AttributesToPointGeometryTransform.java:56)
at org.geoserver.importer.transform.VectorTransformChain.inline(VectorTransformChain.java:41)
at org.geoserver.importer.Importer.loadIntoDataStore(Importer.java:1189)
at org.geoserver.importer.Importer.doIndirectImport(Importer.java:970)
at org.geoserver.importer.Importer.run(Importer.java:831)
at org.geoserver.importer.Importer.run(Importer.java:781)
at org.geoserver.importer.Importer.run(Importer.java:755)
at org.geoserver.importer.Importer.run(Importer.java:751)
...

I really can't figure out what's the problem, and I can't seem to find anything from the forum. The importer plugin documentation itself is rather thin.

Any Help?


texts: Distributing processed OpenStreetMap data legally?

texts:
I'm working on different hiking maps, based on OpenStreetMap data.

I want to distribute them, but I'm not sure, if I'm allowed to do so.

Would it be OK to lay them out at a park entrance and accept little donations for the print?


texts:
Is there a QGIS functionality or a plugin that I can use to 'move' polylines in a shapefile with a certain offset to the right or left of its original position and save the result in a new shapefile?

(In Avenue I would use: aPolyline.ReturnOffset(aDistance) )


texts: Create a line perpendicular to an existing line in ArcGIS

texts:
For an existing set of line features, I would like to generate a perpendicular line, of say 1km, at the midpoint of each existing line feature in ArcGIS.

I imagine that The methodology would be to:

create a tangent line at the midpoint of each existing line feature
calculate the angle of the tangent line
based on the angle of the tangent line, calculate the location of the endpoint of the new line
create the new line with the calculated endpoint of the new line and the existing midpoint of the old line

Let's assume that we are in a UTM projection and can use coordinates to calculate distance and direction.

How would I do this with ArcGIS tools or with ArcPy?


texts: Estimation of values for unsampled points

texts:
I want to measure biomass on a coastal mudflat. I can only access points inside the polygon. Are there any methods available that would allow me to estimate values of the points outside of the polygon, based on the values of points inside the polygon?

set.seed(5)
x <- rnorm(50, -1.841, 0.01)
set.seed(50)
y <- rnorm(50, 55.663, 0.01)
xy <- data.frame(x,y, values=rnorm(50))
coordinates(xy) <- c("x", "y")
proj4string(xy) <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84")
plot(xy)

makePolygons <- function(coordsx, coordsy){

  coords <- matrix(c(c(coordsx, coordsy)), ncol=2)
  p <- Polygon(coords)
  p <- Polygons(list(p), ID = "p")
  myPoly <- SpatialPolygons(list(p))
  spdf = SpatialPolygonsDataFrame(myPoly, data.frame(variable1 = c(2),
                                                     variable2 = c(3), row.names = c("p")))
  proj4string(spdf) <- CRS("+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0")

  print("polygon is in longlat!!!")

  spdf

}

myPoly <- makePolygons(coordsx=c(-1.841960, -1.843464, -1.888623, -1.841960),
                      coordsy=c(55.633696, 55.68178, 55.63841, 55.633696))

plot(myPoly, add=T)


texts: Creating Tree Height Data from Bare Earth and Highest-Hit rasters

texts:
I have two rasters I've downloaded: one is Bare Earth and the other is Highest Hit. Both contain elevation data.
I'm trying to calculate the difference between pixels which will give me the tree canopy height. Or in other words, subtract the Highest Hit from the Bare Earth pixel by pixel.

I was looking through ArcMap tool box and could not find any appropriate tool that would do that. Any suggestions?


texts:
I'm trying to draw on a map using this OpenLayer tutorial.

initDrawEvent() {
  var draw;
  var source = new VectorSource({ wrapX: false });

  var vector = new VectorLayer({
    source: source
  });

  this.map.addLayer(vector);
  draw = new Draw({
    source: source,
    type: "Polygon"
  });
  this.map.addInteraction(draw);
},

Unfortunatly the drawing point displayed on the map is not under my mouse cursor but moves with it from a distance. The more I move my mouse to the top left of the map, the more my cursor and the drawing point gets closer. And on the contrary, the more I move my mouse to the bottom right, the more the cursor and the drawing point drifts appart.

I guess that its all about projections.


texts: How to clip by inidividual polygon shapes rather than by an aggregated shape consisting of all polygons in the shapefile.

texts: I have a shapefile with overlapping polygons - network buffers around people's homes. I am trying to clip features such as tree canopy polygons and street polylines so that I can join the set of clipped features contained within each buffer to each network buffer polygon. Unfortunately I cannot get the Clip tool to clip the input feature polygons at the edge of the clip feature polygons if the latter overlaps with another clip feature polygon. How can I get the Clip tool to treat each of my clip features separately? Or is there another approach?  I'm working in ArcGIS 10.


texts:
I am trying to convert a few lists into fields.
I have no problem creating the fields. I just don't have any idea on how to fill them.
if result:
    layer = self.dlg.comboLayerLine.currentData()
    features = layer.getFeatures()
    ID = []
    X = []
    Y = []
    for feature in features:
        geom = feature.geometry()

        if geom.type() == QgsWkbTypes.PointGeometry:
            co = geom.asPoint()

            ID.append(feature.id())
            X.append(co[0]
            Y.append(co[1])

        elif geom.type() == QgsWkbTypes.LineGeometry:
            #Do the same with Line geometry

        elif geom.type() == QgsWkbTypes.PolygonGeometry:
            #Do the same with PolyLine geometry

        elif geom.type() == QgsWkbTypes.UnknownGeometry:
            #Prompt error box for unknown geometry

        #Add fields here

Here I make 3 differents lists. I want to convert each of them into 3 differents fields.
Edit: I was about to add a sample of the lists I get but I realized they don't even appear anymore! Here is the rest of my code.
new_layer = QgsVectorLayer(r'D:\Users\user\Desktop\trash temp', "essai.shp", "ogr")
new_layer.startEditing()
id_field = QgsField('ID', QVariant.String)
x_field = QgsField('X', QVariant.String)
y_field = QgsField('Y', QVariant.String)
new_layer.addAttribute(id_field)
new_layer.addAttribute(x_field)
new_layer.addAttribute(y_field)
print("Ok pressed")

Edit 2: I managed to fix the lists so here is the output of the list "y":
[6414701.507300033, 6416326.521299997, 6414870.419924344, 6414629.207300014, 6414839.753699968, 6414545.455399935, 6414596.490248112, 6414756.708799932, 6414599.551207293, 6414792.136099978, 6414952.573700016, 6414714.024700028, 6414630.641128357, 6414606.850143043, 6414661.849399988, 6414634.387000008, 6414601.288791229, 6414930.830580306, 6414609.777690075]

Edit 3: I tried something which didn't work. here it is:
#Add fields here
layerFields = QgsFields()
layerFields.append(QgsField('ID', QVariant.Int))
layerFields.append(QgsField('x', QVariant.Double))
layerFields.append(QgsField('y', QVariant.Double))
path = r'D:\Users\me\Desktop\trash temp'
writer = QgsVectorFileWriter(path, 'UTF-8', layerFields, QgsWkbTypes.Point)
feat = QgsFeature(layerFields)
feat.setGeometry(QgsGeometry.fromPointXY(QgsPointXY(attrs[1], attrs[2])))
for i in range(2, len(attrs), 3):
   print(attrs)
   feat.setAttributes(attrs[i-2], attrs[i-1], attrs[i])
   writer.addFeature(feat)

#Finish

layer = iface.addVectorLayer(fn, '','ogr')
del(writer)

It returns me the following error:

feat.setAttributes(attrs[i-2], attrs[i-1], attrs[i])   TypeError:
QgsFeature.setAttributes(): argument 1 has unexpected type 'int'

Edit 4: After receiving a few advices, I decided to make a list of lists. So my new output is:
[[0, 506099.200000004, 6414701.507300033], [1, 505724.36900000286, 6416326.521299997], [2, 506076.8426659516, 6414870.419924344], [3, 506265.86200000404, 6414629.207300014], [4, 506945.2999999959, 6414839.753699968], [5, 506180.2869999982, 6414545.455399935], [6, 506047.2159920711, 6414596.490248112], [7, 506081.38259999966, 6414756.708799932], [8, 506045.6930898201, 6414599.551207293], [9, 506816.1533999958, 6414792.136099978], [10, 506090.7625000037, 6414952.573700016], [11, 506660.63870000176, 6414714.024700028], [12, 506112.8389316339, 6414630.641128357], [13, 506134.08904640994, 6414606.850143043], [14, 506548.10649999965, 6414661.849399988], [15, 506436.27269999706, 6414634.387000008], [16, 506303.8354239211, 6414601.288791229], [17, 506062.6988654828, 6414930.830580306], [18, 506047.52282746276, 6414609.777690075]]

Each list represents a future feature with its ID, X and Y coordinate


texts: Looking for ArcGIS API for javascript and Jquery samples

texts:
I'm new in ArcGIS javascript API .I found tons of samples of ArcGIS javascript API  and DOJO . it was very interesting for me but i know Jquery and i'd like to use Jquery to develop webgis.Is there any resources and samples about using ArcGIS javascript API and Jquery ?
Thanks for advance.


texts: Polygonizing slope raster when output shapefile is more than 4 Gb?

texts:
I am trying to polygonize a slope raster using Grass's r.to.vect command.
The command starts but ends up crashing because the output shapefile is more than 4 Gb.

How could I get multiple shapefiles out?

I work on QGIS 3.4 and Windows 8.1


texts: how to use IMapTimeDisplay.TimeValue to get current time setting from timeslider in ArcMap

texts:
Has anyone out there used the IMapTimeDisplay.TimeValue to get the current time from the timeslider control? I cannot figure out how to properly use it.

I am writing some code in VB .net that creates a bar graph (in a dockable window in ArcMap) from some of the attribute values in a polygon feature class. My feature class is time-enabled with an attribute called "Year" and the time slider is visible in ArcMap, but the data I send to the bar graph is not filtered by the current year selected on the slider. So, I need the current time to filter my data with.

I have the following which may not be correct, although it does not throw an error:

Dim pMxDoc As IMxDocument = TryCast(My.ArcMap.Application.Document, IMxDocument)
Dim pMap As IMap = pMxDoc.FocusMap
Dim pMapTimeDisplay As IMapTimeDisplay = pMap
Dim pTimeValue As ITimeValue = pMapTimeDisplay.TimeValue
Dim pTimeExtent As ITimeExtent = TryCast(pTimeValue, ITimeExtent)   'added

But, I can't figure out what to do from there. Can anyone help me please? I have searched the internet to the best of my ability.

Additional information
I tried this, but it caused an error in ArcMap:

Dim currentYear As Integer = pTimeExtent.StartTime.Year

The error is "Unhandled exception has occurred..." and "System.NullReferenceException: Object reference not set to an instance of an object." Yet, I have used pTimeExtent.StartTime.Year successfully in other parts of my code to get the start time of the entire time range using pTimeExtent = pMapTimeDisplay.CurrentTimeExtent.


texts: How to call a Windows Batch Script (BAT file) with Python in QGIS

texts:
I have a windows batch file (.bat) which executes some Oracle Queries.

I want to integrate this Batch Script in a QGIS Plugin.

How can I do this with Python?

The cx_Oracle Python extension module is not an option within my infrastructure here.


texts: Manually changing coordinates of anchor point before rotation in ArcGIS Desktop

texts:
I am working with a fishnet of over 120,000 elements, so any editing or selection operation is inevitably lengthy.
I need to rotate this fishnet by an angle of 17 degrees anti-clockwise, but as soon as I put the fishnet shapefile in editing mode (and after having waited for quite a while), the anchor point is visualized in a location that is not the one I want. If I kept it there, the rotation would give me a wrong result. Every time I try to select the anchor and move it with my cursor, ArcGIS gets stuck (perhaps it is selecting all the squares in the fishnet once again) and I am not able to move the anchor to the desired position.
Is there a way to manually change the coordinates of the anchor point?
I would also be open to a Python/ArcPy solution to this.


texts: GRASS v.net.iso tool produces empty output - QGIS 3.2.2

texts:
I want to split a network shapefile by cost isolines.

I have two layers

a point layer (with 297 records)
a road network layer

Every time I run the GRASS v.net.iso module in QGIS 3.2.2 on the road network layer, the output will be an empty shapefile with an empty attribute table.

Can anyone tell me how to use the v.net.iso tool correctly?

I couldn't find a tutorial online for the v.net.iso tool.


texts: How do you Convert a .sp1 file into a Shapefile

texts:
I was previously able to convert .sp1 files into shapefiles, but that was last February. I can only remember how to do some of it.

How do you convert them into shapefiles ?  These are preplot receiver / source points as I am using ArcView 9.3


texts: How to display several points of a KML with the same coordinates in OpenLayers?

texts:
I've got a KML, where several points have the same coordinate, similar to following code:

<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>test.kml</name>
    <visibility>0</visibility>
    <open>1</open>
    <Placemark>
      <name>Place 1</name>
      <Point>
        <coordinates>7.0901548880586,50.723973666434,0</coordinates>
      </Point>
    </Placemark>
    <Placemark>
      <name>Place 2</name>
      <Point>
        <coordinates>7.0901548880586,50.723973666434,0</coordinates>
      </Point>
    </Placemark>
  </Document>
</kml>

If I click on the POI in an OpenLayers-map, only the last point can be selected. Google Maps' solution to the problem are next- and previous-buttons, in Google Earth the placemark "splits" into two (or more) placemarks so you can select one of the placemarks.
Is it possible to create a similar behaviour in OpenLayers?

There is an analog problem if there are two KMLs with placemarks with the same coordinate. I need a solution for this problem, too.

<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>test1.kml</name>
    <visibility>0</visibility>
    <open>1</open>
    <Placemark>
      <name>Place 1</name>
      <Point>
        <coordinates>7.0901548880586,50.723973666434,0</coordinates>
      </Point>
    </Placemark>
  </Document>
</kml>

<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>test2.kml</name>
    <visibility>0</visibility>
    <open>1</open>
    <Placemark>
      <name>Place 2</name>
      <Point>
        <coordinates>7.0901548880586,50.723973666434,0</coordinates>
      </Point>
    </Placemark>
  </Document>
</kml>


texts: Setting up Print Composer to Output Paper Map at Right Scale in QGIS?

texts:
How does one set up print composer to output a real world map paper map that is scaled properly so that a manual (real world) scale rule that one places on a paper map is scaled properly in a scale that is actually used out in the field, i.e. useful scales, such as 1:10000, 1:25000, 1:50000.

Each time I set print composer to these above-mentioned scales, and then print the map as an output, the scales do not correspond to an old fashioned scale rule, which means the map is not useful out in the field.  Is there a way to set print composer properly to output a paper map at the right scale.


texts: Editing imported attributes in ArcGIS for Desktop?

texts:
I have finally completed my first ArcGIS-task, creating a shapefile containing poligons which mark designated spaces as well as installed facilities. The more than 450 facilities have a whole lot of attributes, luckily accecssable in an Excel sheet which also contains XY-data. I though I had successfully joint this data with the shapefile (as they have one attribute in common), just to realise right after that I can neither edit these nor use them for analyzing.

I have already tried creating a point feature class. As the data is in spanish, I assume the problem might be related with the content (e.j. ñ?).


texts: Joining data from Excel to attribute table in QGIS without creating duplicates?

texts:
I have an attribute table with two empty fields in QGIS.

I want to import an excel database to fill my empty fields in QGIS. My excel file matches the columns in my QGIS attribute table.

I am able to properly join my excel (.CSV) to my shapefile. However,the process, instead of filling the blank fields as I wish, created duplicates. With the help of « Table Manager » I am able to correct the situation, but it requires a lot of time. I am looking for a more efficient way to join my excel data.

How can I join my excel file to my attribute table without creating duplicates?


texts:
I need to first define the workspace where I can call my inputs from. I then need to define  a geodatabase so all the outputs run from the tools are stored in that geodatabase.
Any ideas?
import arcpy

arcpy.env.workspace = "D:/GIS/Lab3"
fcs = arcpy.ListFeatureClasses()

a = "streams.shp"
b = "basins.shp"
c = "forest.shp"

gdb_folder = "D:/GIS/Lab3"
gdb_name = "Q4.gdb"
arcpy.CreateFileGDB_management(gdb_folder, gdb_name)

arcpy.env.workspace = "D:/GIS/Lab3/Geodatabase/Q4.gdb"
clip = arcpy.Clip_analysis(a, b, "streams_clip")


texts: ArcGIS: Legend patches turn black with negative contrast

texts:
I have a problem I've never seen before in ArcGIS (Desktop 10.4). When I use the Image Analysis Window (or symbology settings), the raster DEM in the background changes accordingly... HOWEVER when I adjust the contrast to a negative value, the layer responds in layout view, BUT the legend patches turn black (see image below).

The problem replicates when I close/re-open Arc, when I delete/re-add the layer, when I change the colour ramp... It's frustrating because the software adjusts the contrast accordingly in the actual map (you can see this layer working correctly in the background of that image), but the legend simply will not display properly.

Has anyone encountered this issue before?

Currently, my workaround will be to find some colour ramp that is naturally paler, but I'd like to be able to actually use the full functionality of the software.

Update, following day: Checked with ESRI, this bug had already been reported under code NIM092972 (http://support.esri.com/bugs/nimbus/TklNMDkyOTcy), but as an issue with multi-band rasters only. Since my issue was with a single-band raster, the bug report is being expanded accordingly. Note that while the underlying issue remains unresolved, Dan's workaround (below) has effectively solved my display problem.


texts: Make GTiff with GDAL but the result is VRT

texts:
I tried to make raster file with GTiff format by using python GDAL, this is my sample gdal logic:

driver = gdal.GetDriverByName('GTiff')
outRaster = driver.Create(raster_classified, col, row, 1, gdal.GDT_Int16)
outRaster.SetGeoTransform((origin_x, cell_size, 0, origin_y - (cell_size * row), 0, cell_size))
outband = outRaster.GetRasterBand(1)
outband.WriteArray(outras_array[::-1])
outRasterSRS = osr.SpatialReference()
outRasterSRS.ImportFromEPSG(4326)
outRaster.SetProjection(outRasterSRS.ExportToWkt())
outband.FlushCache()

But after the raster file was created.. it's return with VRT format.. why?
This is the raster properties :

Driver
GDAL provider
VRT
Virtual Raster
Dataset Description
Band 1
STATISTICS_MAXIMUM=9
STATISTICS_MEAN=0.99751150063449
STATISTICS_MINIMUM=0
STATISTICS_STDDEV=2.3322020706147
Dimensions
X: 6500 Y: 4500 Bands: 1
Origin
110.5,-4.5
Pixel Size
0.001,-0.001
No Data Value
*NoDataValue not set*
Data Type
Int16 - Sixteen bit signed integer
Pyramid overviews
Layer Spatial Reference System
+proj=longlat +datum=WGS84 +no_defs
Layer Extent (layer original source projection)
110.5000000000000000,-9.0000000000000000 : 117.0000000000000000,-4.5000000000000000
Band
Band 1
Band No
1
No Stats
No stats collected yet

how to make geotiff format with python GDAL?


texts: How to change border style for classified data?

texts:
I would like to classify my layer according to two categories (for example year and type of land) and would like to show these classifications with a different colour of the border (for 'year') and fill (for 'type of land').

In the properties tab, after classifying my data, the only option of changing the colour of fill of the classified levels is available. Is there a way for me to use different borders to classify my data instead?


texts:
Yesterday, I successfully ran the r.recode Grass-command from QGIS 3.2 Bonn on a Windows 10 machine to recalculate a DEM-geotiff. Today, I installed QGIS 3.4 Madeira and de-installed all older QGIS-installations, including 3.2 (by deleting manually the respective folders).
When I retried the same r.recode function with the new QGIS in the same project with the same geo-tiff, I got an error. The same if I start a completely new project and try other DEM-geotiffs.

I don't really understand the error message: does it have something to do that QGIS is not able to start grass GIS? Any idea how to solve the problem?

Here is the eror message:

Starting GRASS GIS...

Traceback (most recent call last):
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Algorithm.py", line 411, in processAlgorithm
Grass7Utils.executeGrass(self.commands, feedback, self.outputCommands)
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Utils.py", line 372, in executeGrass
for line in iter(proc.stdout.readline, ''):
File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 81: invalid start byte


texts: Importing pandas dataframe as layer in QGIS?

texts:
I'm working on a dataset that is readily available as a pandas dataframe object. Now, I would like to import this data as a layer in QGIS. I didn't find any helpful library or code to do so. So, I resorted to converting the dataframe to a csv file and then importing this as a layer using PyQGIS api.

Is there any way I can import the dataframe directly, without having to write it to a shapefile or a csv file?


texts: make layers with different resolution work together

texts:
I have to create two WMTS layers and add them to the map.

But the two layer have a different tileOrignal and resolutions and coordinate.

For example:

Layer1:

 tileOrignal:[-180,90] with coordinate system of EPSG:4326
 resolutions:[1.42,0.71,0.35.....](total 14 levels)

Layer2:
 //this layer is  an custom layer with an custom pixel coordinate:
 tileOrignal:[-124332,323232]
 resolution:[8,4,2,1](total 4 levels)

And we have the translation between the two coordinates.

So we have to requirements:

1) make them work together(not overlayed but can be switched)

I mean make the both as baselayer, but can be switched by the LayerSwitcher control.

2) use the uniform EPSG:4326 coordinate for the end user.

For example, when the current baselayer is the layer2, and we call map.getCenter(), we expect the EPSG:4326 coordinate(a lonlat) is returned rather than a point in the pixel coordinate.

I wonder if this is possible?


texts: orfeo toolbox in Qgis 2.18.13 windows 7 32 bit

texts: I installed the orfeo toolbox in Qgis but got this error.


texts: Convert datatype in Google Earth Engine from double to integer

texts: How can I convert a variable to another data type using Google Earth Engine? For example I've created a NDVI image in double number (interval value -1.0 to +1.0). I want to save the image in byte (Unsigned8Bit or Byte) after running a formula like this: NDVI8bit = 128 + 125*NDVI (interval value 3 to 253) in order to save disk storage capacity without losing information.


texts: How to find legal WFS property name on GeoServer?

texts:
I am querying a GeoServer using a CQL filter and testing it via browser url.  My filter appears to be correct per documentation:

https://myserver/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeName=poi:airports&maxFeatures=50&cql_filter=WITHIN(shape,POLYGON((-13 31,-13 60,26 63,41 50,34 33,17 33,8 38,-13 31)))

The server doesn't give me any CQL parsing errors, but reports the following:

<ows:Exception exceptionCode="InvalidParameterValue" locator="GetFeature">
    <ows:ExceptionText>Illegal property name: shape</ows:ExceptionText>

I tried the_geom as well, and that failed too.

What can I change on the GeoServer to yield a correct WITHIN result?


texts: Performing Split By Attributes on OBJECTID?

texts:
Using ArcGIS Desktop, 10.5.1, I need to "explode" a singlepart polygon FGDB Feature Class into separate FCs.

For example, if the input FC contains 3 polygons, the output will be 3 separate FCs, each containing a single polygon.

I am using the Split By Attributes tool.

How do I split by the input FC's Objectid field?

When I open the tool, it does not include the Objectid as an allowed Split Field:


texts: Convert points layer into a circular polygon on R

texts:
As the title says, I am supposed to convert a point layer similar to this one (it represents the perimeter of a tree at a certain height, and it's a sf that I called "points" in R):

I would like to convert this layer into a circular polygon in order to calculate its circumference just like in this example:

I tried to use the "st_cast" function in my script:

Unfortunately, this script doesn't generated what I expected... Indeed, the polygon generated looks like a weird shape:

I don't really know what to do to correct this dysfunction because I am not very familiar with R. Do you have any idea about what I am supposed to do in order to create a shape just like in the example?


texts: How to compute the distance from the beginning of a line for every points using postgis

texts:
I have a line, for which I need to know, for every point that compose it, what is the distance from the beginning. The data is stored in PostGis 2.0

For example, for the line with the point a, b, c, d :

a -> b -> c -> d

The distance I need for each point is :

a should be 0,
b should be 5m (distance between a and b)
c should be 12m (b and c are separated by 7m, + 5m for a and b)
d should be 18m (c and d are 6m apart, and 12m previously)

That distance need to be written as double in another table (where I then mix additional metadata on the point)

Right now I use

INSERT INTO myschema.points
(point_id, position, offset, distance)
SELECT
    points.id as point_id
    points.position as position,
    points.offset as offset,
    -- Very slow!
    ST_Line_Locate_Point(line.full_path, points.position) * line.length AS distance
FROM points_temp AS points
INNER JOIN
    temp_line AS line ON points.line_id = line.id
ORDER BY
    points.offset;

But it is terribly slow! It seem to recompute the length of the line for every points and that is very inefficient.

Points along the line are ordered by offset

What would be a better and (possibly) much faster way?


texts: Using multiple folders for mxd, pdf, etc with same name in ArcPy?

texts:
I am not an expert on Python scripting but I undertand a few concepts about it.

I made a script that export multiple individual mxd and pdf with a specific same name, also on my script, I can make multiple folders with the same name from mxd, but I dont know how put all the files on the same folders made, eg: 01(This is the folder),01.mxd,01.pdf, 02(This is the folder), 02.mxd,02.pdf, and so on.

How can I put all the files inside the folders made at the same time?

This is my script:

import arcpy, os
import arcpy
from arcpy import env

wsp = arcpy.env.workspace( r"D:\SedesolVQB\Proyectos\proyecto_PythonEjercicio\PracticasPython.mdb")
Shp = 'Estados'
pageNameField = "CVE_ENT" #<----this is the main field comun to save on folders, mxs and pdf

#Export to pdf file from each mxd
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
    mxd.dataDrivenPages.currentPageID = pageNum
    pageName = mxd.dataDrivenPages.pageRow.getValue(pageNameField)
    print u"Exportando página {0} de {1}".format(str(mxd.dataDrivenPages.currentPageID), str(mxd.dataDrivenPages.pageCount))
    arcpy.mapping.ExportToPDF(mxd, r"D:\\SedesolVQB\\Proyectos\\proyecto_PythonEjercicio\\Mapas finales\\" + str(pageName) + ".pdf") #This is the way out where I want all the folder and files

    mxdOrigen = r"D:\SedesolVQB\Proyectos\proyecto_PythonEjercicio\Mxd\Practicas.mxd" #<---This is the maind mxd
    mxdSalida = r"D:\\SedesolVQB\\Proyectos\\proyecto_PythonEjercicio\\Mapas finales\\"
    mxdCarpeta = os.path.dirname(mxdOrigen)

#To Make diferent folder from pageNameField
with arcpy.da.SearchCursor(Shp,(pageNameField)) as cursor:
     for folder, in cursor:
         os.makedirs(os.path.join(mxdSalida, str(folder)))

#Save mxd indivuals
for pageNum in range(1,mxd.dataDrivenPages.pageCount + 1):
    mxd.dataDrivenPages.currentPageID = pageNum
    paginaNombre = mxd.dataDrivenPages.pageRow.getValue(pageNameField)
    mxdNombre = os.path.join(mxdSalida,""+str(paginaNombre)+".mxd")
    mxd.saveACopy(mxdNombre)
    print u"Guardando una copia de:{0}".format(str(paginaNombre))

print "PROCESO TERMINADO"

This the result:

D:\Mapas finales
01<--- This is the folder
01.mxd
01.pdf
02<--- This is the folder
02.mxd
02.pdf
03<--- This is the folder
03.mxd
03.pdf

How could I put all the files inside the folders at the same time?


texts: How to make a freehand polyline option from drawing toolbar enabled throughout in arcmap

texts:
Following code selects freehand polyline as default draw tool on first go:

     final ICommandBars commandBars = app.getDocument().getCommandBars();
     final UID windowId = new UID();
     windowId.setValue("{57E77868-D015-11D2-9F31-00C04F6BC8DD}");
     final ICommandItem commandItem = commandBars.find(windowId, false, false);
     app.setCurrentToolByRef(commandItem);

But once we finish with drawing first element, it goes back to its original settings i.e. it starts showing 'Polygon' as default draw option.

Is there a way to set drawing tool to freehand polyline option throughout application execution in Arc map

Regards,
Viji


texts: How to create a restorable PostGIS/PostgreSQL database backup with pg_dump?

texts:
I am unable to restore a database backup when the database contains schema's that contain geometry datatypes or postgis functions.

During restore, I get the spatial_ref_sys relation not found error. The backup file that pg_dump sets search paths that do not include the public schema.

Is there a way to produce a file that is restorable? Or will the backup file always require manual modification of the SET search_path = statement?


texts: WFS GetFeature with cql_filter=Intersects not working for cascaded layers

texts:
I have a cascaded (WFS store) layer in my GeoServer. I want to download the data of the layer in Excel format for a provided polygon. In a normal scenario I export the data as below:
https://my-geoserver/workspace/wfs?service=WFS&request=GetFeature&version=1.1.0&typeName=layerName&outputFormat=excel2007&CQL_FILTER=intersects(GEOM,POLYGON((140622.7275518125 158136.306018296,140676.74283158602 158165.31859678068,140714.0110057701 158091.48983712035,140661.41098439335 158063.18487973593,140622.7275518125 158136.306018296)))

But in case of the cascaded layer the above is not working, an empty Excel spreadsheet is being downloaded. I tried OGC filter as well, but same result.
ge
I know I can achieve this by using BBOX but I cannot use BBOX for intersecting as the intersecting needs to be a polygon for filtering purpose of the layer I'm trying to export.
Cascaded layer: I have created a WFS store in my GeoServer and exposing the layer.


texts: QGIS' georeferencer layer doesn't appear?

texts:
I use QGIS 1.8.0 for Linux, and I want to draw roads manually on the map.

So according some tutorials, I use Raster>Geoferencer>Geoferencer to import a bitmap image including roads, and set Geoferencer like this screenshot.

However, after "Start geoferencing", the Geoferencer layer didn't appear on the map. Just like this:

I've tried move the reference layer to top and toggle "update drawing order" but it doesn't work.

What should I do?


texts: Attaching way id to SVG XML from GeoServer/PostGIS for postprocessing?

texts:
I render my SVG from Database Layer (PostGIS).

I suppose there is basically 1-to-1 match between the ways (polygons) in DB and SVG path elements.

Is it possible to attach the way id to the SVG XML so that some kind of postprocessing is possible?


texts: Getting polygon boundaries of City in JSON from Google Maps API?

texts:
When searching Google Maps for a city, the city's administrative boundary is displayed.

Is there a way to get the polygon boundaries of City in a JSON format using google maps api?


texts: ArcMap Basic License - Create exterior boundary around polyline features based on centerline layer

texts:
I have access to ArcGIS with a basic license at work. I have been tasked with creating a boundary outline of every route polyline feature whose shape is also based along the city street network base layer. Aside from manually tracing polygons for a boundary or selecting the base line layer to symbolize one, is there any quicker method to facilitate this?
I've attached an example to provide a visual. The red line features are an example of what our routes look like, and the advanced looking blue boundary (Courtesy of my advanced Paint skills) shows what I'd like to create:


texts: Adding field which, depending on direction field value, gets value from previous or next row/feature in another field?

texts:
I am having difficulty getting to grips with arcpy and cursors. What i aim to do is the following: Depending on the direction specified in Test I wish to update the Target field. If it is forward, the Target should receive the Value of AP from the next row/feature. In this example for the first feature, the Target would be 2. Aditionally, if the direction specified is backward the Target field should receive the value from the previous row. To make matters worse, the AP and Target fields are strings (and converting them is not an option as the data provided in ususally alphanumeric), so simply adding and subtracting 1 is not possible.

what i have so far:

i = 0
lastvalue = []
with arcpy.da.SearchCursor(InFC, [Direction, AP]) as cursor:
    for row in cursor:
        if Direction == "forward":
            newField = AP[row+1] ## here id like to reference the next value somehow
        else:
            newField = AP[row-1] ## here id like to reference the previous value


texts:
When using readLAS with the lidR R package, the useful filter option allows to specify options like -thin_with-grid to light the poitn cloud to be loaded. I have 2 questions regarding the units used in this tool:

What are the units of the distance in this specific filter? Units of the point clouds or international standards?

If answer to 1. is "units of the point clouds", it can be slightly tricky when you use imperial units. So is there a way to specify units? If not, I guess we have to convert value to units of the point clouds...


texts:
I am trying to set QGIS 2.8.1 (Linux Mint 17.2) to add the filename/path to layouts.

I am using this post as a guide How to add the current project path in Print Composer?
However, I haven't got startup.py - I ran searchmonkey on my entire hard disk.  The PyQGIS cookbook says "...if it's exists" but no reference to how to create it.

I tried creating a file of that name & pasting the code into it but QGIS wouldn't start, with Python-related complaints.  I'm assuming the file should have a header & instructions, like an HTML document does?  I can't seem to find this. I've looked in the QGIS settings to try & find it, with no success. BTW, I'm completely new to Python.


texts: Finding points within distance of polygon using ArcGIS for Desktop?

texts:
I have several polygons(areas) and points(with names of places) on two different layers.

How would I go about finding all of the points that reside within 100m of the polygons I have on the other layer?

So far I have created the 100m buffer around the polygons and I can visually see that there are quite a few overlaps. How would I go about extracting the names from the points that are covered by the polygons?

Or is there another way I should go about doing this? (eg. a query)
Then how would I go about classifying the distance of these newly found areas? eg, into steps of 20m, so 0m-20m,20m-40m,40m-60m etc.


texts: Looking for London postcode to area mapping data

texts:
I am looking for London postcode to area mapping data.

I have reviewed several databases and API's and most resolve a postcode to at best a district and a ward, which doesn't correspond to the colloquial area (for want of a better word)

e.g.

Using these databases and API's typically maps  SW1V1RB  to administrative district and wards of:

"district":"Westminster","ward":"Warwick"

But a typical user would understand this to be Belgravia.

Is there a way to map postcodes to this area, rather than the administrative locations?


texts: Getting SHP or SVG from GADM subdivisions within Guyana?

texts:
GADM is a high-resolution database of country administrative areas. I have downloaded the whole world distribution (it is composed of several dBase III files and a big .SHP file).

I am trying to query the GADM database for, given a country, get the first-level administrative divisions. Here is a listing of results I would expect for "Guyana":

Barima-Waini
Pomeroon-Supenaam
Essequibo Islands-West Demerara
etc.

Now, how I can I get an SHP or SVG map for Guyana and their first-level divisions like the one in Wikipedia page?
(I don't know about polygons or latitudes, I think I don't need to)


texts: WMS: point "pointer" symbol with offset - getFeatureInfo search area slight mismatch

texts:
I'd like to ask what ways there might be to adjust a point's getFeatureInfo search area so that it matches a "pointer" (i.e slightly offset) symbol.

We are running GeoServer 2.2.0 (part of an Opengeo Suite) and the symbology(SLD) for some point layers is various forms of "pointers", that is to say that the center of the icon is not at the center of the point, rather it points to the point, like an arrow or a badge with a small pointer at the bottom or a map pin. (SVG graphics.)

There appears to be two ways one can get the point symbols offset:

I. Modify the SVG graphic to contain a transparent area in one end, see exhibit A.
This method provides an empty area for getFeatureInfo corresponding to the transparent area in the SVG symbol as in geoserver's docs on point slds - one can however then click to the side of the visible symbol and still get a hit, which is unwanted.

II. Use the offset function in the SLD for the point layer. The effect this has is that while the "pointer", or pin symbol is properly offset the search area remains centered on the point. See B.


texts: Selecting by character strings from field using ArcGIS / R bridge

texts:
I am attempting to use the ArcGIS / R bridge R package "arcgisbinding" in order to do the following:

I am trying to select features in a map layer based on textual matches, and I thought that I might be able to use the R bridge to do this. I would like to identify certain features using regular expressions and grepping and then delete these features from the arc.data data frame I have loaded in R, and then save this modified feature class as my new data.

However, when I try to run any functions on the arc.data data.frame, its class changes to something else. I am afraid that I am not able to then convert it into arc.data into a geodatabase.

Do you have any suggestions for searching / manipulating character fields in a feature class using R? Or is this something that the R bridge wasn’t intended for? Are there easy ways to do this in ArcMap? The field I am trying to search is a messy character field (tags from imported OSM data).


texts: TableToTable (CSV to GDB) with WKT column

texts:
I have a CSV file with a WKT column with LINESTRINGS as geometry.
How do I setup the call to TableToTable() in order to directly "transform" that WKT column to a shape/geometry column (while ignoring the original WKT column from the CSV file in the final GDB)?
Can it be done using FieldMappings?
Unfortunately, I am limited to Python 2.7 and ArcMap 10.8.


texts:
I am following a tutorial from "QGIS Python Programming Cookbook", and I am having some trouble, even with a near exact replication of the code, and I could use a second/third pair of eyes as to why I might not be getting the layer to show up on the map.

from qgis.core import *
from qgis.gui import *
from qgis.utils import *
from PyQt4.QtCore import *
from PyQt4.QtGui import *

app = QgsApplication([], True)
app.setPrefixPath("C:\\OSGeo4W64\\apps\\qgis\\", True)
app.initQgis()
canvas = QgsMapCanvas()
canvas.setWindowTitle("PyQGIS Standalone Application Example")
canvas.setCanvasColor(Qt.white)
layer = QgsVectorLayer('Linestring?crs=epsg:4326', 'MyLine' , "memory")
if not layer.isValid():
   print "Layer Failed to load!"
pr = layer.dataProvider()
linstr = QgsFeature()
geom = QgsGeometry.fromWkt("LINESTRING (1 1, 10 15, 40 35)")
linstr.setGeometry(geom)
layer.updateExtents()
QgsMapLayerRegistry.instance().addMapLayer(layer)
canvas.setExtent(layer.extent())
canvas.setLayerSet([QgsMapCanvasLayer(layer)])
canvas.zoomToFullExtent()
canvas.freeze(True)
canvas.show()
canvas.refresh()
canvas.freeze(False)
canvas.repaint()
exitcode = app.exec_()
QgsApplication.exitQgis()
sys.exit(exitcode)


texts: Creating ArcGIS markers (North Arrows) for QGIS?

texts:
I came across a PDF containing dozens of north arrows used in Esri's ArcGIS.

QGIS doesn't have many fascinating north arrows, to be candid.

I thought of creating SVG icons of these north arrows and uploading them online for QGIS users. It will also be useful for folks who use vector graphics software like Inkscape.

Is it legal and ethical for me to recreate these icons for QGIS?


texts:
Getting the following error when running my app:

Error: Tried to register widget with id==legendDiv but that id is already registered

Not sure how to get rid of it. My javascript for the legend is:

//Add the Legend
      legendLayers.push({
          layer: layer,
          title: ''
      });
      dojo.connect(map, 'onLayersAddResult', function (results) {
          var legend = new esri.dijit.Legend({
              map: map,
              layerInfos: legendLayers
          }, "legendDiv");
          legend.startup();
      });
      map.addLayers([layer]);

      if (layer.loaded) {
          buildLayerList(layer);
      } else {
          dojo.connect(layer, "onLoad", buildLayerList);
      }

and my HTML is:

Can anybody suggest a workaround or a fix to the error. I've done some searching and it looks like I might need to do a destroy? Not sure how to do that.


texts: R How to multiply the values of the raster pixels with the true surfaces of these pixels?

texts:
I want to multiply the precipitation values (mm) of each pixel of a raster by the area corresponding to each of these pixels under R.

At first, I directly multiplied the raster by the average pixel area (Total area / number of pixels). But if we work on a global scale with the WGS84 projection, in reality the pixel area at the equator and in the high latitude regions is very different? That is why I am asking this question.


texts: Sampling within an area and creating table Qgis

texts:
What I am wanting to do is import two point files, one harvest data, another soil sample results.

Once I have them I want to create a buffer area around the sample point (75ft) and determine the average yield, and standard deviation and then put all of the data into a table so I can run a principal component analysis.

I have been able to get the data into a spreadsheet by hand, but I am looking for a more automated way since I have several files (10+) I am looking at.


texts: Where can I find ArcGIS logs when I execute a python script using arcpy?

texts:
I'm executing a python script locally on my computer where ArcGIS Desktop 10.0 is installed (Windows 7).
The script uses functions from the arcpy library installed with the ArcGIS Desktop to manage  (crud) and geoprocess data stored in an ArcSDE Oracle database (remote server).

Do you know where I can find the ArcGIS logs related to the execution of this script?


texts: Can I do a toggle map view with multiple layers in the cartodb UI?

texts:
I have successfully created a toggle map following the instructions in this tutorial http://developers.cartodb.com/tutorials/toggle_map_view.html.

The toggle map is linked to a map in my cartodb account that has two layers in the UI - the first layer shows colored points in a choropleth view, the second layer shows a sort of cluster view so that I can have numbers appear where there are large clusters. I have have my buttons set up in the toggle map so that you can see points from different years - 2011, 2012, 2013, and 2014. When I click on a year, say 2011, all the points from the first layer (choropleth layer) that are from 2011 appear and all others disappear, so the buttons are selecting correctly for my first layer. But the buttons don't filter through any of the points in the second layer (the cluster layer with the numbers appearing for clusters). This is providing inaccurate numbers for my clusters when I'm clicking on different years. For example, in one area of the map, there are 37 points for all the years (so when all points are visible the cluster layer accurately says there are 37 points there). But when I select 2011, there are 0 points in that region for 2011, and it still says 37 on the cluster layer.

Is there a separate way to set up the toggle map so that it will interact with and select from all layers in my UI?


texts: Projection details of "Carte géologique de la France"

texts:
I am trying to georeference two sheets of the Carte géologique de la France 1/50000 by J.  Thierry from 1974/75. It says "Ellipsoid de Clarke" on the map. Unfortunately this is the only information about the CRS I have. The Coordinates used on one of the sheets are in Lat/Lon and as follows: Upper Left: Lon 4°19'2" Lat 48°3'36", Upper Right: Lon 4°40'38" Lat 48°3'36", Lower Left: Lon 4°19'2" Lat 47°52'48", Lower Right: Lon 4°40'38" Lat 47°52'38". Following this information I tried referencing in different Clarke-Ellipsoid based CRS which resulted in the map appearing at the wanted area, but with several hundred meters error.  Has anyone ever worked with this map before and knows which CRS they are using?

Edit: So far I used the basic georeferencing tool in QGIS 2.14. I set points in every corner of the sheet and entered the given coordinates (see above) as dd mm ss.ss.

The area is the vicinity of Chatillon-sur-Seine in the Côte d'Or Region. It should be Lambert II or Lambert II etendu, but both do not work.

Additional to the Lon-Values given above there are Lon-Values for the Paris-Meridian. Using them and NTF (Paris) did not solve the problem.


texts: ArcMap remove feature-class from feature-dataset

texts:
I am using ArcMap 10.0 (Editor). I have got a feature-dataset within a GDB with several feature-classes and an topology.

I am unable to find a way to delete/remove a feature class from that feature-dataset.

To add a feature-class you go drag&drop onto your feature-dataset. That does not work for removing. The right-click context menu on  a feature-class does not provide the option "delete" (gray). I did try that in the cataloge-window and in ArcCatalog.

The help does not provide a lot of useful information on that topic either.

I have altered one of the feature-classes in a different GDB and I would like to update/exchange that feature-class. At the moment the only way seems to delete the whole feature-dataset and recreate it with the updated feature-classes. But that way you are loosing your topology and it does not seem to be a effective way of dealing with that sort of issue.

Has anyone got any ideas?


texts: I am creating a web map in AGOL using a single feature with multiple fields. My first field has 2 domains. Is there a way to have other fields grayed out dependent on which domain is chosen? I want certain fields to be disabled depending on which of the 2 domains is selected. I have tried using subtypes but am wondering if this is possible by setting up AGOL filters.


texts:
I'm running Ubuntu 12.04 LTS. Unfortunately Ubuntu has automatically upgraded my QGIS from 1.8 to 2.0.1. And 2.0.1 which creates GeoJSON files that OpenLayers cannot parse.

Would be best for me to rollback to 1.8, so I can get on with my work for now.

Can anyone help?

thanks

Mini


texts: Where can I find GIS Data for Environmental Constraints for Hawaii?

texts: I am looking for all the types of environmental constraints in shapefile format for Hawaii. Is there any environmental agency website or other source where I could find it? Any kind of help would be much appreciated.


texts:
I'm newbie to PostGIS and am looking for some SQL examples for better understanding.

I didn't understand how do I manipulate the tables, how objects relate one to another. An example:

There is this page: https://www.openstreetmap.org/relation/297514 - a city and its boundaries in strong orange.

I'm trying to do the same on my OSM server.

I found the city (the Relation ID) with the next query, because the cities I am interested have a known code/id list called IBGE:GEOCODIGO :

SELECT id,tags FROM planet_osm_rels WHERE 'IBGE:GEOCODIGO' = ANY(tags) AND '4106902' = ANY(tags) ;

Now, correct me if I'm wrong, I think there is some way to SELECT the polygon that represents the ways(?) around the city, I mean its boundaries, to finally draw this polygon with LeafLet on my OSM server.

Some code examples or a documents to understand how planet_osm data is organized and where are the "foreing_keys" to the objects I want:

SELECT polygon (administrative boundaries) FROM city
SELECT  djikstra/ways between two points (not a line, but a road path)

this sort of thing

It seems easy to learn how to manipulate geographical objects (I found examples on PostgreSQL), but how to do it with planet_osm ?


texts: How to Transfer Domain from one Geodatabase to another?

texts: How do I transfer Domain to another .gdb in ArcGIS?


texts: Page definition query not updating graph in layout

texts: I have three graphs in my layout created from feature classes which have Page Definitions set to reference a data driven page.  The table of each feature class shows the correct number of features as I scroll through the data driven pages.  However, the corresponding graph of the table shows ALL the records, not the subset in the current ddp. Ideas?


texts:
I am importing a series of shapefiles with shp2pqsql that already have a unique identifier attribute. Since shp2pqsql creates a new column called gid I am ending up with two unique identifiers per record.

Is there any way to tell shp2pqsql to omit the creation of the gid column? Or better still, to use the existing identifying attribute instead ?

Update: I have shp2pqsql version 2.1.2 (r12389) installed. I am using it like:

shp2pgsql Roads.shp roads > load_roads.sql


texts: How to develop a QGIS plugin to fully run spatial queries with PostGIS?

texts:
I am developing a QGIS plugin that fully runs spatial queries with PostGIS.

I developed all spatial queries which need some adjustment.

I am looking for some resources or documents to know how to proceed.


texts: Showing two fields of attribute table using PyQGIS

texts:
I need to show two fields of an attribute table. I can currently display the "POINT" field.
I also want to show the "ID" field.
In the following way, if ID = 2 and POINT = 341. It should show like this 2 (341). As shown in the picture.

# Adding Labels to Nodes

    for layer in
QgsProject.instance().mapLayers().values():
        layer_settings  = QgsPalLayerSettings()
        text_format = QgsTextFormat()

text_format.setFont(QFont("Arial", 8))
text_format.setSize(8)
text_format.setColor(QColor('Black'))

buffer_settings = QgsTextBufferSettings()
buffer_settings.setEnabled(True)
buffer_settings.setSize(0.10)
buffer_settings.setColor(QColor('black'))

text_format.setBuffer(buffer_settings)
layer_settings.setFormat(text_format)

fieldName1="PUNTO"
fieldName2="ID"
layer_settings.fieldName = "PUNTO" ***********************************
layer_settings.placement = 4

layer_settings.enabled = True

layer_settings = QgsVectorLayerSimpleLabeling(layer_settings)
layer5.setLabelsEnabled(True)
layer5.setLabeling(layer_settings)
layer5.triggerRepaint()[![enter image description here][1]][1]


texts: address standardizer code in python for street featureclass

texts:
In my system I have featureclass Street and having fields.

Featureclass : Street

Input fields: NAME;STREET_PREFIX;STREET_NAME;STREET_TYPE;STREET_SUFFIX

output fields: ADDR_PD;ADDR_PT;ADDR_SN;ADDR_ST;ADDR_SD

I want to standardize input fields and values should goto output fields.
But how to create standardizer address scripts for above featureclass
in which we are having input and outfields in same featureclass.

database ins orcale 11g and pyhton2.6.5


texts: How to load, in QGIS, raster datasets originally mosaicked in ArcGIS?

texts:
I have used ArcGIS for years in an academic context but have very recently started using QGIS in earnest as my ArcGIS license is expired and I want to experience a new set of soul rending frustrations. I have a large catalog of DEM rasters from the US National Elevation Dataset (in ArcGRID and/or Gridfloat format) that have been mosaicked with ArcGIS. I do not know how to give more data on them, as I cannot access them in ArcCatalog and they do not show up in QGIS' Browser (at least as files I'm used to seeing or whose structure I can understand).
When I "Add Raster Data" in QGIS and open the file browse (Windows) dialog (with the "..." button), navigate to my geodatabase, I am given the option to choose from a number of file types, none of which seem to be the actual raster/mosaic I'm looking for (like I would see in ArcCatalog). When I click the file type dropdown, I can narrow down the selection, but none of the individual files in the geodatabase folder are of any of those types.
I have ATX(.atx) FREELIST(.freelist) GDBINDEXES(.gdbindex) GDBTABLE(.gdbtable) GDBTABLX(.gdbtablx) LOCK(.sr.lock) SPX(.spx) SUBFILE(.subfile) SUBFILX(.subfilx), but none of these seem to be the actual data I am looking for. Adding any of these filetypes throws an INVALID LAYER error (Invalid Layer: GDAL provider Cannot open GDAL dataset G:[filepath] not recognized as a supported file format. Raster layer Provider is not valid...)
How do I load a raster of this type into QGIS?
THIS LINK seems to address the same question, but I don't seem to have any .adf files either (at least not with my mosaicked datasets.
I am using QGIS 3.6.2-Noosa on Windows 10


texts: Get best fitting rectangle polygon in PostGIS


texts: Removing multiple characters from string field using Field Calculator Python Parser?

texts:
Is it possible to remove more than 1 character from a string in a field using the field calculator?

I know

!file!.replace(" ","")

removes spaces in a string, but is it possible to remove spaces and other characters such as "!", "?", "," all at once?

I have also tried:

Pre Logic Script:

def replChars(Name):
    replaceChars = ["!","?",","]
    for char in replaceChars:
        Name.replace(char,"")

Field =

replChars(!NH_NAME!)


texts: CreateTin_3d fails with ERROR 000800: The value is not a member of

texts:
I get 'parameters are not valid' error (see detailed error message below), when I try to execute arcpy.CreateTin_3d() function (code below)

Error I get:

  Failed to execute. Parameters are not valid.

  ERROR 000800: The value is not a member of .

  ERROR 000800: The value is not a member of .

  Failed to execute (CreateTin).

Code:

def createTIN():
    try:
        arcpy.AddMessage("You clicked OK")
        shift_tin_source = "C:\\Data\\Interacting with Maps\\Interacting with Maps.gdb\\shift_tin_source"
        shift_dx = "C:\\Data\\Interacting with Maps\\shift_dx"
        # Coordinate System

        table_created = arcpy.CreateTin_3d(shift_dx, "", shift_tin_source+" dx masspoints", "DELAUNAY")
        arcpy.AddMessage("You clicked OK1")
        print ("DX tin created")

    except Exception as ex:
        print ("Exception occurred!" + str(ex))
        print (arcpy.GetMessages())

I also tried below different version of passing argument to CreateTin function.

table_created = arcpy.CreateTin_3d(shift_dx, None, shift_tin_source+" dx masspoints None", "DELAUNAY")

and

table_created = arcpy.CreateTin_3d(shift_dx, None, shift_tin_source+" dx masspoints None", "DELAUNAY")


texts:
In my print preview dialog I have a PageLayoutControl loading the same map as the main view's MapControl. I want the map in the PageLayoutControl to center at the same position as the MapControl. Using Extent is not a solution because the PageLayoutControl has a fixed ratio (square). (I tried using the same extent, but it didn't work at all.)

I tried the following, but CenterAt() didn't do the trick.

  IEnvelope extent = _mapControl.Extent;
  double lXMin, lXMax, lYMin, lYMax;
  lXMin = extent.XMin;
  lXMax = extent.XMax;
  lYMin = extent.YMin;
  lYMax = extent.YMax;

  IPoint centerPoint = new PointClass();
  centerPoint.SpatialReference = _mapControl.SpatialReference;
  centerPoint.X = lXMin + ((lXMax - lXMin) / 2);
  centerPoint.Y = lYMin + ((lYMax - lYMin) / 2);
  _pageLayoutControl.CenterAt(centerPoint);

Neither did Extent.CenterAt() help:

 _pageLayoutControl.Extent.CenterAt(centerPoint);

I don't have MapServer, so I can't use ICenterAndScale. I didn't find a MapDescription in the PageLayoutControl at all.

Any hints?


texts: How to individually adjust spacing of legend items in QGIS print composer?

texts:
I need to be able to have the spacing between all of the items in my legend be the same space apart, regardless of the symbol size. The answer to this question is close, but I need to have the symbols in the legend be exactly the same size as in the actual map.

How can I align the items in my legend so that the spacing between the text is equal? Additionally, it would be great to have the symbols in the legend be centre-aligned.

I'm using QGIS 2.18.6.

EDIT: I've removed the other data irrelevant to this question to preserve some anonymity.


texts: Can I append to different tables using ogr2ogr?

texts:
I have been through many related questions and links but I am still confused as to how/if this is achievable. So, I have defined tables in my postgis database and I would like my ogr2ogr commnand to append to these existing tables rather than create its own - using GML files that I have.

I have tried using -nln and -sql but I had no success. The -nln option seems useful when importing a shapefile which usually contains one type of geometry thus needing to specify one table only. But what happens when need to specify 11 tables?

Finally, I found some links to use python with ogr library. I have not found good documentation with examples though...

Any suggestions?