texts: Describe FeatureClass shape type, can't get past error (object has no attribute 'shapeType')

texts:
My code:

import arcpy, csv, os

# Create a Describe object

gdb = r"Database Connections\GISUSER.sde"
desc = arcpy.Describe(gdb)

full_path = False # Specify whether dataset name should be full or relative

# Print some Describe Object properties
if hasattr(desc, "name"):
    print "Name:        " + desc.name   #Prints: GISUSER.sde
if hasattr(desc, "dataType"):
    print "DataType:    " + desc.dataType   #Prints:Workspace
if hasattr(desc, "catalogPath"):
    print "CatalogPath: " + desc.catalogPath  #prints:Database Connections\GISUSER.sde

# Examine children and print their name and dataType and their children's name and dataType
print "\n"
print "{},\t{},\t{}".format("Children:","Children.Child","DataType") #header
for child in desc.children:
    print "{},\t\t{}".format(child.name,child.dataType)

    #featureDatasets/folders = [child]
    #so that means Feature classes or subfolders materials = child.children =ds
    for ds in datasets:
        print "\t{},\t{},\t{},\t{},".format(
            ds.catalogPath.replace("" if full_path else gdb + os.path.sep, ""),
            ds.datatype,
            shapeType = str(ds.catalogPath.shapetype) #WHERE I GET MY ERROR
         )

I want to add another column after DataType for DataShape/telling the user if its a polygon/point/annotation/polyline/etc.

But then I get the error message:

Runtime error
Traceback (most recent call last):
  File "<string>", line 40, in <module>
AttributeError: 'unicode' object has no attribute 'shapeType'

Describe Object
This code I adapted(shown) does gives me the ShapeType which shows that Shapetype would work for this purpose if I could get past this error.

import arcpy
import os

arcpy.env.workspace = r"Database Connections\GISUSER.sde"

datasets = arcpy.ListDatasets(feature_type='feature')
datasets = [''] + datasets if datasets is not None else []

for ds in datasets:
    for fc in arcpy.ListFeatureClasses(feature_dataset=ds):
        path = os.path.join(arcpy.env.workspace, ds, fc)
        print(path)
        shapeType = arcpy.Describe(path).shapeType
        print (shapeType)

Results:
Database Connections\GISUSER.sde\Layers.GISUSER.Street_LightsCP
Point
Database Connections\GISUSER.sde\Layers.SDE.penny_parcel
Polygon
Database Connections\GISUSER.sde\Layers.SDE.Subdivision_Circuits
Polygon
Database Connections\GISUSER.sde\Layers.SDE.waterlines2
Polyline
Database Connections\GISUSER.sde\Layers.SDE.Parks_old
Polygon
Database Connections\GISUSER.sde\Layers.SDE.Trails_old
Polyline
Database Connections\GISUSER.sde\layers.SDE.StSenateDstrcts
Polygon
Database Connections\GISUSER.sde\layers.SDE.StHouseDstrct
Polygon
Database Connections\GISUSER.sde\layers.SDE.USHouseRep
Polygon

Basically, I'm trying to Print out all the FeatureDatasetes,Classes, tables, rasterbands and their type , inside a database.


texts: Is there a function to obfuscate a PostGIS point or geometry?

texts:
I am looking for a function, perhaps a Perlin noise implementation or something similar, for PostgreSQL/PostGIS.

Does such a thing exist in core PostGIS?

If not, does such a function exist an shared repo/blog post/napkin?


texts: dynamicMapLayer esri-leaflet does not return properties of point data

texts:
I am using a dynamicMapLayer with point data. If I bind a custom popup to this layer, it does not return the properties for the point.

https://plnkr.co/16IooEUXpoo9fvqlfnhU

If I use polygon data with the dynamicMapLayer, it does return the properties.

https://plnkr.co/o4lrf32DlL9KOFpMJEs9

If I use a featureLayer, it does return the properties for point data.

https://plnkr.co/cHFt1qA1zLTkqQ1iETne

Is this behaviour correct? I would rather use a dynamic layer, it seems faster and returns symbology also.


texts: How to get the error if GDALOpenEx fails?

