texts: Is OpenStreetMap data compatible with Google Map tiles layer?

texts:
I am building an android application to calculate and draw the shortest route for the user to go to a specified destination.

My application is using osmdroid library to render my map tiles.  I am using .mbtiles fomat generated from google maps. Now I want to add routing functionalities to let the user find the nearest way to the specific destination.

I found a the OpenStreetMap data that can be used with GraphHopper navigation library to achieve my task .

My question is that :

Is it compatible to use OpenStreetMap data with the Google Map tiles ?


texts: How to display different layers with different CRS in one canvas in a standalone application?

texts: I am a freshman of the  pyqgis. Now I load the raster and vector data in the standalone application. The two data are same area, but in my canvas, they are at different places. I want to know how to deal with the CRS.


texts: I have defined a virtual field to generate additional information in dependence of another attribute. Now I want to import the shape in a geopackage. I want to have the virtual field in the geopackage too. Is it possible?


texts: Exporting layer to GeoJSON the result is in the wrong coordinate system

texts:
I have a layer with MultiLineStringZM features that was imported in EPSG:4326 - WGS 84.
This I want to export to geojson in EPSG 25832 (UTM).
However even if I specify EPSG:25832 in the export it still comes out in EPSG:4326.
It doesn't help if I export the layer to a new shape-file layer with EPSG:25832 coordinate system.
I can check in python console and when I show the content of the geometry the coordinates are correct (in EPSG:25832) but when I try to export the new layer that is in EPSG:25832 to GeoJSON it still comes out in EPSG:4326.
Does anyone know how to solve this???
(QGIS 3.14)


texts: Issue installing Qgis 1.8 Openlayers Plugin on Win XP

texts:
I recently installed Qgis on a Win XP PC. All seems fine. I went to install the Openlayers plugin using http://build.sourcepole.ch/qgis/plugins.xml and I get and error saying the plugins directory doesn't exist. The error reports the location as:
C:/Documents and Settings/osc/.qgis//python/plugins
The plugins directory does exist but the path displayed in the error seems to have one too many forward slashes - i.e. '.qgis//'.

I've successfully used the plugin installer for the Openlayers plugin many times on Linux so is there something special about Win XP to consider?


texts: Is it possible to 'fly to location' in Leaflet in the same way as this Mapbox GL example?


texts: OGR FeatureCount returns '-1' with OSM data

texts:
I am trying to read in an OSM file with OGR.
import ogr
driverOSM = ogr.GetDriverByName('OSM')
roadsDs = driverOSM.Open('data/map.osm', 0)
roadsLayer = roadsDs.GetLayer()

The feature count returns -1
print roadsLayer.GetFeatureCount()

When I loop over the features only points are returned, eventhough I know there are ways too (tested the data in QGIS).
featureStand = roadsLayer.GetNextFeature()
while featureStand:
  geomStand = featureStand.GetGeometryRef()
  print geomStand
  featureStand.Destroy()
  featureStand = roadsLayer.GetNextFeature()

Can anybody reproduce that or sees what I am doing wrong?

Python 2.7.5, GDAL 1.10.1, did not modify osmconf.ini


texts: How to use ArcGIS for WPF custom symbol with data binding?

texts:
Esri's ArcGIS for WPF does not seem to have any real MVVM support or binding support; unless I'm mistaken.

Anyway, I am creating a tracking application and it needs to track objects via GPS coordinates.

I have implemented a custom IGeoPositionWatcher<GeoCoordinate> which is used with the GpsLayer. This all works perfectly. I can modify the GPS coordinates and my little dot on the map moves smoothly to it's final resting place. My problem is that I can't use the little dot and arrow that comes with the GpsLayer. I need a custom MarkerSymbol to be something similar to the following:

<Grid>
   <Image Source={Binding Pogostick.HeightImage} />
   <TextBlock Text={Binding Pogostick.PogoId} />
</Grid>

I have a list (amount unknown and changes at any given moment) of these "pogosticks" which are always tracking by GPS and need to have the symbol update according to its status. The problem is that I can't get the Pogostick object to be the DataContext for the custom MarkerSymbol.ControlTemplate and there for my image source and text do not show.

I'm trying to avoid using a Graphic in a GraphicLayer and would like this to work with the GpsLayer. Is there a way to do this at all? Am I even approaching this correctly... should I be using a GraphicLayer or a FeatureLayer?

I want to render these tracked pogosticks on the user's desktop app and not by editing layers or features on the map service. Perhaps I should be using a custom renderer?


texts: How to create Esri Flex Geometry from WKT

texts: I am working with Esri flex 2.3 API, I am also using Abode BlazeDS for server side binding. I am sending a geometry as WKT from server into my flex client and I am looking for a way to convert the string into a flex geometry so that i can make a Graphic object and add to Feature Layer! or do I have to write a parser myself to accomplish this?


texts: Calculating shortest distance between raster pixels and line feature in QGIS?

texts:
I am relatively new to QGIS and am trying to find a way to calculate the distance of each point in a raster file (1km resolution) to the closest coordinate on a line vector. See green line vector below, and raster layer.

The reason for doing this is the raster layer contains # population in each square km and I want to [eventually] find the amount of population total that are within X distance of this infrastructure.

I've tried converting the line vector to points but the points are so far away that the results I'm seeking won't be accurate unless I interpolate points between the line vertices.


texts: How to create an editable 3D city map based on OSM?

texts:
F4 map allows you to create 3D images based on OSM maps.

I want to create an application, which allows you to edit such 3D map, i. e. remove and add buildings and roads (without modifying the underlying OSM data).

How can I do this?

My first thought was to

take F4 map client,
modify it so that it gets the data not from OSM, but from my web service.

Then, when the user removes a building in the browser, the client-side code sends a request to a web service and the building is removed from the database. Same for adding buildings, roads and everything else.

I'm wondering, if there are better approaches.

If there is any existing code, which I can re-use for my purposes, please tell me.

Update 1:

It seems that F4 map's source code is not available publicly.
CesiumJS seems to be able to render maps with buildings.


texts: What is a suitable map projection for the entire state of Idaho?

texts:
I am working with some sample GIS data for Idaho. The data is in geographic coordinates but I want it in projected coordinates.

I am unsure how to address the issue of projection as Idaho crosses UTM zones 11 and 12.

Should I:

apply UTM 11 to all?
apply UTM 12 to all?
apply another system completely to all?
filter the data into those that fall into 11 and 12 respectively and work with them separately?


texts:
Does anyone know why my movement.simplecrw tool is not running?

I am looking at the impact of roads on puff adder movement. To see if individuals are crossing a road network more often or less often than their original natural path movement.

I have ArcGIS 10.3.1 and the corresponding version of GME installed on my laptop.

The problem is that the program is not reading my .csv files for my turning angle distribution or my step length distribution. This is the error I am receiving:

  The specified empirical distribution file contained no valid records:
  C:\Users\B\Desktop\Masters\MScdata\GISdata\Frequencydistributions\Pu1_tad.csv

  The specified empirical distribution file contained no valid records:
  C:\Users\B\Desktop\Masters\Mscdata\GISdata\Frequencydistributions\Pu1_sld.csv

I followed the GME.pdf that explains how to create a .csv for empirical distributions with maximum, minimum and probability values. However when I input the commands into the GME interface I am not given the drop down menu option of selecting a file path for the 'tad' and 'sld' values (which is the option for all other aspects (such as inpoint/outpoint/bnd) that have a file path).

See screenshot of the GME interface attached.

If I input the file path manually, I receive the above error.


texts: Can you regularize building footprints in QGIS like you do in ArcGIS?

texts:
I'm using LiDAR data where I've extracted the "building" category and created a raster dataset. I've then 'polygonized' the raster to create a vector polygon shapefile of building fooptrints.
I'd like to eradicate/normalize the pixelated shape of the polygons. I can see that ArcGIS has a feature titled 'Regularize Building Footprint' in 3D analyst which seems to do exactly this. Is there a similar algorithm/feature in QGIS? If so, does anyone have a worked example I can follow?


texts: Exploding overlapping to new non-overlapping polygons?

texts:
Given multiple polygons that overlap in multiple ways, I would like to export from these features all polygons that don't overlap with others, iteratively.

The product would be a number of features with no overlap that, when summed together, make up the original.

The products could then be used as input to Zonal Statistics, and this would be much faster than iterating Zonal Statistics over each polygon.

I have been trying to code this in ArcPy without success.

Does code to do this already exist?


texts: Issue with writing virtual layer as CSV in PyQGIS

texts:
I am trying to figure out why I can't write a in memory virtual layer to the file system. The folder exists

QgsVectorFileWriter.writeAsVectorFormat(vlayer, r'c:\temp\xyz.csv', "utf-8", None, "CSV")

  Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\Python37\lib\code.py", line 90, in runcode
  exec(code, self.locals)
  File "", line 1, in
  TypeError: QgsVectorFileWriter.writeAsVectorFormat(): arguments did not match any overloaded call:
  overload 1: argument 4 has unexpected type 'NoneType'
  overload 2: argument 4 has unexpected type 'NoneType'

This is the whole code

layer = qgis.utils.iface.activeLayer()
cFolder=os.path.dirname( unicode(iface.activeLayer().dataProvider().dataSourceUri()))
print (cFolder)
fields=[] # List of fields
Lquery=[] # List of queries to join together with Union All statement
Cquery=[] # Combined Query
for field in layer.fields():
    if field.name() not in ('Asset_ID,GID_New,GID,Depth,RL_of_Lid,US_IL,DS_IL,Install_Year,Internal_Reference_No,CWCF_hyperlink,As_con_InfoXpert_ID,As_con_2_hyperlink,As_con_3_hyperlink,Data_source,Date_Asset_added,Date_Asset_Modified,Remarks,MGM2,MGM_Survey_Required,MGM_Confidence,MGM_Comments,MGM_QA_Staff,MGM_QA_Comments,MGM_Staff3,MGM_Comment3,Phase3_MGM,Phase3_Comments,Phase3_QA,Phase3_QA_Comments,scratch'):
        fields.append(field.name())
        query = "Select '{0}' as 'Column', {0} as 'Value', count(*) as 'Unique' from {1} group by {0}".format(field.name(), layer.name())
        Lquery.append(query)
    else:
        print ('Skipped: '+field.name())
for L in Lquery:
    Cquery.append(L+' Union All ')
query=''.join(map(str, Cquery))
query=query[:-11]+' Order by Column'
print (query)
vlayer = QgsVectorLayer( "?query={}".format(query), 'counts_'+layer.name(), "virtual" )
QgsProject.instance().addMapLayer(vlayer)
newfile='r\''+cFolder+'/counts_'+layer.name()+'.csv\''
print (newfile)
_writer = QgsVectorFileWriter.writeAsVectorFormat(vlayer,newfile,"utf-8",vlayer.sourceCrs(),"CSV")


texts:
How do I simplify an sf polygon without introducing gaps and slivers?

With a shapefile, for example, I would use rmapshaper::ms_simplify():

library("pryr")
library("rgdal")
library("rmapshaper")

download.file("https://borders.ukdataservice.ac.uk/ukborders/easy_download/prebuilt/shape/England_gor_2011.zip",
              destfile = "regions.zip")
unzip("regions.zip")
regions <- readOGR(".", "england_gor_2011")
object_size(regions)
# ~13MB

regions <- ms_simplify(regions)
object_size(regions)
# < 1MB

I've tried sf::st_cast() which, from the man pages, states:

  Cast geometry to another type: either simplify, or cast explicitly

and:

  to argument: character; target type, if missing, simplification is tried; when x is of type sfg (i.e., a single geometry) then to needs to be specified.

When I've left to as missing this hasn't worked as expected though (I knew it was too good to be true!):

library("sf")
regions <- sf::read_sf("england_gor_2011.shp")
object_size(regions)
# ~13MB

regions <- sf::st_cast(regions)
object_size(regions)
# Still 13MB

Currently I'm opening the file with rgdal::readOGR(), simplifying it, saving this, then loading this again with sf.

Is there a better way?

rgeos::gSimplify()

@s.k 's suggestion of rgeos::gSimplify() can do topologically-aware simplifications (i.e. simplifies without creating slivers) when specified with the following arguments:

library("rgeos")
regions_gSimplify <- gSimplify(regions, tol = 0.05, topologyPreserve = TRUE)

gSimplify doesn't preserve the @data frame, though, so we should re-create it:

regions_df <- regions@data
regions_gSimplify <- sp::SpatialPolygonsDataFrame(regions_gSimplify, regions_df)

And this does indeed result in a smaller file size (can tweak tol argument to get it smaller) and I confirmed this hadn't created any slivers by examining it in QGIS.

object_size(regions_gSimplify)
# ~8MB

So although this is a valid alternative to rmapshaper::ms_simplify() I still have the same problem, namely that it doesn't work with sf:

regions_sf <- sf::read_sf("england_gor_2011.shp")
object_size(regions_sf)

regions_gSimplify <- gSimplify(regions_sf, topologyPreserve = TRUE, tol = 0.05)
# Error in gSimplify(regions_sf, topologyPreserve = TRUE, tol = 0.05) :
# no slot of name "proj4string" for this object of class "sf"

@obrl_soil 's answer can also be applied to gSimplify(), just use it in place of ms_simplify().


texts:
Isn't it possible to store Metadata directly in GeoPDF files using GDAL command line tools (gdal_translate, gdal_edit) or GDAL Python?

Something like: gdal_edit -mo "CUTLINE=POLYGON(...)" orig.pdf

Unfortunately, all I can achieve is the creation of an additional *.aux.xml file that includes the Metadata entry (GDAL 2.2.2 Windows 64bit).

Using PyPDF2 to store the Metadata didn't help either, because gdalinfo couldn't read the data.

Do I miss something here?


texts: Executing Intersect tool in arcgis pro .net sdk

texts:
In ArcGIS Pro version 2.0.0 I use this code to execute merge tool

    public async Task<bool> ExecuteToolAsync()
    {
    var valueArray = await QueuedTask.Run(() =>
    {
    // Creates a 8000-meter buffer around the geometry object
    // null indicates a default output name is used
    return Geoprocessing.MakeValueArray(_inputs, _output);
    });
    var result = await Geoprocessing.ExecuteToolAsync("Merge_management",
    valueArray);
    return !result.IsFailed;
    }

where _inputs is list of fullpath of layers.
it works well.

To execute intersect tool I use this:

    public async Task<bool> ExecuteToolAsync()
    {
    var _inpputs= new List<string>() { _featureLayer1, _featureLayer2 };
    var valueArray = await QueuedTask.Run(() =>
    Geoprocessing.MakeValueArray(_inpputs, _outputFeatureClass, "ALL, "0",
    "POINT"));
    var result = await Geoprocessing.ExecuteToolAsync("Intersect_analysis",
    valueArray);
    return !result.IsFailed;
    }

It doesn't  work. How can I solve this?


texts: Which class should I use to work with vector layers?

texts:
I'm doing different operations on vector layers.

Kindly suggest which class should I use for vector layer i.e QgsVectorLayer or QgsVectorLayerDataProvider.


texts: Extract cell values and coordinates from raster using a polygon in R

texts:
I'm trying to extract cell values and coordinates from raster using a polygon in R. I have multiple raster layers with different types of values, all within the same extent. I have multiple polygons within these rasters data set areas.

I want to use the polygons to extract the raster cell values and coordinates within each cell.

I'm using this code for example:

library("raster")
library("rgdal")
library("shapefiles")
library("rgeos")
library("sp")

values_cps <- extract(CPs,cp_layer,cellnumbers=T)

cp_values <- as.data.frame(values_cps)

write.csv(cp_values,file="RCP95_cps.csv")

where: CPs is a raster layer, cp_layer is a polygon.

When I write the csv it gives me a column of cell ID numbers and a column of the values of each cell. I want to get the coordinates to come with it.

I've tried using coordinates() which I'm successfully using for the raster file, but not the extracted file.

Any ideas?


texts:
I am really new to Python and I am trying to create a tool using arcpy where I am using the calender as the data type for one of the parameters in the tool. The date format ArcMap is giving me is something like: 9/14/2017. Instead I would like to have a leading zero in front of the date like: 09/14/2017.

How can I keep the date format consistent with a leading zero in front of the date in Python?


texts: Extracting regional data from vector file in QGIS

texts: In QGIS, I have a random points data (coordinates) with assign values I have plotted it in QGIS with CSV file and now I want to extract the specific region data. How would I do this? Please guide me.


texts: How to install GDAL extension for GeoServer on Windows

texts:
I am in search of guidance to set up the GDAL extension for GeoServer.

I used GeoServer 2.11.0 with the geoserver-2.11.0-gdal-plugin.zip files, folowing the guide from http://docs.geoserver.org/stable/en/user/data/raster/gdal.html but gets errors running it.

Welcome to GeoServer!

JAVA_HOME: C:\Program Files (x86)\Java\jre1.8.0_121

Please wait while loading GeoServer...

WARNING: Module not found [ssl]
2017-04-27 09:24:30.623:INFO::main: Logging initialized @565ms
2017-04-27 09:24:30.770:INFO:oejs.Server:main: jetty-9.2.13.v20150730
2017-04-27 09:24:30.793:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/C:/Data/geoserver-2.11.0/webapps/] at interval 1
2017-04-27 09:24:31.885:INFO:oejw.StandardDescriptorProcessor:main: NO JSP Support for /geoserver, did not find org.eclipse.jetty.jsp.JettyJspServlet
2017-04-27 09:24:32.755:WARN:oejuc.AbstractLifeCycle:main: FAILED o.e.j.w.WebAppContext@1be98f5{/geoserver,file:/C:/Data/geoserver-2.11.0/webapps/geoserver/,STARTING}{C:\Data\geoserver-2.11.0\webapps\geoserver}: java.util.ServiceConfigurationError: javax.imageio.spi.ImageReaderSpi: Provider it.geosolutions.imageio.plugins.arcbinarygrid.ArcBinaryGridImageReaderSpi could not be instantiated
java.util.ServiceConfigurationError: javax.imageio.spi.ImageReaderSpi: Provider it.geosolutions.imageio.plugins.arcbinarygrid.ArcBinaryGridImageReaderSpi could not be instantiated
        at java.util.ServiceLoader.fail(Unknown Source)
        at java.util.ServiceLoader.access$100(Unknown Source)
        at java.util.ServiceLoader$LazyIterator.nextService(Unknown Source)
        at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
        at java.util.ServiceLoader$1.next(Unknown Source)
        at javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(Unknown Source)
        at javax.imageio.spi.IIORegistry.<init>(Unknown Source)
        at javax.imageio.spi.IIORegistry.getDefaultInstance(Unknown Source)
        at javax.imageio.ImageIO.<clinit>(Unknown Source)

The system is:

Win 7 64bit

MSVC 2005, 2008, 2010, 2012, 2013 2015 is installed in both 64 and 32 bit

Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Client VM (build 25.121-b13, mixed mode)

I installed the 32bit dlls and ECW driver:

gdal-1.9.2-MSVC2010.zip

gdal-19-1600-ecw.msi

For full error log see https://pastebin.com/ret8qZhi


texts: Cell file resolution differs from current region in GRASS GIS

texts:
Error

r.terraflow elevation=cdnh43e_v1@user1 filled=cdnhfill direction=cdnhdir
swatershed=cdnhsink accumulation=cdnhacc tci=cdnhtci

  ERROR: cell file cdnh43e_v1 resolution differs from current region
  (Fri Oct 03 13:32:11 2014) Command finished (0 sec)


texts: QGIS 2.6.0 minidump crash every time I save

texts:
Just got QGIS 2.6.0 running on Windows 7 service pack 1 64 bit. Project loads, edits, saves editing changes, adds removes, layers no problem. Only problem is saving the project. Do that and it's certain death. You get a mini dump crash error.

Then you attempt to open the project again and it says unexpected end of file at line'x' and shows the file as being 0 KB.  Restore the project to a previous version and it happens again EVERY TIME.  This also happened when I upgraded to 2.4.  What gives? Yes, going to be writing a bug ticket also.


texts: Creating bounding extent of existing polygon with same geometry using QGIS?

texts:
I have a number of polygons (in the hundreds) that have been taken from a cadastral layer and I am trying to create another polygon layer based on that group of polygons (from a field ID) without digitizing if possible?

I have looked at the convex hull tool in QGIS but it only creates the minimum boundary I am looking for an exact replica of the exisitng polygons - essentially removing all the parcels and being left with a singlepart polygon of the area.

I have access to ArcGIS as well if there are any tools suitable ?

and what I want to achieve is:


texts: How do you convert an Imagine raster attribute value into the raster value?