texts:
I am using GDAL 2.1.0 in a C++ application.
I call GDALOpenEx() to open a dataset file.  If it fails to open the file, it returns NULL.  That is sufficient to bail early.  But, I would also like to know what the error was that caused it to fail.
The documentation for GDALOpenEx() ( https://gdal.org/api/raster_c_api.html#gdal_8h_1a9cb8585d0b3c16726b08e25bcc94274a ) says:

If all drivers fail then NULL is returned and an error is issued.

"an error is issued" probably means that it is sent to the callback I register with CPLSetErrorHandler().  I already have such a callback so that the error is logged to my log file.
However, is there another way I can get the error immediately after I call GDALOpenEx() ?


texts:
I have a problem regarding the street numbers in OpenStreetMap. I have downloaded the .osm file of a city from the OpenStreetMap web. Then with QGIS I have obtained a shapefile with roads and a shapefile with the buildings.

What I want is to get in one file roads with street numbers and their position. Is there any way to get this?

I have only achieved to get one layer with the roads and one layer with the polygons, where the House numbers are, but I can't find a relation between both layers; also,the street names on the polygons layer are not correct always.


texts: Creating unique identifier for cadastral parcels in QGIS?

texts: I would like to know what criteria I can take to create a unique identifier number for a cadastral parcel, in QGIS version 2.16


texts: How to dissolve a subset of a multipolygon vector in QGIS?

texts: I have a multipolygon layer. Some of the polygons within the layer overlap. I would like to dissolve only the polygons which overlap and not any discrete polygons. Is this possible? I am currently using QGIS.


texts: Points in Polygon Query but having CRS issues (QGIS)

texts:
I have two files:

A csv file that has lat longs listed for points.
A shapefile that contains England NHS CCG boundaries (which usually uses the British National Grid).

When I 'add a delimited layer', if I opt to geocode the lat/long data to BNG, it doesn't like it.  But if I change the NHS CCG shapefile to a CRS of WGS84, then it looks curved.

I just want to do a query that tells me what CCG boundary each of these points reside in (so either a point in polygon query or a join attributes by table query).


texts:
I am trying to insert a Layer with WFS-T and getting an error. I am using ol3 and want to insert data to my database using WFS-t
so this is the GML I defined to do so :

formatGML = new ol.format.GML({
    featureNS:
    'http://localhost:8080/geoserver/wfs/workplace',
    featureType:'layername',
    srsName: 'EPSG:3857'
    });

but unfortunately it doesn't work! It is saying :

No such feature type http://localhost:8080/geoserver/wfs/workplace:layername


texts: How to delete a point with known coordinates in python?

texts: I was wondering if there is a piece of code that does the opposite that setGeometry does and removes a point if there is one at x and y coordinates?


texts: Reducing cell size of DEM for processing reasons?

texts:
I need to calculate the solar radiation for a region of interest, and I am using the 'solar radiation' tool implemented in ArcGIS (10.1) and a DEM with cell size 1x1. It is 3 days now that ArcGIS is processing the DEM, and it is at 31%.
I was wondering if it is a sound approach to convert (how?) the DEM at a coarser resolution (say, 10x10). Furthermore, since my aim was to use the obtained raster as an Independent Variable in a Logistic Regression model, and since the other rasters I will use are at cell size 1x1, I am wondering if there is anything methodologically wrong in introducing disparities in the raster used as far as cell size is concerned?


texts: Calculate yearly mean/median in merged Landsat image collection

texts:
I want to calculate yearly (or monthly)  mean/median/max for multiple image collections (Landsat4, 5, 7 and 8) for a certain area.

This is what I did so far:

I merged several Landsat image collections into one collection which contains Landsat 4, 5, 7, and 8.
I selected my bands of interest: my band selection for Landsat 4, 5, and 7 is B3,B6, B7, B5 and B4; while selection for Landsat 8 is B2, B5, B7,  B4 and B3.
I filtered my full image collection (L4-L8) according to this band selection and region of interest (roi).

So now I have to calculate "the best" image per year within this selection. I read several things about calenderRange or reducers, but I cannot get it working so far.

Update: code is now added below.

// variables
var point =  ee.Geometry.Point([-8.7, 38.5]);
var bandSelect = ['green', 'swir1', 'swir2', 'nir', 'red'];
var bands8 = ['B3', 'B6', 'B7', 'B5', 'B4'];
var bands7 = ['B2', 'B5', 'B7', 'B4', 'B3'];

// data
function generateLandsatCollection(){
  var l4collection = ee.ImageCollection('LANDSAT/LT04/C01/T1')
    .filterBounds(point)
    .select(bands7, bandSelect);
  var l5collection = ee.ImageCollection('LANDSAT/LT05/C01/T1')
    .filterBounds(point)
    .select(bands7, bandSelect);
  var l7collection = ee.ImageCollection('LANDSAT/LE07/C01/T1_RT')
    .filterBounds(point)
    .select(bands7, bandSelect);
  var l8collection = ee.ImageCollection('LANDSAT/LC08/C01/T1_RT')
    .filterBounds(point)
    .select(bands8, bandSelect);
  var collectionFull = ee.ImageCollection(l4collection
  .merge(l5collection)
  .merge(l7collection)
  .merge(l8collection));
  return collectionFull
}

var collection = generateLandsatCollection();
print(collection)


texts: gdalbuildvrt error 1: unable to find 'location' in DBF

texts:
I'm trying to create a vrt file with several shapes which I had created previously with gdal_contour (all of them only have 1 feature):

gdalbuildvrt -input_file_list tiles.txt vrtFile.vrt

But I got the next error:

ERROR 1: Unable to find field `location' in DBF file `D:\shapes\shape01.shp'.

After check the shapes in Qgis I discovered all the features only have the field 'ID' (with the value 0). So I tried with the option -tileindex with their IDs:

gdalbuildvrt -tileindex ID -input_file_list tiles.txt vrtFile.vrt

But then I obtained another error:

0...10...20...30...40...50ERROR 4: 0: No such file or directory
Warning 1: Can't open 0. Skipping it
...60...70...80...90...100 - done.
ERROR 4: 0: No such file or directory
Warning 1: Can't open 0. Skipping it


texts: Converting Vector (.shp) to Raster (.tiff) using Python GDAL library

texts:
I'm trying to convert a vector shapefile to a raster tiff file. I adapted the source code from Python Geospatial Analysis Cookbook by Michael Diener. The code works for line and polygon shapefiles but shows only a black screen for point shapefiles.

def main(shapefile):

#making the shapefile as an object.
input_shp = ogr.Open(shapefile)

#getting layer information of shapefile.
shp_layer = input_shp.GetLayer()

#pixel_size determines the size of the new raster.
#pixel_size is proportional to size of shapefile.
pixel_size = 0.1

#get extent values to set size of output raster.
x_min, x_max, y_min, y_max = shp_layer.GetExtent()

#calculate size/resolution of the raster.
x_res = int((x_max - x_min) / pixel_size)
y_res = int((y_max - y_min) / pixel_size)

#get GeoTiff driver by
image_type = 'GTiff'
driver = gdal.GetDriverByName(image_type)

#passing the filename, x and y direction resolution, no. of bands, new raster.
new_raster = driver.Create(output_raster, x_res, y_res, 1, gdal.GDT_Byte)

#transforms between pixel raster space to projection coordinate space.
new_raster.SetGeoTransform((x_min, pixel_size, 0, y_min, 0, pixel_size))

#get required raster band.
band = new_raster.GetRasterBand(1)

#assign no data value to empty cells.
no_data_value = -9999
band.SetNoDataValue(no_data_value)
band.FlushCache()

#main conversion method
gdal.RasterizeLayer(new_raster, [1], shp_layer, burn_values=[255])

#adding a spatial reference
new_rasterSRS = osr.SpatialReference()
new_rasterSRS.ImportFromEPSG(2975)
new_raster.SetProjection(new_rasterSRS.ExportToWkt())
return gdal.Open(output_raster)

So, my problem is:

What do I change in the code so that it works for point shapefiles too? and how do I get my final output raster file to be of the same color as the input vector file?

The things that do work in the code is:
1. getting input and returning the output properly.
2. getting the proper size/resolution and creating a raster of the required resolution.
3. proper shapes in the output for polygon and line shapefiles.


texts:
I am trying to import a Shapefile which is in EPSG:4326 coordinates to MSSQL Database but its failing. I am following the below command:

ogr2ogr -f MSSQLSpatial -overwrite "MSSQL:server=MSSQLServer_Name;database=dbname;trusted_connection=yes" -nln "output" "input.shp"

I get following error

ERROR 1: SQL Error SQLState=22018, NativeError=0, Msg=[Microsoft][SQL Server Native Client 11.0]Invalid character value for cast specification

ERROR 1: Unable to write feature 4195 from layer client_v01.
ERROR 1: Terminating translation prematurely after failed
translation of layer client_v01 (use -skipfailures to skip errors)
ERROR 1: SQL Error SQLState=HY000, NativeError=0, Msg=[Microsoft][SQL Server Native Client 11.0]Text column data incomplete

Then I tried to use  -skipfailures but even that gave me error

ogr2ogr -f MSSQLSpatial -overwrite "MSSQL:server=MSSQLServer_Name;database=dbname;trusted_connection=yes" -nln "output" "input.shp" -skipfailures

Error as under

ERROR 1: SQL Error SQLState=22018, NativeError=0, Msg=[Microsoft][SQL Server Nat
ive Client 11.0]Invalid character value for cast specification

ERROR 1: SQL Error SQLState=42000, NativeError=4804, Msg=[Microsoft][SQL Server
Native Client 11.0][SQL Server]While reading current row from host, a premature
end-of-message was encountered--an incoming data stream was interrupted when the
 server expected to see more data. The host program may have terminated.

ERROR 1: SQL Error SQLState=22018, NativeError=0, Msg=[Microsoft][SQL Server Native Client 11.0]Invalid character value for cast specification

ERROR 1: SQL Error SQLState=42000, NativeError=4804, Msg=[Microsoft][SQL Server
Native Client 11.0][SQL Server]While reading current row from host, a premature
end-of-message was encountered--an incoming data stream was interrupted when the
 server expected to see more data. The host program may have terminated.

I read some of the posts and found it could be problem with coordinate system, therefore I used the below command.

ogr2ogr -f MSSQLSpatial -overwrite "MSSQL:server=MSSQLServer_Name;database=dbname;trusted_connection=yes" -nln "output" "input.shp" -s_srs EPSG:4326 -t_srs EPSG:4326

But got the same error.

Also, I saw some posts that mentions I should be having different geometry in the shapefile but I checked and I only have LineString.

Can someone help me get the Shapefile into the MSSQL database?


texts: QGIS Layout: Expressing name of the map theme in a label

texts: I am looking for the exact expression/code to make sure I can express the name of the map theme in label in my QGIS layout manager. The reason why is because I have a template with some variables that need to expressed. To save time with around 30 maps or so. But I cannot seem to find the expression to express the name of the map theme in my loaded map. How do I this?


texts: How do I open the GeoDB files on NaturalEarthData's site without ArcGIS?

texts:
I'm trying to use the admin1 dataset from the NaturalEarthData website. The site offers this data as both shapefiles and GeoDB. The shapefile attribute data is apparently encoded in Windows-1252 and a lot of the characters in some of the attribute data I need are just '?' characters.

The NaturalEarthData site mentions that:

The GeoDB format preserves local scripts better than SHP format.

I built GDAL against the FileGDB SDK from ArcGIS and verified the GDAL FGDB driver is working correctly using this link:

http://trac.osgeo.org/gdal/wiki/FileGDB

But I can't open files from NaturalEarthData. I always get the following error:

Unable to open datasource `ne_10m_admin_1_states_provinces.gdb' with the following drivers
...
FileGDB
...

I don't have access to ArcGIS. Am I doing something wrong? Is there any way I can access the GeoDB data?


texts: Filling a field with automatic numbering specific by unique value of another field with QGIS expression

texts:
I have a table with 2 fields: NUMBER (integer) and TOWN (text).
I would like to find an expression that fills the NUMBER field with an automatic number specific for each value of TOWN.
Example:
NUMBER | TOWN
----------------------
1      | STRASBOURG
2      | STRASBOURG
3      | STRASBOURG
1      | PARIS
2      | PARIS
1      | TOULOUSE
2      | TOULOUSE
3      | TOULOUSE
4      | TOULOUSE
How can I do that with a QGIS expression ?


texts: Using a value from "iterate feature selection' to calculate a field

texts:
I'm trying to streamline a model that identifies all zones that intersect each parcel in our Local Government Area (eg. Parcel x has Zone B1, B2 and E4). I am trying to make use of iterators in ArcGIS10. The problem is in bold italics below;

I have a Zones layer and a Parcels layer. I select all polygons of Zone A (using iterate feature selection) then do a select by location to get parcels that intersect those selected polygons. I now want to check if Field1 is empty, if it is, use calculate field to populate Field1 with the "Zone A" value used to select my zone in the first place. I then continue with some simple if-then-else logic and the model then iterates with Zone B.

I built a working version of this in ArcGIS 9.3.1 that works but it is extremely cumbersome and making small changes to the process is very time-consuming.

Any suggestions are much appreciated.

P.S. I have no python experience and only a little VB knowledge but if writing an arcpy script is the only solution to my problem then I'm more than happy to start learning!


texts: Accessing deleted feature attributes (before committing) QGIS 3.4?

texts:
It's basically the same question as the one asked in the post: How to access a deleted features attributes (before committing), but the solution is not working in QGIS 3.4.

I do it the same way:

A Signal on featureDeleted

self.layer.featureDeleted.connect(self.feature_deleted)

A function to access attributes of the deleted feature:

def feature_deleted(self, fid):
    feature = self.layer.dataProvider().getFeatures(QgsFeatureRequest(fid)).next()
    print feature.attributes()

The problem is, this part:

self.layer.dataProvider().getFeatures(QgsFeatureRequest(fid))

is returning a QgsFeatureIterator which has no method .next() and I don't know how to access the feature from the Iterator otherwise.


texts: Accessing PostGIS raster data using Query Layer in ArcGIS Desktop?

texts:
I tried to load raster file (jpg) into post gis using the syntax provided here "C:\Program Files (x86)\PostgreSQL\9.1\bin>raster2pgsql -I -C -e -Y -F -s 102003 -t 300x300 ras_test.tif ras_test1 | psql .exe -U postgres -d raster_analysis -h localhost -p 5434"

I could see a raster table created in the database. It has three columns (rid,rast, filename), where you do not see any thing under "rast raster" column unless you click on a particular cell.

Here is my actual problem. How to view the raster layer from ArcGIS using sql query layer. When I tried adding this layer and validate it, it says "rast raster" column has invalid data type. How can I view the raster layer in ArcGIS?

I could however, able to see the raster layer in QGIS using a plugin. However, my work needs access from arcGIS 10.

It is mentioned in this link, http://trac.osgeo.org/postgis/wiki/WKTRaster,  that
You can not display rasters directly but a vectorization of them (in ArcGIS 10). How to do this?


texts: Select KML feature with specific attribute

texts:
Im using Openlayers, and importing polygon data to the map with KML files.

How could i select the feature which has the attribute name="TEST" ?

KML def:

<Placemark>
<Name>TEST</Name>
<Polygon><outerBoundaryIs><LinearRing><coordinates>//Some coordinates\\</coordinates></LinearRing></outerBoundaryIs></Polygon>
</Placemark>

Iknow that you can loop trough them to check it. But i was hoping for something more efficient.


texts:
layer.renameAttribute(0,'xxx')
Traceback (most recent call last):
  File "", line 1, in
AttributeError: 'QgsVectorLayer' object has no attribute 'renameAttribute'

Can you get me solution for this error?


texts: Skipping when value is Null in ArcMap dynamic label expression?

texts:
I have a table of contents with multiple owner agencies that may or may not have an acreage value in the field and am trying to get a dynamic label expression to only write out the label for the fields that have values.

For example, if the fields were BLM, USFS, Private, and their values were 10.2, "Null", and 5.5 respectively, I would like the dynamic label to read

BLM: 10.2 acres
Private: 5.5 acres

where it skips USFS due to the "Null" value. So far, I have only been able to get this code that I know is incorrect. It returns only the first true value and then does not go to the next in the list.

Function FindLabel ( [BLM] , [BR] , [Private] , [SITLA] )
  if ( ( [BLM] ) > 0) then
    FindLabel = "BLM: " + [BLM] + " acres"
  elseif  ( ( [BR] ) > 0) then
    FindLabel = "BR: " + [BR] + " acres"
  elseif  ( ( [Private] ) > 0) then
    FindLabel = "Private: " + [Private] + " acres"
  elseif  ( ( [SITLA] ) > 0) then
    FindLabel = "SITLA: " + [SITLA] + " acres"
  end if
End Function

Attribute table:


texts: How to place labels on multi-geometries in QGIS?

texts:
I need to put a label value on each geometry, so I do not need to locate the label on the  (or near to) centroid.

I use QGIS 2.6 on windows 7

Most ot the records has only one geometry linked to, but I have some records with more geometry.


texts: MODIS 'system:time_start' format problem in Google Earth Engine

texts:
In Google Earth Engine, what is the default format of time_start for MOD10A1 image?For example,

var modisCollection = ee.ImageCollection('MODIS/006/MOD10A1')
    .filterDate('2000-08-21', '2001-02-28')
print(modisCollection.first())

var l5 = ee.ImageCollection('LANDSAT/LT05/C01/T1_SR')
  .filterDate('2000-04-28', '2001-02-28')
print(l5.first())

From the output, you can see that the MODIS ‘system:time_start’ value of the image is 980985600000 and Landsat 'system:time_start' value is 966866712747. Are 980985600000 and 966866712747 in the same time format?
If 980985600000 is not unix time, how do I convert to unix time.

Sample code https://code.earthengine.google.com/3b326b1267efeacc81b8a4abbd241a6f
I hope someone can help me, thanks


texts: Adding multiple model outputs to merge tool in ModelBuilder?

texts:
I am using ModelBuilder to batch project multiple (site) specific geodatabases' contents then "Merge" like components into a single geodatabase.

I have up to eight FCs for each site (e.g. parcels, easements) and 21 sites. Say for parcels I have 21 parcels connected to the batch project.

How can I then add the "Merge tool" to the processing?

I can't actually add the 21 parcels since the reprojections do not yet exist.


texts:
I have a point shapefile and a line shapefile like these:

Each point has a numerical attribute that I would like to transfer to the line (The lines represent directional data). I broke already the line at each point, but I don't know how to transfer the attribute from each point to the line.
Does anyone know how to do it?


texts: Background no data areas appearing where raster and vector data meet in GeoServer

texts:
I'm using Geoserver (2.1) to load raster data with the Imagemosaic plugin and then using Geowebcache to cut this data into tiles across the full coverage of the British National Grid. However the data does not extend to all areas of this extent and in these areas I get black background where there is no data.

To resolve this I loaded a vector background which serves as a blue sea background for areas where the raster data does not extend to. However where the vector and raster areas meet I am still seeing sections of black no data background (even though the vector data covers all areas where the raster data does not and is behind it in the layer group).

I've tried setting both the InputTransparentColour and the OutputTransparentColour options to black which does make these black areas disappear, however it also causes the black text on the raster mapping to become transparent as well.

Does anyone know of any other ways to change this background colour without effecting the raster data itself or why these black areas might still be appearing even though there is vector data there that should be displayed?


texts: St_intersection doesn't give the correct response


texts: Downloading digital elevation model of United States?

texts:
I would like to download a digital elevation model of the United States, where can I do this?

It doesn't need to be super detailed.

But it would be nice, if was clipped at the country borders – otherwise, I would need the shape of the US so that I can clip the DEM with the shape.


texts: Assigning raster values to LiDAR point cloud in R?

texts:
I am trying to extract several point values for a set of liDAR data. I am starting with the DEM before I jump into the other more complicated values in my raster stack.

Here is my code:

library (rLiDAR)
las<-readLAS("BelottaWallaSC1.las")
head(las,10)
library(raster)
las<-data.frame(las)
rasValue=extract(rasterdem,las, na.rm=TRUE)
head(rasValue,10)

Here are my errors:

> rasValue=extract(rasterdem,las, na.rm=TRUE)
Error in .xyValues(x, as.matrix(y), ...) : xy should have 2 columns only.
Found these dimensions: 56159254, 5
> head(rasvalue,10)
Error in head(rasvalue, 10) : object 'rasvalue' not found


texts:
I would like to install a version of TauDEM above 5.3 (current version is  5.3.8) in Linux Ubuntu 16.04. Installation instructions that I have managed to find online are here, here and here. And the errors that I get when I try these instructions are reported here and here.

TauDEM source code is linked here.


texts:
I am configuring an instance of Geoportal Server on an Amazon EC2 instance.  I have ports 8080 open for tomcat, but need to open ports for Apache Directory Studio.

How do I view ports which are accessible for inbound traffic?


texts: The interactive feature input to set extent - is there way to get the schema from one of the input layers

texts:
i created script that run some task
i need for the user to draw the extent on screen
when i define the parameter for the tools
the extent defined as feature set and i need to add layer to use it schema
how can i define it so the schema is the same as one of the input polygon layer ?

the tool wont always be on the same PC or network


texts: How can I access second (or even third) level attributes in a vector layer and add them to the attribute table?

texts:
I got some .dxf file containing buildings I need for my map. The file loads nicely into QGIS and I converted sucessfully to shape. I still can find the Information I need (the buildings height) in the element identify box. However, it is organized as some kind of second level attribute and I'm running out of ideas how to access the information (screenshot below).

In this example the only entry in the attribute table is "myid".

How can I access second (or even third) level attributes in a vector layer and add them to the attribute table, so I can work with them?

EDIT: The structure with the sub attributes (a... and (A... already exists in the .dxf.

EDIT2: The Attribute table currently only consists of one single field named "myid".

EDIT3: Hm… The categorys (a… and (A… are shown in the Identify box when querying the .dxf. This is what I wanted to say. But of course, you may be right…

If this is rather the perimiter than a height field, it is useless to me anyway. Bad luck. Do you by any means know of a better way to convert .dxf to .shp creating a height field?


texts: We are building a project in ArgGis 10.2 were we create buildings using rectangles. Some of them need to be  attached at one or more sides (they have common walls), so we would use snapping to snap vertex to edge to create a new building next to another.  It seems to snap, but when zoomed in (1:0.3 scale) we can see that they are not snapped.  at 1:1 looks good, but if we look even closer we see that the lines or point are not joined.


texts: Geofencing radius distribution/ratio across multiple geofences

texts:
I understand that this problem might be simple geometry, but Im using specific shapefiles for a geographical area and looking for a specific gis solution (hopefully code).

Essentially Id like to find the area of black that covers each separate geographical bounds. What percentage covers the red area, blue area, and then green?

I have coordinates of the center, as well as shapefiles (.shp). The radius is known. No preference on library other than it being open source (R and Python).


texts: Assertion Error when attempting arcpy.mapping.AddLayer

texts:
Whenever I attempt to use AddLayer it gives me: Runtime error <type 'exceptions.AssertionError'>

This is what I've been using:

arcpy.mapping.AddLayer(MainDF, r"\\GEOGDATA\campusmapping\CampusWide\LayerFiles\CAD\Floor2\Casanova2", "BOTTOM")

Casanova2 is a .lyr file. I've also attempted to use this with a few other layer files. Every time it gives me an AssertionError.

Do you know what I'm doing wrong?


texts: Identification of roof peaks on a Raster in Qgis

texts:
I am trying to map all the flat roofs of a city. After processing my data I have a huge raster with the zones that are flat (=1) and not flat (=0).
I can overlap the roof polygons over this raster and I can see what zones of the roofs are flat.

The problem is that I have a lot of roof peaks which are considered as flat (this corresponds to the long white stripes on the raster image). I would like to clean these roof peaks WITHOUT polygonizing my rasters (too heavy process for my huge files).

I was thinking to calculate for each flat part of the roof: Area/Perimeter=x < coefficient.
I could already calculate the area of the flat surfaces with zonal statistics but I cannot find a way to calculate the perimeter of the flat areas within the roof.

Is there a way to achieve this?

Would you have another approach to identify the roof peaks on this raster without polygonizing it?


texts: Clustering table on geohash index and geohash ordered table

texts:
I wonder if there could be a performance gain to re organize the rows in a table by Geohash and then CLUSTER this table on the Geohash index of the geometries.

CREATE TEMPORARY TABLE tmptbl AS
SELECT *, (st_geohash(st_transform(geom,4326),10))as geohash
FROM mytable  ORDER BY geohash;

DELETE FROM  mytable;

ALTER TABLE tmptbl DROP COLUMN geohash;

INSERT INTO mytable SELECT * FROM tmptbl;

DROP INDEX mytable _geom_gist;

CREATE INDEX mytable _geom_gist
ON mytable USING gist(geom);

CREATE INDEX mytable_geom_geohash
ON mytable  (st_geohash(st_transform(geom,4326),10));

CLUSTER mytable USING mytable_geom_geohash;

Thanks


texts: Calculating ERA5 2018 monthly 2mt temperature anomalies in Google Earth Engine

texts:
I am trying to calculate in Google Earth Engine using ERA5 the monthly 2mt temperature anomalies from January to December 2018 compared to the long-term reference period of 1981-2010. In other words, I would like to compare the temp anomaly of January 2018 with January of the long-term period. Finally, I would like to create a and create a time-lapse video from January to December 2018.
As a starting point, I am using the "Iterating over an ImageCollection" code example, but I don't get it working properly with the ERA5 data.

link to the code and the code.

// Load era5
var era5_2mt = ee.ImageCollection('ECMWF/ERA5/MONTHLY')
               .select('mean_2m_air_temperature')
               .map(function (image){
                return image.clip(geometry);
  });
print(era5_2mt);

// Define reference conditions from the first 30 years of data.
var eraref = era5_2mt.filterDate('1980-01-01', '2010-12-31')
  // Sort chronologically in descending order.
.sort('system:time_start', false);

// Compute the mean of the first 30 years.
var mean = eraref.mean();

// Compute anomalies by subtracting the 1980-2010 mean from each image
in a
// collection of 2018 images. Copy the date metadata over to the
// computed anomaly images in the new collection.
var series = era5_2mt.filterDate('2018-01-01', '2018-12-
31').map(function(image) {
    return image.subtract(mean).set('system:time_start',
image.get('system:time_start'));
});
var series2 = series.map(function(img){
    return img.clip(geometry);
});

// Display cumulative anomalies.
Map.setCenter(-4.12, 39.834, 5);
Map.addLayer(series.sum(),
    {min: -50, max: 50, palette: ['blue','white','red']}, 'Temp 2mt
anomaly');

// Get the timestamp from the most recent image in the reference
collection.
var time0 = eraref.first().get('system:time_start');

// Use imageCollection.iterate() to make a collection of cumulative
anomaly over time.
// The initial value for iterate() is a list of anomaly images already
processed.
// The first anomaly image in the list is just 0, with the time0
timestamp.
var first = ee.List([
// Rename the first band 'temp'.
  ee.Image(0).set('system:time_start', time0).select([0], ['temp'])
]);

// This is a function to pass to Iterate().
// As anomaly images are computed, add them to the list.
var accumulate = function(image, list) {
 // Get the latest cumulative anomaly image from the end of the list
with
  // get(-1).  Since the type of the list argument to the function is
unknown,
  // it needs to be cast to a List.  Since the return type of get() is
unknown,
  // cast it to Image.
  var previous = ee.Image(ee.List(list).get(-1));
  // Add the current anomaly to make a new cumulative anomaly image.
  var added = image.add(previous)
    // Propagate metadata to the new image.
    .set('system:time_start', image.get('system:time_start'));
  // Return the list with the cumulative anomaly inserted.
  return ee.List(list).add(added);
};

// Create an ImageCollection of cumulative anomaly images by
iterating.
// Since the return type of iterate is unknown, it needs to be cast to
a List.
var cumulative = ee.ImageCollection(ee.List(series.iterate(accumulate,
first)));

// Predefine the chart titles.
var title = {
  title: 'Cumulative Temp anomaly over time',
  hAxis: {title: 'Time'},
  vAxis: {title: 'Cumulative Temp anomaly'},
};

// Chart some interesting locations.
//var pt1 = ee.Geometry.Point(-8.669, 41.187);
//print('Porto:',
//Chart.image.series(cumulative, pt1, ee.Reducer.first(),
500).setOptions(title));


texts: Restriction 10km of interpolation radius in QGIS

texts: I am trying to use the Grid (Interpolation) tool from Analysis Menu in QGIS 2.18 for a small set of very few, sparsely ditributed points (they are centroids of municipalities and the quantity is population potential). But for the radius parameters of IDW method, I can't define values more than 10000m. I wonder, is it on purpose or is it a bag on the code?


texts: pgrouting shortest_path return longest_path

texts:
I've got troubles with shortest path function from pgrouting. I try to calculate the shortest path between an address and a bus stop.

I first found the nearest road points for the address and the bus stop with theses requests:

SELECT id(foo.x) as id, name(foo.x) as type FROM ( SELECT find_node_by_nearest_link_within_distance( 'POINT(521671 147119)', 50, 'route')::link_point as x ) AS foo LIMIT 1
SELECT id(foo.x) as id, name(foo.x) as type FROM ( SELECT find_node_by_nearest_link_within_distance( 'POINT(519555 150354)', 50, 'route')::link_point as x ) AS foo LIMIT 1

That works great and gives me the right start and end points. But then comes pgrouting request:

SELECT st_transform(st_union(the_geom), 21781) as geometry
FROM route
WHERE gid in (
  SELECT edge_id
  FROM shortest_path('
    SELECT gid as id,
    source::integer,
    target::integer,
    cost,
    reverse_cost
    FROM route',
    441718,
    442011,
    false,
    false
  )
);

that gives me a way from start point to end point, but surely not the shortest… see this image

Here are the first rows of my roads (table 'route')

  gid | longueur | source | target |  categorie |   x1   |   y1   |   x2   |   y2   |  the_geom | cost | reverse_cost
------------------------------------------------------------------------------------------------------------------
  1   |    1     | 995012 | 995013 |"strasse_3m"| 512636 | 146599 | 512637 | 146599 | 01050000… |  0   |    0
  2   |    3     | 995014 | 995015 |  "weg_2m"  | 512599 | 146686 | 512596 | 146685 | 01050000… |  0   |    0
  3   |    1     | 995016 | 995017 |  "weg_2m"  | 512391 | 146934 | 512393 | 146934 | 01050000… |  0   |    0
  4   |    25    | 995086 | 995087 |  "weg_2m"  | 512639 | 146277 | 512653 | 146257 | 01050000… |  0   |    0

It doesn't matter the cost, it's why both cost and reverse_cost are equal to 0. I'm just interested by the length ('longueur' here)

I'm searching for hours without finding anything...

Thanks in advance for your help!


texts: Python script to zoom to a city and export as PDF won't zoom to city

texts:
The script completes successfully but doesn't zoom to the given city. It does export to PDF with the correct name though. The map is the county wide extent and not zoomed to the given city. The print cityName statement does return the correct city that is entered by the user. Any ideas?

# imports and environment setup
import arcpy
import arcpy.mapping as MAP     # alias for the module name
import time                     # module that allows you to time your script

rootFolder = r'\\myFilePath'
arcpy.env.workspace = r'myWorkspace'
arcpy.env.overwriteOutput = True

# open the MXD and set varibles for the dataframe, working layers, title
mxd = MAP.MapDocument(r'{}\ZoomToCity.mxd'.format(rootFolder))

dataframe = MAP.ListDataFrames(mxd, 'Focus City')[0]

selectedCityLyr = MAP.ListLayers(mxd, 'SelectedCity', dataframe)[0]

titleTextElm = MAP.ListLayoutElements(mxd, 'TEXT_ELEMENT', 'SelectedCity')

## user inputs a city name
input = raw_input('Enter a City (e.g., CITY A -- case sensitive): ')

### create a search cursor to select the desired city from the "City" FC

for row in arcpy.da.SearchCursor('city_limits', 'CITY_NAME', "CITY_NAME = '{}'".format(input)):
                ## get the city name from the cursor list
                cityName = row[0]

                print cityName

                # update the map title
                titleTextElm = '{}'.format(cityName)

                ## set definition query to the selected city layer -- provides special symbology
                selectedCityLyr.definitionQuery = "CITY_NAME = '{}'".format(cityName)

                ## use the SelectLayerByAttribute tool to select the city
                arcpy.SelectLayerByAttribute_management(selectedCityLyr, 'NEW_SELECTION',
                                                "CITY_NAME = '{}' ".format(cityName) )
                ## zoom to the selected city
                dataframe.zoomToSelectedFeatures()

                ## clear the selection to remove the city selection symbology from the map
                arcpy.SelectLayerByAttribute_management(selectedCityLyr,'CLEAR_SELECTION')

                ## Export the map as a PDF image file named for the selected city
                MAP.ExportToPDF(mxd, r'{}\activeMaps\{}.pdf'.format(rootFolder, cityName))

                 ## print a message for each city map image created
                print 'Completed map of: "{}"'.format(cityName)

# clear the selection and refresh the active view
arcpy.SelectLayerByAttribute_management(selectedCityLyr, 'CLEAR_SELECTION')
arcpy.RefreshActiveView()

# clear the connection to the map document
del mxd


texts: Is it possible to import .ecw images into QGIS 2.10 for Ubuntu?

texts: We want to import .ecw images. We have done it using QGIS 2.8 for Windows in the past, but we can't using QGIS 2.10 for Ubuntu


texts:
After successfully working with node-mapnik (and the gorgeous vector tiles) on Linux I'm trying to set them up on Windows too, but have come to a dead end.

What I've done so far:

Installed mapnik 2.2.0 SDK and added the bin and lib directories to the PATH.
Using npm install mapnik shows an error about a missing cairo header file.
Cloning the repository and adding the cairo directory to binding.gyp solved the header issue.
Next error is about the target architecture (32 vs. 64bit), because the generated solution is 64bit only. I solved this by adjusting the gyp config parameters to get a Win32 target.
Next errors are about missing boost libraries. I followed the tutorial on how to build mapnik dependencies on Windows to the letter and added the boost-49-vc100\lib directory to the AdditionalLibraryDirectories. Which results in this error:

Creating library C:\dev2\node-mapnik\node-mapnik\build\Release\_mapnik.lib
and object C:\dev2\node-mapnik\node-mapnik\build\Release\_mapnik.exp
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs;
use /NODEFAULTLIB:library [C:\dev2\node-mapnik\node-m apnik\build\_mapnik.vcxproj]
mapnik_image_view.obj : error LNK2001: unresolved external symbol "void __cdecl
boost::throw_exception(class std::exception const & )"
(?throw_exception@boost@@YAXABVexception@std@@@Z) [C:\dev2\node-mapnik\
node-mapnik\build\_mapnik.vcxproj]
C:\dev2\node-mapnik\node-mapnik\build\Release\_mapnik.node : fatal error
LNK1120: 1 unresolved externals [C:\dev2\node-mapnik\node- mapnik\
build\_mapnik.vcxproj]

Any suggestions on how to get node-mapnik (with vector tile support) running on Windows?


texts: Displaying vector layer added using Add Vector Layer in QGIS?

texts:
Scenario

I have a .csv file containing (amongst others) some date fields, and a matching .csvt file defining the correct field data types. The only way I have been able to add my .csv data and have QGIS recognise the correct date field is by using:

"Manage Layers Toolbar > Add Vector Layer"

Which gives me this dialog:

After selecting my .csv file and clicking open, the layer appears in the layers panel like so:

All the fields are the correct data types and all the data is present, however nothing displays in the map canvas. I figure QGIS does not know these data are geometry points and so treats the layer as a data table.

How can I get QGIS to render this layer as points on the map canvas?

(Note that adding the .csv file using "Manage Layers Toolbar > Add Delimited Text Layer", which does render correctly, is not an option unless there is a way to make this approach recognise the date fields correctly.)


texts: Listing total number of features into an ArcGIS Online feature pop-up

texts: When configuring a feature service pop-up, how can I get the total number of features listed in the pop-up?  For example, I have a hydrant service.  When clicking on any hydrant, the pop-up would list the total amount of hydrants.  Is there a way to do this with arcade, other than creating an integer field and adding "1" to every row and using the sum?


texts:
What are the criteria to determine if river A is a major or minor tributary to another River B?

Is stream order the only deciding factor i.e. the highest order is the main stem, one less order is a major tributary and one more lesser order is a minor tributary?

I haven't been able to find any literature on this online.


texts: Solar radiation calculation gives Background processing has encountered serious error and is unable to continue?

texts:
I have tried to calculate solar radiation (whole year with monthly interval) for Portugal from an ESRI grid (27m DEM) in Arcgis10. It seems to work, however it takes much more than a week and in the meantime there was an energy failure. I use ArcToolbox/Spatial Analyst Tools/Area Solar Radiation.

I have cut the dem so as to have only the south of Portugal in the hope that the processing would be faster.
However, ArcGIs 10 crashes after a few minutes and I get the error:
"Background processing has encountered a serious error and is unable to continue. Contact ESRI".
I have also tried in Arcgis 9.2 and I get the same message.

It simply seems not to like the cut dem.


texts: Calculate proportion of study area covered by image on Google Earth Engine using a pixel count

texts:
I want to calculate the proportion of a study area that is covered by (non null) pixels within an image. I have seen examples that do similar counts (here, here, and here), and followed code from here, but it doesn't seem to give the correct answer.

// get aoi feature
var aoi_ext = ee.Geometry.Polygon(
  [[-3.0,53.0],
  [-2.5,53.0],
  [-2.5,53.5],
  [-3.0,53.5],
  [-3.0,53.0]]
  );

// Get image collection from Sentinel 2
var collection = ee.ImageCollection("COPERNICUS/S2_SR")
  .filterBounds(aoi_ext) // just images intersecting with this
  .filterDate('2017-05-01', '2018-06-01') // %Y-%m-%d
  .filterMetadata('CLOUDY_PIXEL_PERCENTAGE', 'less_than', 80)
  .select(['B2', 'B3', 'B4', 'B5', 'QA60'])
  .map(function(image) { return image.clip(aoi_ext); }) // clip here to mask extent
  ;

print('no. images', collection.size());

// Look at first image
var img1 = ee.Image(collection.first());
print('image 1', img1);

// Display image
Map.addLayer(img1, {bands:['B2'], min: 0, max: 3000}, 'image 1');
Map.addLayer(aoi_ext, {}, 'aoi', true, 0.4);
Map.centerObject(aoi_ext);

// calculate number of all pixels in aoi

// get an image of aoi
var aoi_img = ee.Image(1).clip(aoi_ext);

// count pixels in aoi image
var totPixels = ee.Number(aoi_img.reduceRegion({
    reducer: ee.Reducer.count(),
    scale: 10,
    maxPixels: 999999999,
  }).values().get(0));

// Count the non zero/null pixels in the image within the aoi
  var actPixels = ee.Number(img1.select('B2').reduceRegion({
    reducer: ee.Reducer.count(),
    scale: 10,
    geometry: aoi_ext, // need it here
    maxPixels: 999999999,
  }).values().get(0));

  // calculate the perc of cover
var pcPix = actPixels.divide(totPixels).multiply(100);

print('pixels in image:', actPixels, 'pixels in aoi', totPixels);

print('% cover', pcPix);

Looking at the display, I would estimate that about 15% was covered. With other images, it also clearly does not do the calculation I expect. I also tried masking the image with the result from a .gte() call, but it gives the same result.


texts: Consequences of projecting in different resolution rasters

texts: I have used 2.5 resolution enviromental rasters to build a model using ENMeval. Which are the consequences of projecting (ENMeval::maxnet.predictRaster function) a choosen model in the same area in a different time using rasters with a finer resoltion (0.5)?


texts: Minidump when add layer from arcgis server to QGIS

texts:
I am trying to add ArcGIS server to QGIS 2.18.4 and load the file. The file is working fine; unfortunately when I right click  the layer and save it. It always pops up the info like this:

ArcGIS Server: http://services1.arcgis.com/7uJv7I3kgh2y7Pe0/arcgis/rest/services/CGP_Vector_Data/FeatureServer
Please help me. The file is really important; it is about Cambodian Genocide Project - Vector Datasets


texts: Using polygon (simulating annotation) shapefile in ArcGIS Desktop?

texts: I received some shapefiles to create a map, and included is an 'annotation' shapefile, which contains all of the labels for the map as well as the label properties (FontName, FontSize, Angle, etc). However, I cannot figure out how to get ArcMap (v10.3) to use these label properties. I've tried googling but keep finding information how to edit attribute feature classes, but not how to use them if provided one.


texts: Layers and variables box does not exist in ArcGIS raster calculator window?

texts:
I have a problem with layers and variables box in raster calculator.

The layers and variables box does not exist in the raster calculator window!

So I cannot add any raster to the expression.

I am using ArcGIS 10.

What should I exactly do to appear this box in the raster calculator?


texts:
I'm using Anaconda to write geographic programs, so I need to use packages like Mapnik.
After installing Mapnik in Anaconda2, it started to error. First about Mapnik itself and after do some actions now it's reached to this error:

from _mapnik import *

ImportError: DLL load failed: The specified module could not be found.

I installed it with pip command in Anaconda command prompt with some minor errors.

My system: Windows 8.1 64 bit, Anaconda 2, Python 2.7, Mapnik 2.2.0


texts: Map tip display text in QGIS 2.16: pictures not showing up anymore!

texts:
I've been using the great function of QGIS: "map tips". It allows to include html-formatted text (and pictures) in order to popup a window by hovering features.
I use map tips for a very convenient visualization of georeferenced pictures, as I presented once on digital-geography blog

But sadly I cannot make it woking anymore since (?) few weeks, I think since I updated QGIS to 2.16.1 (and later 2.16.2)!
I'm always using the same code as before:

[%CONCAT('')%]

(I know it can be written in an other way but this was working before...)

Now the frame popping up but there's just no picture

Is that a consequence of the map tips improvements of QGIS 2.16? Is there a new syntax I'm missing?
Or I might have something going wrong on my comp?

Anyone sharing the issue? Any ... tip?

Note that including an Iframe link works, I tried the code proposed by mbernasocchi answering to the question "How to view a video using map-tip QGIS 2.16" and it works great.

I'm working under Kubuntu 14.04
kdelibs: 4.13.3
Qt: 4.8.6
Core: 4.2.0-42-generic
System: 32 bit


texts: What are the implications of changing the AutoCommitInterval on file geodatabase inserts?

texts:
All,

I was wondering if anyone has any advice or "tales from the dark side" about changing the AutoCommitInterval property of the ITransactionsOptions interface? It's the sort of thing I generally leave well alone!

I am developing some code that populates dictionaries with a lot of information. The dictionary key is an integer and the item is an ArrayList with potentially several thousand entries and I can have many thousands of key/item entries in my dictionary. Ultimately I want to write the lot to a File Geodatabase Table. I was hitting the out of memory exception so a solution was to periodically write the contents of the dictionary to the table, clear out the dictionary and continue in my loop. This works but the process of writing the dictionary data to the table is quite slow (as it's writing millions of rows) and I was looking for ways to improve performance.

My code is using an insert cursor with row buffering and I believe that section of code is as optimal as I can get it, so I was looking at the best practice page on the ESRI website when I picked up on the idea of changing the Auto Commit Interval. I've never tinkered around with that before and I was wondering if people had any advice, it looks like I can set that to zero and do the commit right at the end, is this advisable, does it actually improve write performance?

Thanks

Duncan


texts: How to return zipcodes that are within a shapefile on QGIS

texts: Really new to QGIS and I have made two shapefile layers. One is a shapefile layer of all the zipcodes in the U.S and another is a random shape. How can i get all the zipcodes that are within the boundaries of the random shape and exported into a csv or excel?


texts:
I have this shapefile:

I would like to see n maps with only 1 point for each map. I try with DDT script and it returns me n maps but with all points in each. The question is: Is it possible to do an iterate definition query based on the Field (FID)?  this field is a numerical field so I think it would be possible to do a for loop setting first FID=0, then FID=1.etc.. but I don't know how I can do it.


texts: Publishing OSM data in GeoServer that has been imported into PostGIS

texts:
I'm trying to publish data on GeoServer.

I'm using Postgres/PostGIS and I've used osm2pgsql to load the data into the database.

I've configured a store correctly (I can see the tables from the database listed when I add a new layer and choose the store).

However when I go to add a new layer, what I see is different to the manual at geoserver (refer Publishing a PostGIS Table). The point that is different is the "Create a Layer" section, step 3 and 4. On step 3 it states the following:

  From the New Layer chooser drop-down menu, select cite:nyc_buidings.

I choose the data store and then get the list of layer names in the form:

The above screen shot is different to the doco for point 4. The doco for point 4 is as follows:

While I expect the names to be different, the problem is that none of the names are selectable. The only text that is selectable is Publish. It's slightly confusing, partly because I've not been able to find any example specific to what I'm trying to do, so I've had a lot of missteps along the way and have learnt the hard way not to make any presumptions.

My question is: is the Publish action against each table the same as the selectable text in the doco?

My concern is that I don't want to accidentally publish all the data in a table.


texts: Publishing Overwrites Edit Tracking Fields

texts: Is there a way to publish edit tracking enabled data from ArcMap (10.3.1) to a AGOL hosted service without having the edit tracking fields automatically overwritten with the time and user who published it? Looking to maintain the fields as they are in ArcMap, the data originally obtained via Collector.


texts: Destop application using arcobjects library

texts:
I develop a destop application with following environment -

1) Java jdk version 6 update 25 (for 32bit ).

2) Java Arcobjects Library.

3) Window Xp.

Its working smoothly on 32 bit Computer , my problem is i need to provide this application to a team member who works on .net with following configration -

1)Java jdk version 6 update 25 ( for 64 bit ).

2) .Net Arcobjects Library.

3) Window 7.

What are the things i need to do to make my application work on that computer.


texts: ArcGIS online Hosted Feature Service not opening in ArcGIS Desktop

texts: I have an ArcGIS Online hosted feature service with about 17,000 features, and it will not open in ArcGIS Desktop 10.2.2 with an Advanced License. I have increased the Maximum features in the REST service end point and I still get the same results. Is there some other method to configure this so that it will open, or is this more of an issue with a limitation of ArcGIS online? Its probably helpful to note that I can get this same service to load into web maps, and Collector for ArcGIS just fine.


texts: bandStatistics becoming slow when specifying extent?

texts:
I'm referring to QGIS Scripting problem updating contrast enhancements for raster layers using bandStatistics

The proposed scripts works fine; however I want to determine the statistics only on that part of the raster that is visible in the canvas. I therefore specified the extent in the bandStatistics command:

curExtent = iface.mapCanvas().extent()
myRasterBandStats = layer.dataProvider().bandStatistics(myBand, QgsRasterBandStats.Mean | QgsRasterBandStats.StdDev, curExtent)

Unfortunately this significantly slows down the bandStatistics command, which becomes much slower than when loading the min/max in the QGIS interface (properties of the layer => style)


texts:
I have UAS imagery (jpgs) that I have generated .jpw files for. The .jpw files are correct, however now I want any easy way to assign a projection to my images. I know you can do it in ArcMap using the Define Projection and Project Raster tools but I was hoping to just be able to generate a standard .prj file that ArcMap will read automatically when I import my jpg like it does with the .jpw file. Is that possible?
I generated a .prj file from an online source: http://spatialreference.org/ref/epsg/32603/, which looks like :

I made sure the name of the image is the same name as the .prj file.
GlobalMapper will read the .prj file but ArcMap will not, is there a reason for this?


texts: What is the difference between ArcGIS Viewer for Flex and ArcGIS Viewer for Silverlight?

texts: On the ArcGIS resources site, the descriptions and most of the functionality sounds pretty much the same. What are the benefits and downsides of using one over the other?


texts:
I need to create a big number of maps in QGIS for a breeding bird monitoring scheme. The Bing Aerial maps would be perfect as underlying layer as they have sufficient resolution and very nice illumination.

When it comes to printing using OpenLayersPlugin and QuickMapService I get the well known problems. With QuickMapService I am almost there but I cannot rotate maps in the print composer (they get distorted). However, I need to rotate most maps to get the maximum extent of the areas on the print.

So my question: Is there any way to get Bing Maps Aerial into QGIS in a way that I can use it for printing? I have tried a lot already and other free satelite images do not have the same quality and resolution.


texts:
Probably a basic issue, but still something that irks me and I can't find an answer online.
I want to change the default folder for saving new shapes/processing outputs from "last used folder" to "project folder" or "something in relation to project folder" - is this possible? If so, how can I achieve this?


texts: Creating materialized view from ArcSDE layer

texts:
In the past I've used materialized views in Oracle to replicate non-spatial data from one database to another. I'd like to do the same thing with an ArcSDE feature class, but I'm wondering how that will work at the ArcSDE level. I've tried creating the view with a simple CREATE MATERIALIZED VIEW statement (no ArcSDE involved) and then registering it with the geodatabase, but I can't get the data to display in ArcMap.

In general I would prefer to create the table within ArcSDE (i.e. in ArcCatalog) and then create the materialized view on top of that. I know there's a syntax for creating views ON PREBUILT TABLE, but I'm getting an error ORA-32304: materialized views with user-defined types cannot use prebuilt table. I'm guessing that's in reference to the geometry column which is ST_GEOMETRY. Does anyone know of a better way to make a materialized view from a feature class?


texts: Unable to view or change ranges in symbology tab (Quantities)

texts:
Using ArcMap 10.5, I joined data to my shapefile, when I go to the symbology tab, then quantities and select the field value, not values appear in the range and I am unable to modify or select the class number.

Here is a screen shot


texts: How to merge dbf files(zonal statistics as a table) in GIS environment.?

texts:
I am not very savvy at using Python. Actually I have around 1000 output files from using the tool zonal statistics as table in ArcGIS. The names of the files are jan_60, feb_60......dec_13. These all lie in one folder. Each of these files contain an ID and Name field which are my identifiers. And each file has got a column of interest called Mean. So what I want is that all the files be merged, using ID and name field. In the final table, I want one column added having the mean values from each of the individual tables. Note that I want the name of the new columns as the original file name. I am trying to give you a visualization below:

original files I have:

ID           Name            Mean

output file needed:

ID           Name             jan_60        feb_60         march_60

Can someone help me out, if any of you have had a similar task. It would be great if I can have a script or something.
Thanks a lot.

output file needed

folder containing individual files

one of the individual


texts:
Has anyone figured out an easy way to convert Jason-3 data in NetCDF format to a GIS format (raster, shapefile, etc.) so it can be viewed in ArcGIS Desktop?

Jason-3 data is available for free in NetCDF format, but despite several attempts I have been unable to convert the lat and long data to a mappable format.


texts: Add point to center of polygon graphic in the Esri javascript api

texts: I’m using the ESRI JavaScript API 3.3 to develop an application.  I am selecting parcels and adding a graphic for the selected polygon.  What I would like to do is add a point marker to the center of the polygon graphic after the graphic is added.  Does anyone know of a sample I could take a look at, or know how to quickly implement this functionality?   I feel like I’m missing something simple.


texts: Blinking QGIS raster layer with zoom out and pan

texts:
I am using QGIS dev lib 3.10 with Ubuntu 18.04. Once I try to zoom out or pan the raster layer always blinks. How can I fix that? I already tried to update the render time and cache setting in my source code as follow:
QgsSettings settings;
canvas->enableAntiAliasing( true );
canvas->setWheelFactor( 2 );
canvas->setCachingEnabled( true );
canvas->setParallelRenderingEnabled( true );
canvas->setMapUpdateInterval( 500);

I dont have this issue when I zoom In.


texts: Loading and displaying NDS (Navigation Data Standard // SQLlite)?

texts:
On QGIS 3.4 (Windows), I would like to load and display NDS (Navigation Data Standard) data (attributes and geometry). I succeed in loading NDS data sample from openlanemodel.

Via the QGIS DB manager, we can see the content of the DB/table. We can see a column called "ndsdata" (I guess containing geometry).

But I get an error message when I try to load the data as a sqlite db. Via the QGIS explorator panel, we can see the error message:

  "Impossible de check metadata".

For information, up to now, I have installed sqlite, but not spatialite.

Is there a way to display NDS data's geometry with QGIS (or another open source application)?


texts: How to update map canvas in QGIS 3.4 Print Composer

texts:
I'm using QGIS 3.4. Print Composer. I created a print composer template with a map canvas. I want the map extend to be refreshed every time I open the template and also update it manually with a button.
How do I proceed?
Kind Regards,
Larissa


texts: QGIS 3 - Shortest path layer to layer, not point!

texts:
I'm trying to build a model that will calculate the shortest path from several origins to one destination.

So I have 3 georeferenced vector layers:

A line road network
A point layer containing terminals
A point layer containing a single point representing a mill

My model does a few things to achieve these layers, but I think that is irrelevant for this question.

Now I want to calculate the shortest path from each of the terminals to the mill. If I run the tool outside of the processing modeller its easy peasy, just choosing from the terminal layer to a point I click with the mouse on the map using the tool "Shortests Path (layer to point)". The thing is I want to automate this and in the model tool there is a box for coordinates instead of the mouse clicking part. I want QGIS to read the coordinates from the mill point in the vector layer and insert these in the coordinate box.


texts: Extract a single image by timestamp from GFS image collection in Google Earth Engine

texts:
I'm trying to get one image, not a series of images, from GFS weather forecast data in Google Earth Engine.  This is what I am trying, or similar variations of it.

// date that we want to focus on
var dataset = ee.ImageCollection('NOAA/GFS0P25')
.filter(ee.Filter.eq('creation_time',ee.Date('2019-12-15').update(2019,12,15,0,0,0).millis()));
var temperatureAboveGround = dataset.select('temperature_2m_above_ground');

var visParams = {min: -40.0, max: 35.0, palette: ['blue', 'purple', 'cyan', 'green', 'yellow', 'red'],};
Map.setCenter(71.72, 52.48, 0);
Map.addLayer(temperatureAboveGround, visParams, 'Temperature Above Ground');

This produces a row of what seems to be the same image at the bottom of the API.  How do I extract the map for one time stamp, for one variable, only?


texts: Why does my rainbow airplane stripes appearing on Sentinel 2 image?

texts:
I have downloaded a Sentinel-2 scene and there are some interesting rainbow like stripes trailing an airplane. This is an rgb image but the stripes are also visible on the other bands. You can tell it is an airplane stripe because there is a very clear airplane symbol in front of the stripes. What interests me is that there are more than two bands visible, although the airplane should only have two trailing stripes. So the airplane is in different positions on different bands.

Any idea how it is possible these airplane stripes could have been formed?


texts: Consume a GeoJSON service from GeoServer in QGIS 3.4?

texts:
It seems there has been an update to the way QGIS consumes GeoJSON files in version 3.4x

At 2.18.x, a WFS service with GeoJSON output from GeoServer such as:

https://server.org/geoserver/datastore/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=datastore:dps_boundary&maxFeatures=1000&outputFormat=application%2Fjson

...can be added simply as a 'vector > file' or 'protocol > geojson'.

However, at v. 3.4.x, the GeoJSON doesn't work by either a file or a protocol (there are two types of GeoJSON in this list, neither work), with the error "Invalid Layer"

Has anyone else noticed this change or have any advice as to how to work with GeoServer WFS services with GeoJSON output?


texts: ArcGIS 10.5 Python script integration to 'script/tool' not outputting data

texts:
In ArcGIS 10.5 I have a python script that works well in the python window, however, I am trying to integrate it in a tool, mainly to make use of the arcpy.GetParametersAsText() input feature for the input and output file names/paths.

The basic intent of the script is to output a number of attribute fields from a particular feature class into a very specific format for a very specific text file (.PTS survey line file for WinFrog if anyone knows it).

Initially, it was failing due to a Unicode error when trying to .write() to the file object created with .open(). As you can see below I have tried numerous things to ensure that the file object 'outfile' is indeed a regular file object, and not Unicode, that is only defined by a path in the from of a string.

Anyway, now the script will run and complete 'successfully', creating the file in the directory indicated in the tool/script input. But now it is not populated with any data! Again the script works every time when running from the python window. Any help would be awesome, even if its just identifying the problem. Fully understand this is user error and that I'm likely overlooking something simple.

Script below, sorry for any display issues, new to Stack Overflow.

import arcp

fcpath = str(arcpy.GetParameterAsText(0))
fc = "r\"" + fcpath + "\""
fields = ["LineName", "Lat_SOL" , "Lon_SOL", "Lat_EOL", "Lon_EOL", "Northing_SOL", "Easting_SOL", "Northing_EOL", "Easting_EOL", "Shape_Length"]
filelocation = str(arcpy.GetParameterAsText(1))
outfile = open("r\"" + filelocation + ".PTS", 'w')

with arcpy.da.SearchCursor(fc, fields) as cursor:
    for row in cursor:
        r1 = ("0,{0},0,0.000,0.000,1,2,65280,0,0.200,0,0,1.000,1,0\n".format(row[0]))
        r2 = ("1,{0},{1},0.0m,0.0m,{2},{3},0.000\n".format(row[1], row[2], row[5], row[6]))
        r3 = ("1,{0},{1},0.0m,0.0m,{2},{3},{4}\n".format(row[3], row[4], row[7], row[8], row[9]))

        outfile.write(r1 + r2 + r3)

Update per MikeWatt's suggestions, still not working.

import arcpy, os

fcpath = arcpy.GetParameterAsText(0)
fields = ["LineName", "Lat_SOL" , "Lon_SOL", "Lat_EOL", "Lon_EOL", "Northing_SOL", "Easting_SOL", "Northing_EOL", "Easting_EOL", "Shape_Length"]
outfile = open(arcpy.GetParameterAsText(1) + ".PTS", 'w')

with arcpy.da.SearchCursor(fc, fields) as cursor:
    for row in cursor:
        r1 = ("0,{0},0,0.000,0.000,1,2,65280,0,0.200,0,0,1.000,1,0\n".format(row[0]))
        r2 = ("1,{0},{1},0.0m,0.0m,{2},{3},0.000\n".format(row[1], row[2], row[5], row[6]))
        r3 = ("1,{0},{1},0.0m,0.0m,{2},{3},{4}\n".format(row[3], row[4], row[7], row[8], row[9]))

        outfile.write(r1 + r2 + r3)

outfile.close()

latest attempt to get anything into the output file. Still nothing. Very strange again as this script works no worries when copied straight into the ArcGIS python window.

import arcpy

fcpath = arcpy.GetParameterAsText(0)
fields = ["LineName", "Lat_SOL" , "Lon_SOL", "Lat_EOL", "Lon_EOL", "Northing_SOL", "Easting_SOL", "Northing_EOL", "Easting_EOL", "Shape_Length"]
outfile = open(arcpy.GetParameterAsText(1) + ".PTS", 'w')

outfile.write("TEST\n" + "Test\n" + "TEST\n")

outfile.close()

The attached ScreenGrab is the Parameters window of the 'Add Script' tool. I could be messing this aspect of it up as well.


texts: Is it possible to create DEMs from ORT format in QGIS?

texts: I recently requested DEMs for my area of interest.  The data has however arrived in ORT file format - how do I create DEMs from this data in QGIS?  When I open the files in Notepad there are three columns which respectively contain x and y co-ordinates in m (Hartebeeshoek Lo31) and a third column containing the height value.


texts:
I'm working on a collection of points on the map, each comes with a bunch of properties. I succeeded using a customized XSL template to show the information when I click on any point. And now what I wanna achieve is to add a "next" & "previous" button in the window, which navigates to the information of next adjacent point. I don't know if this idea is possible at all, or do I have to write a add-in for this function?

Any help would be appreciated.


texts: Draw (extend) a straight line from points

texts:
Is there any existent tool or workflow to generate a straight line in ArcMap?
I have a lot of point that represent plant counting (one point per plant) and I need to generate e line that represents the row lines of the crop. The points are not generated in the same order of the line, and there is no field in the attribute table to use as a reference to draw a line.
Our ideia is to draw the first segment of each line and try to use some tool that test all the closest points and then draw the next segment based on the angle variation of the two segments (The closest to 0 is the best choice).

Does anybody have an idea?


texts: How to extract attributes from a vector layer within areas bound by polygons that are defined in another vector layer, in QGIS 3.1?

texts:
I have a few polygons defined in a vector layer (Layer A). I have another vector layer (Layer B) that contains two attributes (slope and elevation).
How can I extract the slope and elevation values in B that are bound by areas in A?


texts:
I have uploaded several benthic habitat raster datasets into my Assets folder in Google Earth Engine to share in an app. The values are 1-13 and represent different habitat classes:
 1 'Reef Crest' (FF0000)
 2 'Reef Fore' (FFBEBE)
 3 'Reef Back' (FFD37F)
 4 'Coral/Algae' (FFAA00),
 5 'Spur and Groove' (FF73DF)
 6 'Hardbottom Sparse Algae' (ABCD66)
 7 'Hardbottom Dense Algae' (66CDAB)
 8 'Muddy Bottom' (A87000)
 9 'Dredged' (D7C29E)
 10 'Sand' (FFFFBE)
 11 'Boulders and Rocks' (AFF2FF)
 12 'Seagrass Sparse' (38A800)
 13 'Seagrass Dense' (267300)

When I symbolize the layer, it's averaging pixels in the symbology when zoomed out. For example, pixels between Sand and Seagrass Sparse are appearing as 'boulders and rocks'.
var palette_bh = ['FF0000','FFBEBE','FFD37F','FFAA00','FF73DF','ABCD66','66CDAB','A87000','D7C29E','FFFFBE','AFF2FF','38A800','267300'];
var bhVis = benhab.visualize({bands: 'b1', min: 1, max: 13, palette: palette_bh});

I've also generated pie charts showing the amount of habitat class per country, and this error is also impacting those calculations.
Is there a way to symbolize this differently to eliminate this problem?


texts: How to stop features to redraw unwillingly in OpenLayers

texts:
I have a problem where when editing features from a wfs vector layer. After some changes are made to the geometry, the feature redraws itself and the changes are lost.

Usually the problem occurs more often if a feature is huge and has many vertices. Also if the user pans and zooms in/out a lot.

My guess is that the browser (FireFox 18) "looses the cache" or something and therefore does a new request to the server and the feature is rendered and the changes are lost.

Is there a way to solve this or is the solution to "save often"?

Br

Mike


texts: Filling column with values at certain condition in QGIS

texts:
I have blocks of the road network and these blocks are divided every 200m.
I want to name them based on the ID_Sufix number. For example, if the stretch road ID is 10001 and this contains 26 small blocks, I want to 10001_1,1001_2.....10001_26. So like this for every set of blocks, it needed to be done. How can I achieve it?


texts: Use DEM elevation attributes in vector polygon?

texts:
I am modeling glacier retreat scatching polygons on DEM surface trying to come out with 3D scatch.

Is it possible to adjust "height" of polygon to follow elevation of DEM surface (eg. glacier height is 70 meters and it will be the same all across the terrain) ?

So far It looks like this, not following terrain


texts: Grab/Index the raster bands before and after a unique band for each pixel (depth-wise) in a raster stack

texts:
I'm working with a time series stack of 28 raster bands. Each band is an image for a specific date, spanning all of the year 2020, and they are stacked in order. The stack (change_point_raster) is in the form of a 3D array where the first dimension is the date band. I also have an associated raster (change_point_index) that is just one band, where each pixel represents the number of the band in change_point_raster where there is detected change. I want to do some statistics before and after the change occurred for each pixel. To do this, I want to get the bands before and after the change band, then find the ratio between the two band values for each pixel in the stack. I'm doing this in Python. I'm kind of a beginner in python, so I'm unsure what to do, but here is a code snippet of what I have:
#Identify change date (or band number) and subset/index time series stack by before change and after change.

cpr_before = next(x for x, val in enumerate(change_point_raster)
                                  if val < change_point_index)

cpr_after = next(x for x, val in enumerate(change_point_raster)
                                  if val > change_point_index)

I'm getting an error that says "ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()". It seems like the problem is that I have a raster stack instead of just one raster, but I'm unsure how to solve this with a loop, or any other method.


texts: Figure out location of city direction sign in image - friday fun project

texts: So I came across this image and wondered where it could be located given the directions and distances.  But I started to realise that the sign is all wrong.  I'm guessing the Greek alphabet one is Cyprus, so 1000km from there would be maybe Bulgaria but then Cuba and New York are pointing the wrong way, and why is Athens somehow between those two.  Looking at Zambia and Ethiopia and imagining them pointing south then New York cant be further south than Cuba.  I tried a quick QGIS analysis putting distance buffers on New York, Cuba and Cyprus but it doesn't work. Can anyone figure it out?


texts: OpenLayers: WFS request to GeoServer to retrieve "name" & "featureNS"

texts:
Using WFSGetCapabilities I sent a GetCapabilities request to GeoServer. From the result of WFSGetCapabilities().read(), I can loop each featureType and retrieve some basic info (e.g., name, title, featureNS, srsName). Then in order to retrieve the "geometryName" property of this feature type, (which is needed to load this featureLayer into map), I sent a DescribeFeatureType request to server by attaching "&TypeName="feature.name. However, I found that the full name of the feature is truncated, i.e., feature.name is the feature's name without its namespace prefix. However, this namespace prefix is needed in DescribeFeatureType request URL.

My question is:

How can I get the full name (with namespace prefix) in order to execute this DescribeFeatureType request and retrieve the geometryName property?


texts: Merge or Intersect Shapefiles based on a Field Attribute

texts:
I have three shapefiles of building footprints for a city. Each shapefile has a field called "Status" with attributes 1, 2, or 3.
For example:

Shapefile A, Polygon 1 = 1
Shapefile B, Polygon 1 = 2
Shapefile C, Polygon 1 = 1

Is there a way to merge the three shapefiles together based on the field attributes, so that Shp A and Shp C will be one, but not include Shp B?

In the end I only want one shapefile (let's call this Shp D) where only the polygons that has the same attribute across Shp A, B, and C to be included. In the example above, since Shp B Polygon 1 doesn't equal the same as Shp A Polygon 1 and Shp C Polygon 1, I do not want it in the new shapefile (Shp D).


texts: How to join a layer and a table, on-the-fly, in the ArcGIS Server JS API

texts:
I have a polygon feature layer and a table, both stored in ArcGIS Online. Is it possible to join them on-the-fly in the ArcGIS Server JS API?

For example, here are some sample ArcGIS Server services for:

a US States polygon layer
a census values table for each state

Is it possible to join the layer and the table, and therefore to symbolize the polygons using the table's values?


texts: How to move an endpoint of a polyline feature to specific coordinates

texts:
What looked like a simple task has kept me busy for a while now. I would like to snap the endpoint of a polyline feature to a known point of which I know the coordinates.

My first try was the following (within an edit operation):

polyline = feature.ShapeCopy as IPolyline;
polyline.ToPoint.PutCoords(_connectionPoint.X, _connectionPoint.Y);
feature.Shape = polyline;
feature.Store();

the new coordinates however would never be saved at the feature.

I also looked at this example:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_modify_a_specific_vertex_of_a_polyline/000100000023000000/

but I am a bit confused about whether I really need a HitTest in my case.


texts: Creating Layer from Selection in ArcGIS Online

texts:
I am trying to create a layer from a selection using a layer I have hosted in ArcGIS Online. I have run into 2 issues: I'm not able to select multiple features on the map (only by scrolling thru the attribute table) and I cannot see how to create the new layer.

To select multiple features I have tried holding down the shift and/or control buttons but only the first feature I touch is selected. For example, if I want to use the cursor to select a group of points I seem to be unable.


texts: When SpatialFilter does spatial relationship between base and candidate how it link if one out of many in FME

texts:
I would like to know how this mapping works when SpatialFilter does spatial relationship between bases and candidate. As per "Pass Criteria: Pass Against One Filter. Each address point only needs to fall inside one polygon – not all of them." Lets take consider example if I have base as Parcel shape file and candidate as building centroid. When I am applying SpatialFilter with pass criteria as "Pass Against One Filter" then map one building centroid to one parcel if match to one but if match to more than one like vertically overlapping parcel or stacked parcel. then how its link to one parcel out of those ?
Overlapping means like sandwich layer.


texts:
I have two fields of LU_Name and BETW.

Is there any tool which compares the means of BETW in different groups based on the LU_Name nominal field and reports their significant correlation?


texts: Creating an HTML-style label item in the layout that links to an anchor in the page

texts:
Initial research tells me this might not be possible, but let's try it anyway. In a Layout, I'd like to have an HTML-rendered label near the top of page 1 like:

Jump to table

If I create this, QGIS renders it as a link just fine.

But I'd like it to jump to a label on the second page, like:

Lorem ipsum this is intro text for the table etc.

When I export to PDF, that link doesn't function as I'd expect. Searching for an existing feature request and will log a new one if I can't find an existing one. In the meantime, maybe somebody has done this and can spot my error.


texts: How to prevent map click event esri map js API?

texts:
I have a map and I'm listening a click event like this,

 currentMap.on("click",this.identifyMapFeature.bind(this));

At some extent I want to disable the click event from map, I've tried these 3 methods from esri js API docs,

    this.currentMap.disableMapNavigation();
    this.currentMap.disablePan();
    this.currentMap.disableScrollWheelZoom();

but still click event is firing , is there any method like disableMapClick() to disable map click ?


texts:
I would like to use Virtual Raster but I meet an issue with the alpha white band of one of my 2 rasters merged. In fact the white mask appears over the layer that is under and hide some details.

How can I fix that?


texts:
Copied from my SO question

The problem

Suppose we have two shapefiles that should border seamlessly. Only, they don't. Is there a way to force them to stick to one another without gaps?

The specific case

I have two shapefiles: one for European regions -- REG, the other for the neighbouring countries -- NEI. Both shapefiles are taken from Eurostat repository and should fit together nicely; but there are small gaps. Also, I need to simplify the polygons, and then the gaps become really notable.

The best I can think of

I've tried several approaches but with no success. The only way to achieve the desired result that I see requires following steps:

create a line sf with just the border between my shapefiles;
from this line create a buffer polygon just big enough to cover all gaps;
join and dissolve this buffer to the shapefile for neighbours -- NEI;
clip off the expanded NEI with the REG shapefile.

Obviously, this is a rather clumsy workaround.

Is there a better way to go?

Reproducible example in this gist

A minimal example

# install dev version of ggplot2
devtools::dev_mode()
devtools::install_github("tidyverse/ggplot2")

library(tidyverse)
library(sf)
library(rmapshaper)
library(ggthemes)

# load data
source(file = url("https://gist.githubusercontent.com/ikashnitsky/4b92f6b9f4bcbd8b2190fb0796fd1ec0/raw/1e281b7bb8ec74c9c9989fe50a87b6021ddbad03/minimal-data.R"))

# test how good they fit together
ggplot() +
        geom_sf(data = REG, color = "black", size = .2, fill = NA) +
        geom_sf(data = NEI, color = "red", size = .2, fill = NA)+
        coord_sf(datum = NA)+
        theme_map()

ggsave("test-1.pdf", width = 12, height = 10)

# simplify
REGs <- REG %>% ms_simplify(keep = .5, keep_shapes = TRUE)
NEIs <- NEI %>% ms_simplify(keep = .5, keep_shapes = TRUE)

ggplot() +
        geom_sf(data = REGs, color = "black", size = .2, fill = NA) +
        geom_sf(data = NEIs, color = "red", size = .2, fill = NA)+
        coord_sf(datum = NA)+
        theme_map()

ggsave("test-2.pdf", width = 12, height = 10)


texts: Can we do operations like Geo-referencing and Geo-coding in NoSQL Databses

texts:
I want to generate a map, using some spatial data provider like OSM. I am trying to put in some dynamic data-set on top of the base map. The data size is considerably large enough to be called as BigData. Its taking hours to insert data into PostGIS.
NoSQL Databases are meant to be scalable for humongous data sets. So my query is can i replace my PostGIS database with NoSQL, considering the scale-out factor and the enormous growth of data.

If so which seems best MongoDB, Hbase or Neo4j.


texts:
I've installed Nominatim on CentOS 7 because I want to do some reverse geo-coding.

However, when I try to load the and create a Nominatim database with this command:

./utils/setup.php --osm-file /var/lib/pgsql/indiana-latest.osm.pbf --all --osm2pgsql-cache 4000 2>&1 | tee setup.log

I get the following error:

Create DB
Setup DB
createlang: language "plpgsql" is already installed in database     "nominatim"
CREATE EXTENSION
CREATE EXTENSION
ERROR:  function st_lineinterpolatepoint(geometry, double precision)  already exists in schema "public"
ERROR: pgsql returned with error code (3)
pgsql returned with error code (3)

I've searched the web and can't find any valuable resources to solve my problem.


texts: Rebuilding Indexes in SDE Database throws "Could not get a lock." error

texts:
While trying to do some maintenance on our SDE database but i am always getting a "Could not get a lock." error on the details section of the process.

Do i need to setup something for me to successfully run the index rebuilding tool?

Btw, i am using ArcMap 10.1 to rebuild the indexes.

Thanks.


texts: Creating legend with new data defined symbols functionality in QGIS?

texts:
I have a large geology data set that I need to display using an industry standard set of symbols and colours. The symbols and colours are attributes of the data. I have been using the data defined symbols capability of the dev build of QGIS (code revision b805894) to display the data according to its attributes. This works perfectly in terms of displaying the data correctly in the map window.

The problem arises when I try to create a legend in the composer. The data-defined colours displayed on the map don't pull through to the legend.

Here are some screens shots. The first shows the map window. You can see the problem manifesting in the Layers box on the left. The symbols are all coloured black.

The second screen shot shows the composer window with a legend.


texts: This operation is not allowed while editing error

texts:
When I tried to delete a feature, I got :This operation is not allowed while editing" error when I wanted to refresh version.

The related code is:

'Start Editing Operation
        lpWorkSpaceEdit.StartEditing(True)

        Do Until lpFeature Is Nothing
            Call CheckCPStatus(lpFeature, lbIsCPDead, lbIsCPNull)

            lpVerFC = lpObjSDEUtils.GetFeatureClass(lpCreatWS, lsLayerName)
            If Not lpVerFC.GetFeature(lpFeature.OID) Is Nothing Then
                lpVerFeat = lpVerFC.GetFeature(lpFeature.OID)
                lpVerFeat.Delete()

            End If

            'Iterate through the next feature
            lpFeature = lpFeatCursor.NextFeature
        Loop

        'Chech if the Created version has parent
        If lpCreatVer.HasParent Then
            lsParentVersionName = lpCreatVer.VersionInfo.Parent.VersionName
        Else
            MsgBox("You can only reconcile a version that has a parent.", MsgBoxStyle.Information, "App")
        End If

        'Get the SDE Default's Latest Version
        'lpVersionEdit.Reconcile(lsParentVersionName)
        lpCreatVer.RefreshVersion()

        lpVersionEdit.Reconcile(lsParentVersionName)

        If lpVersionEdit.CanPost Then
            lpVersionEdit.Post(lsParentVersionName)
        End If

        'StopEditing Operation
        lpWorkSpaceEdit.StopEditing(True)

        lpVersionEdit.RefreshVersion()

Is there anything wrong with my code? How can I delete a feature properly?


texts: Is it possible to see polyline as route or track data on GPS?

texts:
I would like to see polyline on GPS.
First, I try to convert polyline to GPX.
I uploaded GPX on GPS.
SO far, I could not see the line on GPS.

First of all,is it possible to see polyline as route or track data on GPS?


texts: Reverse geocoding using OSM data imported into PostGIS

texts:
I'm trying to reverse geocode some points using an OSM import into PostGIS. I imported the OSM data (for Denmark so all addresses should be avaialable) into PostGIS using osm2pgsql enabling "addr:street" and "addr:housenumber". All the addresses should now be in the planet_osm_point table.
My points table that I want to reverse geocode is created using

update tower set the_geom = st_transform(st_setsrid(st_makepoint(xcoord,
 ycoord),4326),4326)

When trying to use the following code I get some very weird results where as far as I can see the addresses I end up with are either random but still within the general area or maybe displaced by up to a few km:

update tower set nearest_number = t."addr:housenumber", nearest_street = t."addr:street"
from
(
select "addr:housenumber", "addr:street", pk from planet_osm_point, tower
where st_dwithin(st_transform(planet_osm_point.way, 4326), tower.the_geom, 0.01)
order by st_transform(planet_osm_point.way,4326) <-> tower.the_geom ASC
) t
where tower.pk=t.pk;

In the attached image I have labeled the points with the result of the reverse geocoding, and as an example I have highligthed a point which has gotten an address that is located longer to the north, somewhat beyond the boundary.

Anyone have any ideas as to what I'm doing wrong?


texts: Creating Runtime content programmatically with ArcObjects?

texts:
I'm exploring different options for creating an offline mobile application with Esri's technologies. The option that fits my needs the best is to use the ArcGIS Runtime SDK with offline maps created with ArcGIS for Desktop(In ArcMap : File->ShareAs->Runtime Content).

The next step is now to automate the Runtime Content creation. Is there a way, using ArcObjects, to create Runtime content programmatically?


texts: Making US Topo-like PDFs using ArcGIS Desktop and TerraGo Publisher?

texts:
I have tried making a GeoPDF like the one from US Topo PDFS using ArcGIS and TerraGo Publisher. They are nothing alike.

Does anyone know how they are made?

I am specifically looking for a zooming capability of the PDF and the ability to resolve spatially especially when it comes to cluttered datasets which the US topo maps do. Something similar to what happens in GIS software when you zoom in to a cluttered (lots of data in one point) dataset.

I have point, polygon and raster datasets in the same layer that I need to export to a US topo-like pdf.


texts: Projecting GeoJSON polygon object in python to calculate area

texts: I have a script, written in python, that does many calculations - but one set of calculations hinges on determining the area of a polygon that I read in, in GeoJSON format. I can convert this object to a shaply object (package), a WKT object, a dictionary, etc., none of allows me to directly determine the projected area.  Converting to a shapely object allows me to know the GCS area, but shapely doesn't have tools for projecting objects. Is there a package or module to project this object in python, using the arguments I supply (the GCS it's in, the PCS I hope to project it to) so that I can determine the area?


texts: How to get the name of the geometry column in QGIS?

texts: Depending on the table I'm working on, the geometry column does not always have the same name, for example in my data it is called sometimes "the_geom", "geometry", or even "geometrie". How can I get the name of this attribute in QGIS?


texts: What's wrong with this VB Script code for the field calculator in ArcGIS 10?

texts:
I am trying to use one field's contents ([Condition]) as a condition for populating another field ([Intact]). I try to run the following code in the Field Calculator, but it never works (and is not very helpful to help me understand why, giving me the "999999" error code).

This is what went into the "Pre-Logic Script Code" box:

    Dim x
    If [Condition] = "Very good" Then
      x = 1
    elseif [Condition] = "Reasonably good" Then
      x = 1
    elseif [Condition] = "Poor" Then
      x = 0
    elseif [Condition] = "Renovated" Then
      x = 1
    elseif [Condition] = "Very poor" Then
      x = 0
    elseif [Condition] = "Good" Then
      x = 1
    else
      x = 0
    end if

And simply x went into the "Intact =" box.

Is there any idea why this code does not work? Again, I'm trying to populate the "Intact" field with 0s or 1s depending on the value of the "Condition" field in the same feature class.


texts: Setting coordinate system to many rasters in ModelBuilder?

texts:
I have one digital elevation model and i need to divide it in many parts and set
Lcoordinate system (UTM zones...)  for every part.

I have tried to make a model but i do not know, how to import the atribute with EPSG code(value) to function project raster like output coordinate system.


texts: Comparing features in GIS interface with Google Maps/Bing Basemaps - Which Co-ordinate system to use?

texts:
I want to compare some Geographic features in my data with Google maps in ArcGIS platform using a third party application.

But I prefer the output to be in Local UTM cordinates.

What is the best practice?

(a) Use the WGS_1984_Web_Mercator_Auxiliary_Sphere ( WKID: 3857) for my data; or

(b) Use local UTM cordinate system for editing, and do a transformation, in case editing throws errors?


texts:
Here is my scenario:

I am trying to use Union to combine the land and mangrove shapefiles in QGIS and to compute for the areas of each individual geometry.

What I did:

First, I cleaned them. Upon checking the attributes, it appeared that there are duplicate features in the mangrove.shp,so I used 'Delete duplicate geometries' in the Processing Toolbox. I used Union to combine the land and mangrove shps,and again, some of the geometries were duplicated, so I repeated the process of deleting the duplicates.

Is it already ensured that the individual features have their individual attributes, or do I still have to use Multiple Parts to Single Parts?


texts: How to calculate albedo using Sentinel 2?

texts:
Альбедо Sentinel 2, где найти эти значения и как посчитать в случае необходимости, что на что нужно умножать или делить, я новичок в этом вопросе.

(Machine translation)
Albedo Sentinel 2, where to find these values and how to calculate, if necessary, what to multiply or divide by, I'm new to this question.


texts: Modelbuilder not recognizing table output and throws Error 000732

texts:
I am building a tool in ArcGIS Pro Modelbuilder (Pro version 2.2.1) that includes making a drop down list for user input based on the information contained in a domain of a feature class. The three steps are GetWorkspace, Domain to Table, and Choose Peril, as shown here:

GetWorkspace is a brief python script tool consisting of the following lines of code:

# Import system modules
import arcpy

# Set the parameters
InputFeatureClass = arcpy.GetParameterAsText(0)

# Get the full path of the feature class and extract the workspace
fullpath = arcpy.Describe(InputFeatureClass).path
workspace = fullpath.split(".sde")[0] + ".sde"

# set the output variable to be the workspace name
arcpy.SetParameter(1, workspace)

Domain to Table is a standard ArcPro tool, and Choose Peril is the example script described in this post on how to generate a choice list from a field. I have this same tool running elsewhere in the model with no issues, although in that location it does take a feature class instead of table for the table view input parameter.

When I run each step manually one at a time in Modelbuilder everything works perfectly, including all later steps in the model. However when I try to validate or run the entire model with none of the intermediary files created (which are created when I run the steps individually) I encounter an error saying that the table output in Domain to Table does not exist, even though it should exist once Domain to Table runs. The full error is as follows:

ERROR 032659 updateParameters Execution Error: Traceback (most recent call last):
  File "C:\Users\myname\Documents\ArcGIS\Projects\ProjectName\ProjectToolbox.tbx#ChoosePeril_CatEvents.UpdateParameters.py", line 4, in <module>
  File "C:\Users\myname\Documents\ArcGIS\Projects\ProjectName\ProjectToolbox.tbx#ChoosePeril_CatEvents.UpdateParameters.py", line 31, in updateParameters
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\analysis.py", line 1798, in Frequency
    raise e
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\analysis.py", line 1795, in Frequency
    retval = convertArcObjectToPythonObject(gp.Frequency_analysis(*gp_fixargs((in_table, out_table, frequency_fields, summary_fields), True)))
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 496, in <lambda>
    return lambda *args: val(*gp_fixargs(args, True))arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Table: Dataset C:\Users\myname\Documents\ArcGIS\Projects\ProjectName\ProjectGDB.gdb\PerilTypes_DomainToTable does not exist or is not supportedFailed to execute (Frequency).

From what I can find online Error 032659 just means there's an issue that was found in the validation code, and that Error 000732 is more of the issue.

I've found a number of pages with potential answers to Error 000732, but so far none of them have solved my problem. Things I have tried include the following:

Running Table To Table and Make Table View as intermediate steps between Domain to Table Choose Peril.
Checking permissions to the write location by trying to write the table to both the default geodatabase and in_memory.
A number of articles (ESRI technical article 10149, GIS SE 79718, GIS SE 209358, GIS SE 319053) recommend checking path names for poor use of spaces, special characters, and backslashes. My workspace name is a little weird, but I'm not sure how this could be the problem since I'm able to manually run this step successfully. The workspace in question is: "C:\Users\myname\Documents\ArcGIS\Projects\ProjectName\CR41459-PD.prodlb.company.net,41459(1).sde"
And of course, the good old, try reloading the tool, try restarting ArcPro, and try restarting the computer.

Has anyone else encountered this kind of error before, or have any suggestions of next steps to try?


texts:
I've been trying to install the GDAL Python package on my MacOS Mojave 10.14.1.

I ran the following:

brew install gdal

This works fine, though I do get this warning (https://github.com/Homebrew/homebrew-core/issues/34783). I read that it could be safely ignored, though when I try to run:

pip install GDAL

I get the following error log here (https://pastebin.com/nsfj86Jg):

The important bit is that it doesn't appear able to locate standard C++ include files, resulting in the build failure.

warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
extensions/gdal_wrap.cpp:3096:10: fatal error: 'stdexcept' file not found
#include <stdexcept>
         ^~~~~~~~~~~

I'm not sure how to specify the compiler to use from pip, I assume it has to be done elsewhere, or that I'm missing something else completely.