texts: I have a raster derived from image segments with row id as the value. I have an attribute in the attribute table which should be the raster value, "Standard deviation layer 5" (see image). How do I convert my raster to that value? Is there a way to do this in Imagine? (I'd like to avoid needing to go to spatial analyst in Arc to run reclassify).


texts:
I'm new to PostgreSQL and PostGIS.
I'm adding a raster to a newly created PostGIS schema and table with the raster2pgsql command:
sudo raster2pgsql -I -C -s 3577 -t 50x60 /path/to/raster.tif schema.table | sudo -u user psql dbname

Processing 1/1: ./sat/geotiff_clum_50m1218m/clum_50m1218m.tif
BEGIN
ERROR:  type "raster" does not exist
LINE 1: ...ata"."lulc_raster" ("rid" serial PRIMARY KEY,"rast" raster);

Found some helpful info about making sure that the PostGIS extension was enabled on my schema and can confirm that they are:
create extension postgis;
extension "postgis" already exists

create extension postgis_raster;
extension "postgis_raster" already exists

And that the raster type exists in the schema:

Using PostGIS 3.1 and PostgreSQL 13, on Ubuntu 20.04.
I'm not sure what else to try.


texts: conditional auto populate field values based on other column values?

texts:
I would like to know if there is a way to even possibly populate field value automatically for a column based on the condition of other columns. Not sure what the best way to explain but to provide an example here:

Essentially, I have an attribute table with 5 columns. I've established the domain in which the values can only be numbers (1 or 2). Ideally I would like to create a sixth column in which will auto populate based on the values from the previous 5 columns. The condition is this, if there is a value 2 in any of the columns the sixth column would be valued at 2. If all columns were listed at 1 then the sixth column would be 1.

I do not wish to auto generate this manually. I would like it in a way in which when the first 5 columns are populated, the sixth value will auto generate.


texts: Distinguishing feature class from shapefiles using ArcObjects?

texts:
private IFeatureClass GetFeatureClassSelection() {
        var gxObject = BrowseForFeatureClass(0);
        if (gxObject == null)
            return null;
        var gxDataset = gxObject as IGxDataset;
        IFeatureClass featureClass = null;
        if (gxDataset != null) {
            if (gxDataset.Dataset == null) {
                MessageBox.Show("Unable to access selected feature class", "File Selection Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return null;
            }
            _selectedFeatureInformation.WorkspaceType = gxDataset.Dataset.Workspace.Type.ToString();
            featureClass = gxDataset.Dataset as IFeatureClass;
        }
        if (featureClass == null) {
            MessageBox.Show("Feature Classes and Shapefiles are allowed only", "File Selection Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
            TxtBxSrcFtrClass.Text = string.Empty;
            return null;
        }
        _selectedFeatureInformation.FtrClass = featureClass;
        TxtBxSrcFtrClass.Text = gxDataset.Dataset.Workspace.PathName + "\\" + ((IDataset)_selectedFeatureInformation.FtrClass).Name;
        return featureClass;
    }

How can I tell if it is a shapefile or feature class from the returned object?


texts: Creating raster pinned to cartesian coordinates using ArcGIS for Desktop?

texts:
I'm looking to create a raster such that the edges of the raster are aligned perfectly with the cartesian coordinates of the underlying projection.

I am using a custom Lambert conformal conic projection, so the coordinate 0,0 is in my study area and I would like that to be either the center of each cell or one of the corners and each cell extending outwards would have be a multiple of 200.


texts: Why might Ordnance Survey codes all be out by 500m?

texts:
I've been given a set of UK Ordnance Survey geocodes, but I think they're all off by about 500 metres.

Here is an example - please could someone confirm to me that the codes are wrong, not my calculations?

The OS geocode that I've been given is SO7567, for a place called Abberley, in Worcestershire.

My script converts this to 52.30136731, -2.36798287 here: http://goo.gl/maps/9a3Yu However, Abberley is here, about 500 metres north: http://goo.gl/maps/OAD9L

This conversion site suggests my calculations are correct, and it is indeed the original coders (who looked at Abberley, and decided that its Ordnance Survey code was SO7567) who were out of whack.

Could anyone suggest why they might all be out by exactly this amount - could it be a projection issue? I'm not an geographer, and the person who gave them to me swears they should be right!

Thank you for nay help.


texts: Return readable date format in leaflet popup from ArcGIS map/feature service

texts:
I'm trying to show dates in popups in a leaflet map that consumes Map Service from ArcGIS Server. the date format is however in UNIX-standard (json: "Bedomdatum": 1228694400000,) and I'm lost when trying to convert these to readable format, such as 2017-12-31.

Any ideas or code snippets that I could learn from?

Link to Map service

I'm using L.esri.featureLayer to render the objects in the map
https://atgarderivatten.se/karta_funktion

Excerpts of code:

    var fiskvagar = L.esri.featureLayer({
    url: 'https://ext-geodata.lansstyrelsen.se/arcgis/rest/services/WFS/LST_WFS_Miljodata/MapServer/2',
    pointToLayer: function (feature, latlng) {
            if(feature.properties.Bedomskick === "Gott") {
                return L.marker(latlng, {icon: Gott});
            }
            else {
                return L.marker(latlng, {icon: Bedomning_saknas});
            }
    },
}).addTo(map);

fiskvagar.bindPopup(function (evt) {
return L.Util.template('
{FiskvNamn}

\

Datum:	{Bedomdatum}
\

ID / länk:	{FiskvagID}
\

', evt.feature.properties);

});


texts: How much Vector Grid is intersected by another polygon layer using ArcGIS for Desktop?

texts:
I have a grid 5X5 sqkm and another vector layer with 2 different land cover type (let's say "forest"/"no forest").

I wish all the squares composing the grid to get a value ranging from 0 to 1 accordingly to the extent of their area intersecting the "forest".

A square completely covered by forest should assume the value 1, while a square with no forest at all a 0 value.

How can I determine how much of a Vector Grid is intersected by another polygon layer using ArcGIS for Desktop?


texts: Store pixel acquisition time in tile PNG metadata

texts:
I have a global tileset of visual satellite imagery stored and served to a web frontend in XYZ-format. The tileset get's updated periodically, as new images come in. However, when adding new data, clouds are masked and therefore the existing tileset will only be "painted over" with new data wherever there are no clouds.
Here's the problem:
I would like to have a way to display the acquisition time of each individual pixel to the user by hovering the mouse over the tiles in the frontend.
Is there a good way to embed this information in PNG metadata, or can I somehow add a fifth channel (alongside RGBA) to the PNG file?
If no, is there any neat way to store pixel based acquisition time info for a global tileset, or any other auxiliary info for that matter?


texts: Has anyone managed to get QConsolidate plugin to actually work with QGIS 3? It always gives me an error on line 1 with no details as to the issue.


texts: Editing versioned view in ArcSDE 10.1 error

texts:
I am working in an ArcSDE 10.1 instance sitting on Oracle that I believe was upgraded from a previous ArcSDE version.  It has a versioned view for the table I am trying to edit (specifically, delete rows).  However, the views isn't called feature_class_name_vw, which seems to be the naming convention for views generated in 10.1.  Which makes me think that it was created manually in a previous version of SDE.

This is the error I'm getting:

  ORA-20025: State 118977 is closed.

  ORA-06512: at "SDE.VERSION_UTIL", line 2495

  ORA-06512: at "DATA.V109_DELETE", line 1

  ORA-04088: error during execution of trigger 'DATA.V109_DELETE'

Originally, it was giving a Not owner of state 0 error.  State 0 is owned by SDE, so that makes sense.  I created an edit session in ArcMap with the same user that I am executing my SQL as, and that generated a state in the DB with the correct user - but also the state is closed error I mentioned above.  So it seems like it isn't generating a state when editing the view.

Any ideas why this is?

RESOLUTION:

I asked our DBA to regenerate the versioned views and that did the trick.


texts: Excel object does not display more than 19 fields in ArcMap 10

texts:
I have an A0 map. I want to put a table underneath it. I want to insert an Excel object as the table. When I do this, the size of the table is 19 fields/columns. I cannot increase this number of columns, even though this is only half the width of an A0 portrait page. The table is only 32.1cm wide when the page is 84.1cm wide. I want it to, effectively, display 84.1cm's worth of cells, not just stretch 19 columns 84.1cm wide.

I have set the printer as the A0 plotter (HP designjet HPGL/2). I selected A0 page size in the Excel object. In fact I set this as the default setting in case a non A0 default setting was causing the problem.

I know that Word cannot print anything bigger than 55.7cm, but Excel is supposed to be able to print more (presently the object isn't even 55.7cm wide...). Is it correctc excel can print A0 if an A0 printer's installed? I can edit the size of the Excel Object in Arcmap, but this only makes the table bigger, not display more fields. I have also tried opening the excel object from a file rather than typing data straight in. This file contained far in excess of 19 fields, but the object only displays 19.


texts:
I'm trying to connect to this WMTS in QGIS, but I'm having issues that I think are projection related.  I use the Add WMS/WMTS dialog and enter this url:

http://www.vernoncounty.org/arcgis/rest/services/VCGISpub/2010_VC_WISCRS_Tiled_Cache/ImageServer/WMTS?

I connect and add the layer, when prompted, I choose WGS84 as the CRS (I know, just wait a second).  The Zoom to Layer function zooms to the correct extent, but the image doesn't show up.  In the WMTS metadata, the local coordinate system EPSG:103462 is referenced, and the zoom level extents seem to be using that system.  However, if I add CRS=EPSG:103462 (I tried the SRS parameter as well) to the request nothing changes, and if I use that projection as the layer CRS in QGIS, the Zoom To Layer function goes to the wrong spot.

So, I think there may be something funny with the way the layer is published, but this is my first use of a WMTS in QGIS so there may be something I'm missing.


texts: Collapsing arcpy script parameter categories by default?

texts:
Within an arcpy script, I've set up categories using the style sheet found in the ArcGIS installation folder. I have a couple categories created within the tool validator.

....
def initializeParameters(self):
    self.params[2].category = "Intersections"
    self.params[3].category = "Intersections"
    self.params[4].category = "Intersections"
    self.params[5].category = "Intersections"
    return

This shows my parameters in their proper categories, however, when you start the script, the categories are shown expanded by default. Is there something in the style sheet I can change to make sure they are collapsed by default?

I'm also curious if anyone knows of a way to move these categories up and above some other "non category" parameters in the script.


texts: Spatial join QGIS, finding the number of points within a radius of another point

texts:
I am very new to QGIS and am pulling my hair out trying to find a solution to my problem:

I have two very large tables that I have plotted in different layers within my workspace, the first of which is the location of property sales and the second being short term rentals.

What I'm trying to achieve is to somehow find how many points in the rental layer lie within a radius of say 200 meters from the points in the sales layer at the time of sale.

I have dates for both of these in the tables.

Ideally I would then like to add a column into my sales table to say that there are "x" number of rental properties nearby when the property is sold.

I'm guessing that this can be achieved by some form of spatial join function but I am really struggling to achieve this given the time restriction that I am trying to achieve.


texts: QGIS attributes disappeared when reopened shapefile

texts:
I'm a new QGIS user so sorry if this sounds lame.

Working in QGIS, I've built a vector layer and added attributes. When I reopened the file this morning, the attributes won't show up in the Attributes table. All I get is a basic 'Feature id' column.

I can see the attributes I added in the DBF file but they wont' show in the table.

I have tried closing and reopening QGIS and aligning projections (WGS84) between by project and layer but nothing working.

Any thoughts?


texts:
I have successfully made a legend and teasers for a tilemill map. However, I don't know how to add a title and don't see a function for it.

If I wanted to add a title, how would I do that?


texts: Importing Mapinfo .TAB files to AutoCad Map

texts: It is any way to import Mapinfo files to Autocad Map with line and polygon style definitions cereated in Mapinfo?


texts: QGIS 2.14.12 Essen / Ubuntu 16.04: Error Numpy/GDAL

texts:
I am using QGIS 2.14.12 Essen under Ubuntu 16.04. Xenial. My overarching goal is to use the entire QGIS suite, including GRASS, SAGA, Orfeo and TauDEM. In general, QGIS works fine and so does Grass, however, I get some crashes when using SAGA and some python based algorithm. When I start QGIS from the terminal, I get the following output:

Warning: QCss::Parser - Failed to load file  "/style.qss"
Warning: QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
Warning: QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
Warning: void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "Terms of Service / About" under id 243
ERROR 1: NUMPY driver was compiled against GDAL 2.1 but current library version is 1.11

Warning: void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "&Werkzeugkiste" under id 399
ERROR 4: `/initrd.img' not recognised as a supported file format.

Warning: void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem*, QMenu*, int, int, const QStringList&): No id for action
Warning: void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem*, QMenu*, int, int, const QStringList&): No id for action

Particulary, error 1 seems to be a problem.

Can somebody help me?


texts: Finding duplicate geometries that are not identical using ArcGIS Desktop

texts:
I'm working with a few roads and trails datasets. There are some duplicate geometries that are not identical. See photos below.

I tried Find Identical with XY Tolerance, but it didn't seem to find most of these. I tried continuing to increase the XY tolerance, but I just got it finding parallel roads like the roads below.

I even tried planarizing the lines and just got a bunch of segments. I thought about trying to pull them out based on number of intersections, but I'm not even sure how to make that work.


texts: How to print high resolution poster sized maps from online map (arcgis server)?

texts:
I want to create a PDF document that can be printed at large poster size containing user created data and base map data.  Based on a rough calculation, if the poster was 24 inches by 34 inches and I wanted a 200 dpi map, I would need a 4800x6800 pixel image of each service.

Unfortunately the max size exposed by the REST API is 2048x2048.  So how do I get large images to embed into a PDF document for poster sized output maps?  I would also like to include arcgis online base map services.


texts: Place point label perpendicular to line segment

texts: I have a point shapefile with attributes and I want to make the label be perpendicular to a line shapefile, is this possible? Basically my points represent houses and I want the house label to show up perpendicular to the line segment (road). My line segments do not all run the same way so I have to manually turn my labels and I was wondering if there was a way to automatically create the label to be perpendicular. My points do not lie on the lines either, there is space between them. I am using arcmap 10.3


texts: Implementation of Algorithm in Google Maps

texts: How do I implement A star algorithm in Google maps and generate an optimal path for my software ?


texts: Deactivating Openlayers Cluster after a certain zoom level

texts:
I want to deactivate the cluster strategy after zoom level 16.
The Cluster strategy gets deactivated and I also change the style of the original features and redraw the layer. But still it takes the styles defined for the clusters instead of taking the newly defined styles.

var test_style = new OpenLayers.Style({
    'fillColor': '#CC66CC',
    'fillOpacity': .8
});
var test_style_map = new OpenLayers.StyleMap({
    'default':test_style
});
var test_layer_name=clusterStrategy.layer;
if(zoom_level>16) {
    clusterStrategy.deactivate();
    test_layer_name.styleMap=test_style_map;
    test_layer_name.redraw();
}


texts: How to get geographic data of any particular region of map in Geometry datatype format in SQL Server?

texts:
I am completely new to Geometry datatype format of a Microsoft SQL Server database. DataType is Geometry. If not wrong, geographic data contains latitude and longitude of each point of that map, correct me If I am wrong. Now I have to add data of particular region from map in SQL table in Geometry dataType format. When I checked online, it is kind like this -
0x110F0000104... but I don't know how to get this.

I also got to know that there is special software like Atlas from one of my colleague, using this we are getting geometry info. I also got to know that
 there is polygon concept in achieving this. How can I extract geographical data from map or from other source in SQL Server in Geometry format? Are there any free software available in market to achieve this functionality? Provide me examples if any.


texts: Text element name not appearing in ListLayoutElements

texts:
As in the title, I have the simple below code:

import arcpy

arcpy.env.workspace = r"U:"
mxd = arcpy.mapping.MapDocument(r"U:RAFT.mxd")
layoutlist = arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "")

print layoutlist

Which gives me:

[<TextElement object at 0x23ddb50[0x15325228]>, <TextElement object at 0x23dd990[0x1531c548]>, <TextElement object at 0x15311570[0x1531c570]>, <TextElement object at 0x15311bd0[0x15325340]>, <TextElement object at 0x23ddb30[0x153252a0]>, <TextElement object at 0x15311710[0x1531c6d8]>]

Which lists the Text Elements in the mxd as expected. However, I have given one text element a name as it is the specific one I want to work with. My assumption was that element name should appear in the list? How can I do this?


texts: Raster distance ERROR 6: GDALDriver::Create() ... no create method implemented for this format.

texts:
I am trying to build a proximity raster on another raster (.tif) using the proximity (raster distance) tool in QGIS 2.18. I select the file, specify the target value, but when I try to run it I get the following error code:

ERROR 6: GDALDriver::Create() ... no create method implemented for this format.
Traceback (most recent call last):
File "C:\PROGRA~1\QGIS2~1.18\bin\gdal_proximity.py", line 167, in
dst_ds.SetGeoTransform( src_ds.GetGeoTransform() )
AttributeError: 'NoneType' object has no attribute 'SetGeoTransform'

What is wrong?


texts:
I collect data on birds in my city. In my column, I have the Names of the Birds, their scientific name and their abbreviation.
Now I am searching for a simple solution to simplify the work. I would like to have an automatic fill-in of the columns. So if I write in the first column "Robin" in the second column automatically appears "Erithacus rubecula" and in the third "R".
Is it possible?


texts: How to build a loops for gdal WriteArray()?

texts:
I feel the gdal WriteArray() is so tedious.First, Create(file),then prj, last WtriteArray(arr). Now the problem is how to write many rasters? Because it need to create file first and then write array. How to build a loop for variable arr? For example:
now I got some array varaibe r1, r2, r3....

driver=gdal.GetDriverByName('GTiff')
outfilename=['r1.tif','r2.tif','r3.tif'......]
for filename in outfilename:
    outfile=os.path.join(outpath,filename)
    outdataset=driver.Create(outfile,cols,rows,1,3)
    geotran=data0.GetGeoTransform()
    outdataset.SetGeoTransform(geotran)
    proj = data.GetProjection()
    outdataset.SetProjection(proj)
    outband=outdataset.GetRasterBand(1)
    outband.SetNoDataValue(-32768)
    outband.WriteArray(r1)          #how to build the loop in this line?
    outband=None
    outdataset=None
print('Done')


texts: Can't export a polygon shapefile to MySQL using ogr2ogr?

texts:
I am having problems with ogr2ogr and keep getting different versions of the error:

ERROR 1: MySQL error message: The used table type doesn't support SPATIAL indexes.
Description: ALTER TABLE 'test_poly' ADD SPATIAL INDEX('SHAPE')

my command (entering it in FWTools Shell) is:

ogr2ogr -f "MySQL" MYSQL:"test,host=27.0.0.1,user=root,port=3306" -nln test_poly -a_srs "EPSG:3857"  -update -overwrite

...adding '-lco GEOMETRY_NAME ' doesn't do anything...
...also moving the  ti tge ebdm behind -lco engine=MYSIAM does nothing...

All I see is the tables 'geometry_columns' and spatial_ref_sys' and 'test_poly' being created...but no data *(i.e. when I use "Select Rows - Limit 1000").

What am I missing?

I am a bit new to MySQL...but I read as much documentation as I could find...I thought I could set the spatial index by going to Engine: MYSIAM....am I wrong?


texts:
I'm working with this CRS: "EPSG:32632 - WGS 84 / UTM zone 32N - Projected" in a Qgis3.4 (long term release) version. When I try to add a raster file with this CRS:"EPSG:25833, ETRS 1989 UTM Zone 33N" it doesn't overlay properly with the other layers. What I did is to polygonize the raster and then converting the resulting vector layer into another CRS (by export and save as ESRI shapefile). Nothing again.

This Qgis version has the 'On the fly' enabled by default.

Any help or ideas?


texts:
I downloaded European-wide DTM from https://land.copernicus.eu/imagery-in-situ/eu-dem/eu-dem-v1.1/view

I obtained the NUTS level 3 shapefile from: https://ec.europa.eu/eurostat/de/web/gisco/geodata/reference-data/administrative-units-statistical-units/nuts

Now I would like to calculate the following statistics per NUTS-3 code:

the standard deviation of elevation
average height of the area

How would I go about to do this in QGIS? Please also note that the DTM data is very large (~45 GB). So also any advice on how to handle such large file be appreciated as well!


texts: How to calculate stream order in GRASS 7.0.2?

texts:
I would like to calculate Strahler's and other stream hierarchy from my input raster but I am not sure how.
This manual suggests tat I should use r.stream.order command, however in version 7.0.2 "order" is not a recognized command.


texts: I'm relatively new to QGIS, only started using it a couple months ago and I'm not really experienced with much of anything. I'm currently editing the natural earth world map to be more accurate to satellite imagery. I can edit any islands as I wish, but for some reason I can't edit any of the larger landmasses; Africa, South America, etc. I can select the polygons, but they don't even show up for me to click on and edit. Whenever I hover over any landmass, it shows its name as nothing more than "Land", so it seems that every single continent in the map is packed together, which might have something to do with it. I'm sorry if I didn't really explain myself well, I'm very new to this and don't really know how everything works. I'm just trying to figure out how to fix this.


texts: How to modify 2 raster images to have the same resolution?

texts:
I have data for 2 rasters images that have different resolutions:

z downloaded from trmm
An MSAVI2 output image.

For calculating the correlation between them, the data has to be in the same resolution. I have tried reproject in erdas but the result that I got was not z correct.

How can I do this? Or how to do this with the resample command in arcgis?


texts: Showing selected entities on a Leaflet map from onclick action within a

texts:
I have displayed a layer of points using Leaflet. Here is my script embedded in the HTML code :

var map = L.map('map', {
                center: [45.7604276, 4.8335709],
                zoom: 13
                });
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
              attribution: '© OpenStreetMap contributors'
}).addTo(map);
$.getJSON("personnes.geojson", function(data_point){
L.geoJson(data_point).addTo(map);})

Outside the box of the map, I got some  sections that I would like to connect with my map e.g. show selected entities in a certain color on my Leaflet after an onclick action in my  box.

Any ideas?


texts: Using web mapping and geocoding to track genealogical data

texts:
Over the last year I have gotten involved in researching my family tree. My paternal grandfather came from a remote island in the Atlantic, along with hundreds of others of his generation, and many of them settled within the same area. As the island is very small, they shared a small number of family names (about 30 surnames, with some variations of the same name).

I would really like to use my GIS knowledge to firstly gather data on where the descendents are living now (the recently established Society has compiled a small database), and then to analyse the data to map out the various family names/bloodlines/races (the islanders are a melting pot of races, absolutely fantastic).

Before I offer my services to the Society, I'd like to know if anyone has undertaken something similar, and what would be the best way to approach it? As mentioned in the question title, I want to use ArcGIS Online so that others will be able to add their info and I would manage the data. Some light googling indicates that geocoding surnames might be part of what I am looking for, but as I have no experience with it I'm not sure.


texts: Accessing feature legend style name using QGIS?

texts:
I have a vector layer classified by some combination of field values.
I want to add a field for each feature, filled with the legend style name of the element.

How can I do this? via Function Editor?


texts:
I've pondered for a while whether I should ask this question.  I even asked whether I should ask a question that should probably be a community wiki on the meta site.

Since I didn't get many responses, and the one I did get didn't really explicitly say I shouldn't ask it, I’m going to go ahead and ask it anyway:

How are you, as GIS professionals, spending most of your day at work?

That is, what GIS tasks do you perform to get your job done?  I’m curious how my day-to-day activities compare to others in the field.

These are some examples of how I spend my GIS work (feel free to add others):

Cartography – creating new maps, or modifying others
Scripting/Tool Building
Research
Data Edits/Cleansing
Analysis (vector)
Analysis (raster)
Meetings
Visiting GIS.stackexchange.com

Also feel free to add a percentage of your time on different tasks, if you're so inclined.


texts: Feature Class to Feature Class using os.walk, fnmatch and renaming

texts:
I have a script for traversing a directory tree and finding shapefiles with a particular name.  The issue I'm having is that the shapefiles are named improperly for databasing i.e. 20160527_Whatever.shp (total of 24 characters).  The script is supposed to remove the date from the beginning, and add it to the end for the filename.  Currently it outputs the same filename over and over again and fails.  Snippet of the portion failing below (haven't done a lot of string parsing)

import arcpy, os, fnmatch
from arcpy import env

env.overwriteOutput=True

rootDir = "whatever directory"
search = "whatever criteria"
outGDB = "whatever GDB"

shpLst = []
for root, dirs., files in os.walk(rootDir, topdown=True):
    for filename in fnmatch.filter(files, search):
        shpLst.append(os.path.join(root, filename))

for fc in shpLst:
    outName= (os.path.basename(shpLst[0][-30:-4]) + "_" + os.path.basename(shpLst[0][9:-31]))
   arpy.FeatureClassToFeatureClass_management(fc, outGDB, outName, "", "", "")
   print outName + " sent to " + outGDB

As I said, the above outputs the same exact file name every time, so I'm guessing it's a problem with the way I'm parsing the string?


texts: How to overlay map onto a corner of an image, using that image's GPS exif data?

texts:
I have several hundred JPG images taken during a time lapse of a drive, with each image containing embedded GPS information.

Is there an OS X friendly workflow that can allow me to:

create a highway map image (say a 300x300 pixel Google map representing approx a 3mi x 3mi area) centered around the geo coordinates taken from the embedded GPS exif data of that image
overlay that map image onto the corner of the original image, and
repeat for all images in the time lapse sequence.

I think with a combination of ImageMagick and shell scripting, I can probably do (2) and (3), but I don't know how to do (1).


texts: OSRM API - nearest point fed into routing

texts:
I am using the OSRM API to (1) determine the nearest point on a road segment from a give random point with

http://server:5000/nearest?loc=_lat_,_lon_

The returned coordinates are used then as an input to (2) determine the route between this point and an other give point on a road segment with

http://server:5000/viaroute?loc=_lat1_,_lon1_&loc=_lat2_,_lon2_

Every now and then the point determined in step (1) is located on a non routable road (e.g. private road).

I am looking for a way to work around this problem.

a) Is there a way to determine in step (1) the next closest point on a different road segment or only query road segments on routable roads.

or

b) Is there a way that the routing query in (2) automatically determines the next closest routable point?

I am also open for different solutions. However I am not interested in setting up my own server with pgrouting or similar services. I like to solve it with an open source routing API (preferable with the OSRM one).

The request is done from a python script (requests and json).


texts: Errors uploading plugin to QGIS python plugin repository

texts:
I'm trying to upload my first plugin to: http://plugins.qgis.org/plugins/add/

I keep getting the following error:

  There were errors reading plugin package (please check also your plugin's metadata). Package name must start with an ASCII letter and can contain ASCII letters, digits and the signs '-' and '_'.

My package name is "DEMTools" and I've checked the plugin's metadata file, but everything looks to be in order. This error message doesn't give me a lot to go on and I've never uploaded a plugin before. Are there some common issues I should look for or is there some detailed guide to preparing a plugin package for upload? (I don't need help with creating the plugin just uploading it to the Plugin Repository. I used Plugin Builder to create the plugin and it runs fine on my local machine.)

Thanks for any help you can offer.


texts: How to integrate .NET application in QGIS using Python?

texts:
In our company we have developed a .NET application that's now integrated with 3 different GIS platforms. Now we would like to make it work with QGIS but we need some help on getting started. I've been thinking of using callbacks and I've looked at this posting on NathanW's blog but I can't make it work in QGIS.

Any ideas?


texts:
I am trying to install my Garmin device (garmin gps 18x usb) so that I can use it in ArcMap, but always I am having the following error.

  Unable to detect GPS device on COM ports supported by the hardware.
  Make sure Your GPS is turned on, connected properly, and sending data.
  Also review the Baud rate, Stop bits, Data bits, Parity settings for
  the port on this dialog.


texts: Making two functions and then combining them in ArcGIS Network Analyst?

texts:
I am new in the VBScript world, so I am really confused with programming.
I need to do this expression in my evaluator in my Network Analyst.
Basically I am adding a "cost" that is my percentage of primary roads, where:

TIPO 0 = Primary roads
TIPO 1 = Secondary Roads
TIPO 2 = Tertiary roads

So the equation should be really simple: Primary Roads/(Total Roads)

In that Way, I made this Field Evaluator

 The value is: C

My script is:

Dim A

If [TIPO] = 0 Then

 A = [SHAPE_Length]

elseif [TIPO] = 1 Then

 A = [SHAPE_Length]

elseif [TIPO] = 2 Then

 A = [SHAPE_Length]

end if

Dim B

If [TIPO] = 0 Then

 B = [SHAPE_Length]

elseif [TIPO] = 1 Then

 B = 0

elseif [TIPO] = 2 Then

 B = 0

end if

Dim C

C = A / B

return

The value is: C
What happens is that even that the field Evaluator shows has okay(without errors), the when calculating the field, it shows 0 has an answer, and sometimes show an error messagem when I try to rebuild my network.


texts: How to add types of markers to the map in OpenLayers 3

texts:
I am looking for example of how to add markers of different type (different images) using OpenLayers 3.

This is my code:

iconStyle = new ol.style.Style({
            image : new ol.style.Icon(({
                anchor : [ 0.5, 46 ],
                anchorXUnits : 'fraction',
                anchorYUnits : 'pixels',
                opacity : 0.75,
                src : '/icon.png'
            }))
        });
vectorSource = new ol.source.Vector({
            features : []
        })
vectorLayer = new ol.layer.Vector({
            source : vectorSource,
            style : iconStyle
        });
map.addLayer(vectorLayer);

I can't seem to have more than one icon. For example if user clicks on map, marker from one source is displayed, and when he enters an address, a marker form another source is displayed.

How this should be managed? Do I nee to create multiple iconStyle, vectorSource and many vectorLayer attached to map?


texts: Creating time-space map by distorting city-points polygons using QGIS?

texts: I've already 3 main layers on shp in qgis: the points of some places, the cities polygons and a grid of 10km, as you can see on the image. I would like to distort the map using time values to modify the distances as the reference below. How can I do it?


texts: Batch Clipping in ArcGIS Desktop using ArcPy?

texts:
I've come across a few similar questions for older versions of ArcGIS, but haven't found a suitable answer for ArcGIS 10.

I have two polygon shapefiles that cover a large area (e.g. an entire State/Province). The first shapefile represents land cover for the entire State and the second represents 50 individual watersheds. I would like to clip the land cover shapefile based on each watershed (each has a unique name stored in a field). I would then like to save the output clipped files (one for each of the 50 watersheds) using the watershed name.

Given that there are 50 clips to be performed this process is a great candidate for batch processing.


texts: Horizontal only line thickness in ArcGIS

texts:
Is there a way so line thickness only expands horizontally from the centreline? I am making a road condition map and found it may not be truly representable.

The red on the left overlaps the yellow (I do have a draw order of 'worse' first so it stands out more).

But would it be possible to have it so it is more of a rectangle of line width rather than a rounded rectangle? Or is the vertical extent of the line where it actually ends?


texts: how to multiply and group values of NDVI in Erdas

texts:
I have downloaded the MODIS data for calculating the NDVi but the ranges of values in its attribute table ranges from -32768 to 9830  i want to club the similar values upto 2 decimal places and  also want to multiply these values with scaling factor of 0.0001

Could somebody please help by expalining me how to do this in erdas


texts: Different basemaps in OL-Cesium side-by-side example

texts:
I have an application that has two maps that are linked: a normal map on the left and a globe on the right. The application is based on the example olcesium side-by-side example.

I would like to use OSM on the map but satellite imagery on the globe. How do I assign a different basemap to the globe?

The way I understand this, both are directly linked, which means if I change something in one of them, the other one will be changed as well. But in my case I would like to use different basemaps.

The globe was created just like in the example, map being my original OpenLayers map, and map3d the div that holds the globe:

var ol3d = new olcs.OLCesium({map: map, target: 'map3d'});


texts:
I am working on Ubuntu 18.04 with PROJ 4.9.3 and GDAL 2.2.3 (installed from the ubuntu-gis PPA).

In a previous question on Hammer's projection in QGIS it was concluded that with older PROJ versions the inverse of this projection was not implemented and therefore not supported by GDAL. However, with the software versions I have installed, GDAL still does not support Hammer's projection.

An example with PROJ applying Hammer's projection and its inverse:

$ cat wgs.md
15 -15
$ cs2cs +init=epsg:4326 +to +proj=hammer +lat_0=0 +lon_0=0 +datum=WGS84 +units=m +no_defs  wgs.md > hammer.md
$ cat hammer.md
1625591.45      -1668538.36 0.00
$ cs2cs +proj=hammer +lat_0=0 +lon_0=0 +datum=WGS84 +units=m +no_defs +to +init=epsg:4326 hammer.md
15dE    15dS 0.000

Trying the same with GDAL:

$ gdaltransform -s_srs "+init=epsg:4326" -t_srs "+proj=hammer +lat_0=0 +lon_0=0 +datum=WGS84 +units=m +no_defs" wgs.md
ERROR 1: Translating source or target SRS failed:
+proj=hammer +lat_0=0 +lon_0=0 +datum=WGS84 +units=m +no_defs

Why is GDAL failing to use this projection?


texts: How to find the area with most intersection for buffer regions?

texts:
Find the area with the most intersection

  This question relates to previous question asked - How to find the intersection areas of overlapping buffer zones in single shapefile?.  I  tried to find the region which intersects the most. I managed to break my original shapefile into polygon parts and now trying to find the part which intersects the the most with the original to output area of interest in the center. Anyone willing to help me understand where the problem lies or has an alternate way of finding the region of interest?

# creation of the new shapefile with the intersection
for i in threshold:
    with fiona.open("threshold_buffer_test_"+str(i)+".shp","r") as layer1:
        with fiona.open("threshold_buffer_test_"+str(i)+".shp","r") as layer2:
            # We copy schema and add the  new property for the new resulting shp
            schema=layer2.schema.copy()
            schema['properties']['uid'] = 'int:10'
            # create an empty spatial index object
            with fiona.open("intersection_region_"+str(i)+".shp","w","ESRI Shapefile",schema) as layer3:
                index = rtree.index.Index()
                # populate the spatial index
                for feat1 in layer1:
                    fid = int(feat1['id'])
                    geom1 = shape(feat1['geometry'])
                    index.insert(fid, geom1.bounds)

            # get list of fids where bounding boxes intersect
                for feat2 in layer2:
                    geom2 = shape(feat2['geometry'])

                    for fid in list(index.intersection(geom2.bounds)):
                        if fid!= int(feat2['id']):
                            feat1 = layer1[fid]
                            geom1 = shape(feat1['geometry'])
                            if geom1.intersects(geom2):
                                print 'hello world'
                                props = feat2['properties']
                                props['uid'] = feat1['properties']['uid']
                                layer3.write({
                                    'properties':props,
                                    'geometry':mapping(geom1.intersection(geom2))
                                    })

  Original buffer shapefile

  Polygonized shapefile (parts)

  Area of interest in center (intersects the most with the original polygons)


texts: Using gdal ReadAsArray or Arcpy.RasterToNumPyArray on python 2.6 32bit without it crashing

texts:
I am trying to run ReadAsArray on an entire raster and on a single band, python will crash without an error message when trying to do either.

Is there a way I can create a 3d array without having to make the switch to 64bit python?

I was trying to use arcpy.RasterToNumPyArray but that would also crash. It works with a .TIFF file but not with a .PIX file. I need it to work with a .PIX file. I would rather use arcpy and not have to install gdal on the other machines at work. With that being said if gdal is the only option I am okay wit installing it. The image im working with is a 65mb pix file
Even if I try the following it will close:

    raster_array.ReadAsArray(0,0,10,10)


texts:
I have a map of an area and georeferenced photos. I need to be able to bring the pictures as points and then be able to click at a certain point and an image pop up.

I have revisited this issue, i managed to get this far but the pop up doesn't work.

See image:


texts: Where to get OpenLayers plugin compatible with QGIS 2.14?

texts:
I'm trying to download OpenLayers Plugin - 1.1.0  from

http://plugins.qgis.org/plugins/plugins.xml but I'm getting something like this in settings

Where can I get an OpenLayers plugin compatible with QGIS 2.14?


texts:
Topology will not identify overlapping polygons using qgis 2.18 Error: otb was not found or is not correctly installed.

I promise this tool worked yesterday just fine. Today it won't work due to the above error. I installed OSGeo4W on its own and in the processing toolbox in qgis I set the  file to what you can see in the image. What am I doing wrong?


texts: how to extract network of city routes from city blocks shapefile?

texts:
I have a shapefile which contains urban blocks. So, I am going to extract network shapefile of city routes and calculate total length of network arcs. I am using ArcGIS 10 for this work. Are there any tools for this work?

My idea is to use ArcMap tools that can process city blocks and draw routes arc in gap between block parcels of cities!!

If the question is unclear please tell me to describe more.


texts: Unable to set raster surface resolution in ArcScene?

texts:
I have a 3-band subset of a Landsat image which I want to display in ArcScene (of ArcGIS version 10.2.1).

The image is 30 meter resolution and I am draping it on a 25m resolution Aster DEM. But have problems with the resolution.

Whether I set the cell size to 25m, 30m, 1m or 1000m, the result is always 6o meter pixels! Rendering the image in a high quality does not help.

Did anyone experience this and is able to help?

I do exacty that - but don't get the expected result.

Setting the surface resolution:

Rendering at the highest quality:

Result:

Do you have any suggestions?


texts: Create Plugin for Qgis 2.10 by using Eclipse

texts:
I finished creating my plugin and then compiled it.

I have : Myplugin.py, Myplugin_dialog.py, Myplugin_dialog_base.ui

Is it in the Myplugin_dialog.py that I'm supposed to create new functions and add signal/slot for the components of the dialog?
How can I call the components, for exemple a QComboBox of the Myplugin_dialog_base.ui ?


texts: Can vector layer get start point and end point of line using PyQGIS?

texts:
I want to make a buffer on the start or end point of the line and not the line itself.

Is there some thing in QGIS python plugin development that can get me the points?


texts:
I'm trying to convert punctual values from lat/long to EPSG:6372, a projection for Mexico, defined by the Instituto Nacional de Estadística y Geografía (INEGI). I found a converter online but somehow when uploading the converted values as a delimited text layer, the values appear to be displaces upwards (they should be on the map), as shown in the image. Does anybody knows why?

Thanks in advance.

PD I use QGIS 1.8.0


texts: Merging/Compressing attributes in a single vector shapefile QGIS

texts:
Using QGIS v 2.18.10
I'm currently working with a vector shapefile that represents zones in a municipality. I've had to create and edit polygons representing these zones. I'm looking to compress/simplify my attribute table so that each zone appears in the attribute table once.

For example, in the image above the attribute value "Residential Scheme Area" is there several times, I want that value to be there only once.


texts:
I'm new to pyqgis so I may be headed in the wrong direction on this. I imported qgis on python consolde in qgis, no problem. However when I try to do this in PythonWin, I get an error saying the module does not exist. I tried os.listdir for all folders where QGIS is installed and can't find the module anywhere. Need to write a stand alone script in a batch process so I can't use the QGIS python console. Is there something I'm missing?

Here is import from QGIS console:

    import qgis
    help(qgis)
    Help on package qgis:

    NAME
        qgis

    FILE
        c:\progra~2\qgis2~1.14\apps\qgis-ltr\python\qgis\__init__.py

    DESCRIPTION...

and here is the error from PythonWin:

import qgis
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
ImportError: No module named qgis


texts: How to count points intersecting with the end of a multilinestring?

texts:
I need to count points from table1 that intersect with the lines in table2 which has about an equal split between linestrings and multilinestrings.
Intersect works fine, but the thing is that I need to differentiate between points that intersect in the middle of the line and in the ends (or starts) of the lines.
To do this, I have created the query:
 select id,
( SELECT count(*) FROM table2 b WHERE st_intersects(a.geom), b.geom)) AS total_intersected_points,
 ( SELECT count(*) filter (where st_intersects(st_endpoint(a.geom), b.geom ) or st_intersects(st_startpoint(a.geom), b.geom ) )
       FROM table2 b WHERE st_intersects(a.geom), b.geom)) AS intersected_startpoints,
 ( SELECT count(*) filter (where not st_intersects(st_endpoint(a.geom), b.geom ) AND NOT st_intersects(st_startpoint(a.geom), b.geom ) )
       FROM table2 b WHERE st_intersects(a.geom, b.geom)) AS intersected_midpoints
 from table1 a

This works absolutely fine for linestrings, but for multilinestring geometries while I get the accurate count for the first count column, it just returns a zero for the 2nd and 3rd count columns.
Going through the documentation, it seems that st_endpoint and startpoint used to work on multilinestrings but no longer do so for some reason. There is no way I can separate table1 into full linestring because I need to use the full geometry which often branches out or has separated segments.
Is there still a way to tackle this and count all the ends of multilinestrings?


texts: No texture after Importing .dae COLLADA to ArcScene?

texts:
I'm attempting to export a .dae collada file from Photoscan to ArcScene 10.1. I've followed instructions from a couple of sources, created the file geodatabase, imported the file as a multipoint feature into the geodatabase, however, after import the mesh shows fine but without the texture detail: just a solid block of colour. I've checked and haven't imported as a shapefile by mistake. I can't work out why Arcscene isn't 'seeing' .jpg texture file which is located alongside the .dae file. Works fine when i export from Photoscan to Meshlab.

I've checked online and people seem to have similar problems with .dae files in different pieces of software incl. Blender, as well as ArcGIS.

Is there any way to link the mesh to the .jpg in ArcScene?


texts:
In Portal for ArcGIS, I have 100 user limit.

I know that Portal can take users information from LDAP or any 3rd provide software which stores users information.

If I have 101 users in LDAP, and portal user limit is 100, will Portal take more users than 100?


texts: Python support with QGIS 2.4 on Ubuntu 14.04

texts:
I recently updated my Ubuntu system to version 14.04. I added the sources and installed QGIS as per the directions on the QGIS website. Everything looks good, except for I do not have all the available plugins listed that I do on my windows installation. I haven't been able to recreate it again in order to take a screen capture, but I received an error that there is not python support.

I have not been able to find much through we searches on the topic. So, does anyone know of a way to install Python support for QGIS Ubuntu? Or is this likely a bug related to 2.4's relative newness?

Update

A screenshot of errors on startup

and a screenshot of the settings tab in the manage plugins UI


texts: Should I Reproject Data Which Has Been Captured Incorrectly?

texts:
I'm working on a project for a client which is migrating data from an Oracle database to an ESRI Geodatabase.  When data for this project was initially captured over 15 years ago, the coordinate system used was either UTM Zone 56 South or GDA94 MGA Zone 56 because much of the data was for South East Queensland, Australia.  However, as the company grew, they continued to add data further west and maintained the same coordinate system.  The data now extends as far west as Darwin, Australia which is in Zone 52.

My instinct is to reproject the data to GDA94 Lat/Long.  However, I'm not sure if this will make things worse or better.

I have two questions:

How much error is in the data which is 4 zones out (i.e. in metres/kilometres)?
Will I introduce more error by reprojecting the data to GDA94 Lat/Long?  Or is this the right approach?


texts: Shortest road route calculation on OpenLayers GeoDjango

texts:
I have created a web based GIS application using Django, Mapnik, Mapproxy, OpenLayers 6. Now I need to develop a shortest path(road distance) between two points selected by the user.  What is the best solution for the development? I have installed PostgreSQL and created a network topology by added two columns namely source and target then executed the select query with function pgr_createTopology.
I am using SRID 32643 and data in UTM format. Then to find route between two point I have executed the below query:
SELECT seq, node, edge, cost as cost, agg_cost, ST_AsText(the_geom)
FROM pgr_dijkstra( 'SELECT gid as id, source, target, st_length(the_geom) as cost FROM
gistrack_roads', (
    SELECT source
    FROM gistrack_roads
    ORDER BY ST_Distance(
                    ST_StartPoint(the_geom),
                    ST_SetSRID(ST_MakePoint(715511.9, 938165.3), 32643)
                ) ASC
            LIMIT 1
        ), (
            SELECT source
            FROM gistrack_roads
            ORDER BY ST_Distance(
                    ST_StartPoint(the_geom),
                    ST_SetSRID(ST_MakePoint(717022.4, 938451.4), 32643)
                ) ASC
            LIMIT 1
        )
    ) as pt
    JOIN gistrack_roads rd ON pt.edge = rd.gid;

but not getting the correct result.Getting empty records.
I have followed the  tutorial
https://blog.daftcode.pl/find-your-way-with-the-power-of-postgis-pgrouting-66d620ef201b


texts: Resizing a Raster (Row and column values) using GDAL in Spyder

texts:
I'm trying to extract the LST values from MODIS daily LST product for 3 months. So I'm Using Timeseries analysis to extract multi raster values to a point shapefile. The main problem here is that the size of the raster is too high for this process, i.e; The row and column values are (351,545) so the code is not running for such high values.
If there is any code to resize the rasters using python, please let me know. I'm new to programming.


texts:
I read an ADF file in R:

 kommuner <- raster( "../../../10-Data/Kommunne_i_Norge_2000/Kommuner2000_100m_100m/100x100_2k/w001001.adf" )

It contains three attributes:

> kommuner

  class       : RasterLayer

  dimensions  : 14903, 11906, 177435118  (nrow, ncol, ncell)

  resolution  : 100, 100  (x, y)

  extent      : -75900, 1114700, 6449500, 7939800  (xmin, xmax, ymin, ymax)

  coord. ref. : +proj=utm +zone=33 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0

  data source : /path_to/w001001.adf

  names       : w001001

  values      : 1, 435  (min, max)

  attributes  :

   ID COUNT  OBJ

  from:   1 63390 0101

  to  : 435 26048 0903

Now, the question is how I can access the OBJ feature in an easy way. By easy I mean something similar to how I would access a column in a data frame, such as DF$OBJ. Could you help?

Secondly, I would like to create a new attribute that is linked to OBJ. Let's call it NI. How can I create the NI attribute, say, let NI = 4 + OBJ * 5?

Lastly, I would like to run a regression with the NI feature in this kommuner variable, which is the y-variable, against a number of other features in other variables. Could you provide an example so that I can imitate?


texts: Appropriate equal-area cylindrical projection for Southeast Asia?

texts:
Background

I am facing difficulty in selecting an appropriate equal-area map projection suitable for the geographical extent of Southeast Asia. The main resource I am consulting is Savric et al's paper in 2016 titled 'Projection Wizard – An Online Map Projection Selection Tool' and the accompanying web-based tool (https://projectionwizard.org/). The geographical extent of Southeast Asia is 92.1892776489258949,-11.0097208023069015 : 141.0117645263674149,28.5432605743409908 (in decimal degrees). I plotted a similar extent at Projection Wizard, and the results show that only one projection is suitable;

Projection details

Equal-area projection for regional maps with an east-west extent

Cylindrical equal-area PROJ.4

Standard parallel: 00º 00' N

Central meridian: 116º 06' E

My question

However, I am not entirely sure how to use this result. It sounds like this means I will have to create my own custom projection (using the standard parrallel and central meridian identified by Projection Wizard) in PROJ4 program, which I am not familiar with yet.

Is there an EPSG projection equivalent that achieves similar results?


texts: Exctract DEM by list of vertex with GDAL

texts:
How can I generate a DEM of an area given the vertex list of the polygon that includes it?

What I want to achieve is similar to the output of gdalwarp, eg:

gdalwarp -t_srs EPSG:4326 -te x_min y_min x_max y_max output_srtm.tif -te_srs EPSG:4326 output.tif

but not of a rectangle like this case but of a polygonal area, everything that is outside the polygon should be generate as nodata value.


texts:
I am very happy so see that Redis now offers a Geo API

I would like to host a service where, given a latitude-longitude pair,
I retrieve a bounding-box (of OSM) from a pgsql query.
Since I expect queries to be done in the proximity of each other, I would like to cache the bounding-boxes.

Then, given a new latitude-longitude pair, I would like to use redis to see if the query coordinates fall into a bounding-box recently queried.

Does anybody know if the Geo API of Redis supports bounding boxes.
Or maybe there is a different approach to make above task more efficient.


texts: How to make RASTER from irregular point data without interpolation

texts:
I was trying to make a raster image from an irregularly spaced point database. The data looks like-

> head(s100_ras)
         x       y         z
1 267573.9 2633781 213.29545
2 262224.4 2633781  69.78261
3 263742.7 2633781  51.21951
4 259328.4 2633781 301.98413
5 264109.8 2633781 141.72414
6 255094.8 2633781  88.90244

I want these 'z' values within a mesh which I created by

# Create a fine mesh grid
my_mesh=expand.grid(seq(min(s100_ras$Y),max(s100_ras$Y),l=100),
                    seq(min(s100_ras$X),max(s100_ras$X),l=100))

I also want the z-values to be assigned as 'NA' for those mesh points that are outside the data points. The points over the mesh looks like this: https://drive.google.com/file/d/0B6GUNg-8d30vYzlwTkhvaHBFTnc/edit?usp=sharing when I plot

plot(my_mesh)
points(s100_ras$Y, s100_ras$X, pch="*", col='blue')

The problem is that I'm not sure how to build on this, the following steps don't work because my mesh grid and data points are not of the same scale!!

library(rgdal)
library(raster)
xyz<-cbind(my_mesh, s100_ras)
r <- rasterFromXYZ(xyz)
image(r)

If I try to make a raster just by using the data points (without any mesh), R throws an error since my data is irregularly spaced!

library(sp)
s100_ras <- data.frame(expand.grid(x = s100_ras$Y, y = s100_ras$X),
                       z = as.vector(s100_ras$mean))
coordinates(s100_ras) <- ~x+y
proj4string(s100_ras) <- CRS("+proj=utm +zone=46 +datum=WGS84")
gridded(s100_ras) = TRUE

suggested tolerance minimum: 0.916421
Error in points2grid(points, tolerance, round) :
  dimension 1 : coordinate intervals are not constant

Moreover, I was trying to play with 'rasterize' function (for irregular grids) of 'raster package', but couldn't get a way with it :(. I know how to interpolate and make a regular grid, but for the sake of originality, I want to AVOID interpolation. Is it possible to make a raster of irregularly spaced data points without idw or kriging methods?


texts: Is there a public shapefile with the London Underground stations and lines?

texts:
Is there a public shapefile containing the stations and lines of the London Underground? I've been doing some intensive searching but I can only find the coordinates of the stations, or the lines in way too much detail on OpenSteeetMap.

Ideally, I want each line to have a single track, not multiple like with OSM.


texts: Seeking list of project properties that can be written in PyQGIS?

texts:
The methods QgsProject.instance().writeEntry() and QgsProject.instance().readEntry() can be used to programmatically set project properties. According to the QGIS API reference the properties correspond to those of the .qgs project file (or rather to the xml tags within it).
However, I'm interested in a compact list of all attributes that can be modified.

Is there any list which provides an overview of all properties that can be accessed using the above methods?


texts: Imposing New Projection on Multiple Shapefiles using ArcPy?

texts:
I'm trying to run a script tool in Arcmap that will reproject a number of shapefiles from the source data folder and place the newly projected shapefiles in a destination data folder.

I'm getting the following error 000732 with my arcpy script:

Here is my script (the error is coming from the final line):

import arcpy, os
from arcpy import env

source_data_folder = arcpy.GetParameterAsText(0)
out_coordinate_system = arcpy.GetParameterAsText(1)
destination_data_folder = arcpy.GetParameterAsText(2)

for (path, dirs, files) in os.walk(source_data_folder):
    for file in files:
        # find all .shp files in folder and all subfolders
        if ".shp" in file.lower()[-4:]:
            outpath = os.path.join(destination_data_folder, file)
            arcpy.Project_management(file, outpath, out_coordinate_system)

The shapefile that the error is referring to ("Class_NS.shp") is the first shapefile in the "source_data_folder".  So the script is running that far - it's finding the first shapefile, it's just claiming it "does not exist or is not supported".

The shapefile most definitely exists.

Does this mean it is not supported?

It's just a regular shapefile.

There may be errors with my code but so far the error message is not code-related.


texts: Alternative to an arcpy script for points to lines to polygons?

texts:
I'm relatively new to arcpy and python.

I have a script that creates triangular polygons given two point shapefiles of centroid points and vertexes around them. I need to run this over ~170k points, which would take more than a week at my available processing power, especially if Murphy's Law strikes during the script execution. I haven't had much luck digging through the Arcpy docs and coming up with anything that could give me the same results in less time.

Can anyone point me in the direction of a different tool chain for this if they can think of one?

Or notice anything in the code that would hamper performance?

with centroidCursor as cecursor:
    for record in cecursor:
        whereClause = "IN_FID = " + str(record[0])
        selection = arcpy.SelectLayerByAttribute_management(nearTableView, "NEW_SELECTION", whereClause) # get the all the records that have that centroid ID from the near table

    with arcpy.da.SearchCursor(selection, "NEAR_FID") as selcursor: # then append the vertex IDs to a list
        tempList = [row[0]] # create temporary list
        for selrow in selcursor:
            tempList.append(selrow[0]) # iterate though rows appending vertex IDs to list

        idNum = record[0]
        whereClause = "OBJECTID = {0} OR OBJECTID = {1} OR OBJECTID = {2}".format(tempList[0],tempList[1],tempList[2])
        selected = arcpy.SelectLayerByAttribute_management(cornerpoints, "NEW_SELECTION", whereClause) # select the vertexes from the list
        lines = arcpy.PointsToLine_management(selected, "in_memory", Close_Line="CLOSE") # convert points to a temporary lines
        poly = arcpy.FeatureToPolygon_management(lines, workspace + "/mesh_polys/polygons{0}".format(idNum)) # then convert lines to polygons stored in a dataset

I'm going to first try going straight from points to polygons with the Geometry class. From the discussion in the comments the follow up will be one of two methods:

A - Using a layer definition query inside the nested searchCursors (I'm unfamiliar with this and it's throwing a bunch of different errors as I'm working with it after FelixIP pointed me in it's direction).

B - creating a custom table with some kind of relevant information tied to the cursor_ID (vertex geometry, perhaps?).

I now understand what the definition queries do and they are absolutely faster.

 whereClause = "OBJECTID IN ({0} , {1} , {2})".format(tempList[0],tempList[1],tempList[2])
 cornerpoints.definitionQuery = whereClause
        selection = cornerpoints
        lines = arcpy.PointsToLine_management(selection, workspace + "/mesh_lines/line{0}".format(row[0]), Close_Line="CLOSE")# convert points to a temporary lines

However, I'm now getting this error when I try to run the script:

ExecuteError: IOError: "GPL0" does not exist

There's very little about what can cause this error that I can find. Anyone know what I'm missing?


texts:
I have a large polygon shapefile with individual features with multiple lines intersecting these (see photo).

I am trying to find the point along the line where the summation of the polygons connected by the line upstream is equal or greater than a certain value.

Polygons were created from another programme and they are not in any kind of order, there is 200+ so would be time consuming to give each a logical ID. I've created an ID column to show which line they are connected too.


texts:
My project is set as WGS84, my layer too.

I have re-projected it. I have copied my layer. I have used "Add Geometry attributes," choosing the right CRS, but I'm still having my coordinates in meters!

Any new ideas?

Layer information

Información del proveedor

Almacenamiento
ESRI Shapefile
Comentario

Codificación
UTF-8
Geometría
Point (Point)
SRC
EPSG:4326 - WGS 84 - Geográfico
Extensión
369138.2846000003628433,6129075.0881999991834164 : 849050.3508999999612570,6663955.9552999995648861
Unidad
grados
Número de objetos
2.901


texts: Resolving "Dictionary does not contain key" error applying function to feature collection in Google Earth Engine

texts:
I am adding two properties to each feature in a feature collection based on two images within each feature, currently represented as properties themselves. I got this feature collection through performing an inner join on two image collections. To add them, I am running this function:
var innerJoined = innerJoin.apply(perpSum, finalSent2, filterTimeEq);

var test = innerJoined.map(function(feature) {
  var percObs = ee.Image(feature.get('primary')).reduceRegion(
      {geometry: studyArea.geometry(), reducer: ee.Reducer.median(), scale: 30}).get('precipitation');
  var NDTIObs = ee.Image(feature.get('secondary')).reduceRegion(
      {geometry: nilo, reducer: ee.Reducer.median(), scale: 30}).get('NDTI');
  return feature.set('precipitation', percObs).set('NDTI', NDTIObs.get('NDTI'));
});
print('test2', test2);

However, when I run the code, I get this error:
FeatureCollection (Error)
Error in map(ID=74_74): Dictionary.get: Dictionary does not contain key: precipitation

When I've been debugging, I've found that if I just take 1 feature and apply a similar version of the code that is in the function, I don't get the error, and the value I want gets added to the feature properties:
var feat = innerJoined.first();

var percObs = ee.Image(feat.get('primary')).reduceRegion(
      {geometry: studyArea.geometry(), reducer: ee.Reducer.median(), scale: 30}).get('precipitation');
var test1 = feat.set('precipitation', percObs);
print('test1', test1);

Because I can get around this issue if I do not use the function, I think it is the function that is causing the problem. However, I haven't found a precedent for this problem yet, or anything in the documentation that I have found helpful. Is the function the problem, or I am I doing something in the single addition of the property that I am not doing in the function?
If you want to see the full code that is commented out, you can do so here: https://code.earthengine.google.com/8e2656ba08560e002e422b1a05aaa555
To see the issue area please scroll to the bottom with the area marked "Focus area"
Thanks for your help!


texts: Disabling Toolbar in Layout View using Python AddIn of ArcPy?

texts:
I'm trying to disable a toolbar with nested menus and buttons when an mxd is in layout view, but it's not working.  I also get no output in the ArcGIS python window when I switch to layout view.

Anyone have any ideas?

Using: ArcGIS 10.2.2, Python 2.7

Code:

import arcpy
import pythonaddins

class FishButton(object):
    """Implementation for WTF_addin.fish_button (Button)"""
    def __init__(self):
        self.enabled = True
##        self.checked = False
    def onClick(self):
        self.mxd = arcpy.mapping.MapDocument('current')
##        layer = r'\\msds.wv.de\dfsroot\HV\GROUP\Gis\DATEN\wvdat\Querbauwerke\Fischaufstieg.lyr'
        layer = r'G:\Gis\DATEN\wvdat\Querbauwerke\Fischaufstieg.lyr'
        activeDataFrame = self.mxd.activeView
        df = arcpy.mapping.ListDataFrames(self.mxd, activeDataFrame)[0]
        if arcpy.Exists(layer):
            layerToAdd = arcpy.mapping.Layer(layer)
            arcpy.mapping.AddLayer(df, layerToAdd, 'TOP')
        else:
            warningButton = pythonaddins.MessageBox("Die Datei ist nicht verfugbar.\nBitte kontaktieren Sie die GIS Abteilung.", "Datei nicht verfugbar", 0)
        pass

class changeToolState(object):
    """Implementation for WTF_addin.disable (Extension)"""
    def __init__(self):
        # For performance considerations, please remove all unused methods in this class.
        self.enabled = True
    def activeViewChanged(self):
            mxd = arcpy.mapping.MapDocument('current')
            active_view = mxd.activeView
            if active_view == 'PAGE_LAYOUT':
                WTF_toolbar.enabled = False
                print 'button has been disabled...'
            else:
                WTF_toolbar.enabled = True
                print 'button re-enabled...'
            arcpy.RefreshActiveView()
            return

And the corresponding config.xml:

<ESRI.Configuration xmlns="http://schemas.esri.com/Desktop/AddIns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Name>WTF</Name><AddInID>{8ed28a7b-5aa3-4474-baa5-7674acbb350a}</AddInID><Description>New Addin</Description><Version>0.1</Version><Image /><Author>Untitled</Author><Company>Untitled</Company><Date>04/27/2016</Date><Targets><Target name="Desktop" version="10.2" /></Targets><AddIn language="PYTHON" library="WTF_addin.py" namespace="WTF_addin"><ArcMap>
    <Commands>
        <Button caption="Fish" category="WTF" class="FishButton" id="WTF_addin.fish_button" image="" message="" tip=""><Help heading="" /></Button>
        </Commands>
    <Extensions>
        <Extension autoLoad="true" category="WTF" class="changeToolState" description="" id="WTF_addin.disable" name="Disable" productName="Disable" showInExtensionDialog="true" />
        </Extensions>
    <Toolbars>
        <Toolbar caption="WTF_Toolbar" category="WTF" id="WTF_addin.WTF_toolbar" showInitially="true"><Items><Menu refID="WTF_addin.cat_menu" /></Items></Toolbar>
        </Toolbars>
    <Menus>
        <Menu caption="Category" category="WTF" id="WTF_addin.cat_menu" isRootMenu="false" isShortcutMenu="false" separator="false"><Items><Button refID="WTF_addin.fish_button" /></Items></Menu>
        </Menus>
    </ArcMap></AddIn></ESRI.Configuration>


texts: How can I tell a GP model that exports a dbf to NOT add it to the 'List by Source' window?

texts: I have a GP Model that simply exports a selected points lat and long to a DBF.  I would like to make it so it does not add the table to the list by source window as it hangs for an annoying amount of time and I do not need to use the exported table in the map anyway.


texts: Creating TIN says Maximum number of data points has been reached?

texts:
I am trying to create a TIN layer based off of a DEM. I watched a video about going to the "Base Height" section of the layer properties and selecting "Floating on a custom surface" to create a terrain model.

However, every time I have tried making a TIN, I get:

  Maximum number of data points has been reached

I looked at these two sources, and performing their suggestions still didn't help me create a TIN:

Converting raster to TIN and large section did not convert properly?
https://geonet.esri.com/thread/56678

I'm just wondering why it is not working. I have tried changing the maximum number of points, the z value, converting the raster to multipoint then to TIN, and creating a terrain to turn into a TIN. None of these processes worked for me.

Is my data too big to create a TIN in ArcScene?

It is 2.16 GB.


texts: Error when slope creating using ASTER 30m DEM

texts:
I have tried to create a slope map using ASTER 30m DEM obtained from internet. But when I use it to create (using ArcGIS 10 & 3D Analyst) a slope raster, the output is only 0-89 range.

My projection is KANDAWALA__CEYLON BELT METERS. I have tried to use the original projection of ASTER global DEM (WGS 84), but it also gives the same error. What should I do to correct the issues and have a slope map?


texts:
Hello this is my first post. I'm new with openlayers and geoext and i'm facing a problem while trying to add a new record in a point layer via wfs-t

the code is below (it is from http://workshops.opengeo.org/geoext/wfs/editing.html):

function reconfigure(store, url) {
            var fields = [], columns = [], geometryName, geometryType;
            // regular expression to detect the geometry column
            var geomRegex = /gml:(Point|Line|Polygon|Surface|Geometry).*/;
                var types = {
                // mapping of xml schema data types to Ext JS data types
                "xsd:int": "int",
                "xsd:short": "int",
                "xsd:long": "int",
                "xsd:string": "string",
                "xsd:dateTime": "string",
                "xsd:double": "float",
                "xsd:decimal": "float",
                // mapping of geometry types

                **//Here i want to put something for drawing in point layer**
                "Line": "Path",
                "Surface": "Polygon"
            };

I've tried to put "Poin": "Point", but it didn't work!
Has anybody an idea about what i have to put there so as to work with point layer too(it already works with line and polygon layers)??
Another point of the code which may cause the problem is the save function:

{
    text: "Save",
    handler: function() {
        app.featureGrid.store.proxy.protocol.commit(
            vectorLayer.features, {
                callback: function() {
                    var layers = app.mapPanel.map.layers;
                    for (var i=layers.length-1; i>=0; --i) {
                        layers[i].redraw(true);
                    }
                    app.featureGrid.store.reload();
                }
        });

Which of the two may cause the problem?
Thank's a lot!


texts: What are the rendering options for timeline animations in QGIS?

texts:
I want to animate a shapefile that has a timeline (DATE) attribute using QGIS.
The [TimeManager] plugin (http://anitagraser.com/projects/time-manager/) has been installed and provides sufficient control to step down the dbf rows as expected.

However, the simple on/off display of each frame's features is not very attractive or sensible.

I want to be able to add controls for fading (to allow a feature fade to transparent over xx time) and for showing cumulative (leave previous features visible).

Is anyone aware of a plugin or styling strategy that might help improve these animations?


texts: How to turn off tool tip for the Identify button?

texts:
When using the esriControls.ControlsMapIdentifyTool tool, the (i) button, whenever you click it, it says "Click on or drag a box over a feature and place on the map where you want to identify" in a window...

Is there a way to remove this auto tool tip?  It's totally unnecessary because if you close it and click on a point on the map it will respawn itself with real data.

I'm using ArcEngine 10, C#, & VS2010.


texts:
I have a user who is using ArcMap 10.5.1 and several times his MXD has lost layers. This has occurred in two separate documents. He will work on a map, save the map, and close out. When he opens it back up, all the layers are missing. Essentially it is a blank map document except the layout still contains legend items, title, etc. that he has added. It also, on occasion, drops all toolbars. This does not occur on opening documents from other machines. All of this is an intermittent issue, very random in nature.

His normal.mxt has been deleted and a repair on the MXD has been run. Save As and Save a copy has also been used.

Opening the document from another machine has the same result.

He's running Windows 7, ArcMap 10.5.1 Basic, and the data is a mixture of file geodatabase and shapefile.
Any thoughts?


texts: Implementing Google Analytics on ArcGIS Server?

texts: I am looking for guidance on how to add Google Analytics to my ArcGIS for Server implementation (I am using ArcGIS 10.2 for Server, and planning to migrate to ArcGIS 10.3 soon).


texts: Interpolating xyz-points to raster in QGIS

texts:
I want to interpolate xyz-point data to a raster.

x,y,z
3435339.20,5412714.28,-0.22
3435340.19,5412714.28,0.06
3435339.20,5412715.28,-0.20

I imported it as csv and saved it as shape. Then I tried the build-in TIN and IDW interpolation with z as attribute. Because I have close to 9 million points I set the output pixelsize to 10 for the trial. This should be easy and quick. I have done it before with other point data. My problem is that the TIN interpolation just causes QGIS to crash and IDW Interpolation stops at 100%, freezes and just creates a unreadable output file.

Here are the parameters for the IDW-Interpolation:

Algorithm 'IDW interpolation' starting…
Input parameters:
{ 'DISTANCE_COEFFICIENT' : 2, 'EXTENT' : '3434785.27,3439126.71,5412714.28,5420285.89 [EPSG:4326]', 'INTERPOLATION_DATA' : 'C:/.../points.shp::~::0::~::2::~::0', 'OUTPUT' : 'C:/.../raster.tif', 'PIXEL_SIZE' : 10 }

This is what I tried for the TIN-Interpolation

Algorithm 'TIN interpolation' starting…
Input parameters:
{ 'EXTENT' : '3434785.27,3439126.71,5412714.28,5420285.89 [EPSG:4326]', 'INTERPOLATION_DATA' : 'C:/.../points.shp::~::0::~::2::~::0', 'METHOD' : 0, 'OUTPUT' : 'C:/.../raster.tif', 'PIXEL_SIZE' : 10 }

With gdal rasterize (I am not sure whether the points a regular) I am able to create a raster but it just has 1 value.

gdal_rasterize -l hj -a z -ts 1.0 1.0 -a_nodata 0.0 -te 3434785.27 5412714.28 3439126.71 5420285.89 -ot Float32 -of GTiff C:/.../points.shp C:/..../raster_3.tif

I am trying to create a raster out of this data since two days. I am using QGIS version 3.10.2-A Coruña.


texts:
I am trying to add an SVG icon with the help of QgsVectorLayer in the QgsMapCanvas but not able to do so.

Is there any mechanism to add an SVG icon to a layer?