texts: Google Earth Engine: Export table with values over time for multiple regions of a shapefile

texts:
I'm trying to quantify land use change over time in my region of interest, which is a part of Europe divided into subregions. For this, I'd like to count the pixels of each type of land cover in every subregion and export a table.

//Add MODIS Land Coverage dataset
var dataset = ee.ImageCollection('MODIS/006/MCD12Q1')
  .filterDate('2001-01-01', '2016-12-31');
var LandCover = dataset.select('LC_Type1');

//Mask all values except 12
var LandCoverCrops = LandCover.map(function(img) {
                var lc_type1 = img.select('LC_Type1');
                return lc_type1.neq(12)
                        .set('system:time_start', img.get('system:time_start'));
                    });

var LandCoverCropsMasked = LandCoverCrops.map(function(img) {
                   var mask = img.select(['LC_Type1']).neq(1);
                   return img.updateMask(mask)
                        .set('system:time_start', img.get('system:time_start'));
                   })

//Nice colors
var LandCoverVis = {
  min: 1.0,
  max: 17.0,
  palette: [
    '05450a', '086a10', '54a708', '78d203', '009900', 'c6b044', 'dcd159',
    'dade48', 'fbff13', 'b6ff05', '27ff87', 'c24f44', 'a5a5a5', 'ff6d4c',
    '69fff8', 'f9ffa4', '1c0dff'
  ],
};

//Add fusion table to map
var thesis_fusion = ee.FeatureCollection('ft:1Mn5wAIvtkzHzUMrG2yQryc9U4qSOa0ycJNEbywj6', 'geometry');
Map.addLayer(thesis_fusion, {}, "Region of Interest");

//Clip Crop Coverage raster with region of interest (here: Object_ID XX)
var LandCoverCropsMaskedMosaic = LandCoverCropsMasked.mosaic()
var LandCoverCropsMaskedClip = LandCoverCropsMaskedMosaic.clip(thesis_fusion.filter(ee.Filter.eq("system:index", '39')));

//Visualize Layer
Map.addLayer(LandCoverCropsMaskedClip, LandCoverVis, "Land covered by crops");

//Time series of croplands
print(ui.Chart.image.series(LandCoverCropsMasked, thesis_fusion.filter(ee.Filter.eq("system:index", '39')), ee.Reducer.count(), 500));

In this sample, I just created a chart of the development of crop land area between 2001 and 2016 in one area, Nr. 39 which is in Bulgaria (If this code does what I think it does). My goal would be to have a table with the years as columns and 1 to 186 (for each Region) in the rows, with the pixel areas for each year and Region.

I know the shapefile is a bit of a mess, but I'm very new to this sort of thing so at the moment I'm just trying to get it going. If there is something obvious to do better or differently I would be very thankful for suggestions.


texts: Using the covariance reducer in Earth Engine

texts:
How do you apply the covariance reducer to an array in Earth Engine? I have two lists containing values that I have sampled from an image and would like to calculate their covariance matrix. My attempt is

a1 = ee.Array([1,2,3,4,5])
a2 = ee.Array([5,4,3,2,1])
cov = ee.Array.cat([a1, a2], 1).tranpose() \
  .reduce(reducer = ee.Reducer.covariance(), axes = [0])

which would return

  Array.reduce: Type must be a 1D EEArray.


texts: What is the 4th band in a 16 Bit 4 Band RGB TIFF?

texts: I am using TIFF files in a project, all of which are plain RGB imagery. When imported into the software program that I use they are just automatically shown as being three bands, Red Green and Blue. However, when reviewing the metadata it shows that the TIFF files I am using are 4 band rasters. What data is contained in the fourth band and what is it used for?


texts: How to resize a feature and prevent it from scaling when zooming in OpenLayers 3

texts:
I have initialized a custom OpenLayers 3 map (used to show houses for sale in the neighborhood) with an image as the map.

Then, I create additionnal features and layers dynamically for each house (each feature's anchor is set as the middle of its image).

I've been trying to use the size property when initializing the feature, but what it does is crop the image instead of resizing it.

I think I have seen the resize function for layers somewhere in OL2, but I can't find it in OL3... would that kind of function achieve the result I want?

There's also the problem that the features are scaling way too big when zoomed out of the map, and scaling down too small when zoomed in a lot. Is there a way to specify the feature's coordinates then do some kind of invisible margins/padding around it to prevent it from going too big or too small (some kind of static size) ?

Here is the actual behavior of features (the feature seen here is the black house):
 - Next: Perfect size, the house should be way smaller when zoomed out though (as seen on the first picture). -  The house should've stayed bigger, instead of scaling down again in this last picture..


texts: Converting raster pixel depth to 1 Bit - Python/QGIS

texts:
I want to convert an 8 bit pixel depth raster into 1 bit to reduce the file size. The raster has already been reclassified to store only 0s and 1s but the metadata still shows me 8 bit pixel depth and the file size is unnecessarily big.
I know of gdal_translate -ot parameter but the minimal depth supported is 8 bit.
I would prefer to solve this with Python but other options would also be ok.


texts: Recovering shape layer which was accidentally overwritten?

texts:
I duplicated a layer set, as it was more convenient (same style and attributes).  It was working fine and both the original and new layers were showing. Then I open it up another day and the original layer looks to have vanished, and only shows the new shape layer (polygons/lines).   Upon further investigation the new layer in now referencing the original layer shapefiles, the new ones are nowhere to be found.  The big problem is that it resulted in the deletion of all the original old lines/polygons.

Is there a way to retrieve the original lost shape data and to make them reappear on the layer e.g. restoring a file to an earlier date?

I'm new at this and seek a step-by-step answer; links can be confusing without directions.


texts: How to make a Spatialite View (with geometries) for QGIS based on two table

texts:
There are several posts (1), 2)) and manuals to create a spatial view within a Spatialite Database and to work with it in QGIS.

The important thing is to register the view in geometry_columns table:

INSERT INTO views_geometry_columns
(view_name, view_geometry, view_rowid, f_table_name, f_geometry_column)
VALUES ('italy', 'geometry', 'ROWID', 'local_councils', 'geometry');

All examples are about views which were created from one table.

How I have to register this view?

CREATE VIEW photo_object AS
SELECT a.id, MakeLine(b.geom, a.geom) AS geom
FROM object a, photo b
    WHERE a.id=b.id


texts: Python 3.6 crashes after running QGIS 3.4 qgs.initQgis()

texts:
My Python window crashes after running this script. I have tested and it stops specifically at the qgs.initQgis() line.

I think that something changed in qgis from QGIS 2.18 to QGIS 3.4 where I need to change something with the path, but I can't quite figure that out.

import sys
from qgis.core import *
from qgis.gui import *
import qgis.utils
from qgis.core import QgsApplication

qgis_path = "C:\\Program Files\\QGIS 3.4"
QgsApplication.setPrefixPath(qgis_path, True)
qgs = QgsApplication([], False)
qgs.initQgis()

project = QgsProject.instance()

project.read('C:\\Users\\annam\\Desktop\\test.qgz')

layer = QgsVectorLayer('C:\\Users\\annam\\Downloads\\waterbodies\\arcimports\\kerr_225.shp', 'name', 'ogr')

project.addMapLayer(layer)

project.write()

qgs.exitQgis()


texts: QGIS/OpenLayers - How to add a "labels-only" reference layer (basemap focused on labels)?

texts:
In ArcGIS you can add a "reference basemap" which features labels for key locations as in:

http://www.arcgis.com/home/item.html?id=8b3d38c0819547faa83f7b7aca80bd76

However, in QGIS, I can't figure out a way of achieving the same effect, even when using the OpenLayers plugin.

Any ideas?


texts: Debugging/logging ArcPy / Python code behind ArcMap function?

texts:
Considering I Can use the right click --> set datasource  at an  mxd file to change the datasource.

The following pictures describes how this can be done in arcmap..
How can I see the arcpy / python code behind that process? Is there any sort of logging or debuging of what arcmap is doing on the back ? I suppose it calls the same arcpy functions as sb would call to perform the same result?

Question 2// COuld I see in some way the code behind "Set Datasource Tool" of arcmap.? If I will do this I will have my problem resolved


texts: Change data source encoding in QGIS 3.0.x?

texts:
Changing Data source encoding through layer Properties worked well for me until version 3.0.x - now, the field is grayed out and shows only UTF-8. Our Data sources are quite mixed and I get spades, question marks etc. instead of East European characters when labelling. Is this feature broken in Early Adopter release or am I missing something?

Checking or unchecking value in Settings/Options/Data Sources/Data source handling - "Ignore shapefile encoding declaration" returns error "Wrong value for parameter "GRASS7 folder - Specified path does not exist".


texts: Can anyone share their experience with SpaceNavigator 3D mouse?

texts:
I was wondering if any of you had a chance to use any of the 3Dconnexion products in GIS setting? What are your experiences?

Is something like SpaceNavigator worth investing into?

Update: Apparently, one million of them on the market.


texts:
I have a layer called 'Colorado' that has an attribute 'FIPS_CODE'. The values are numbers as a string. I am trying to use arcpy.SelectLayerByAttribute_management inside my Python script to select the features that have code '13245', but I keep getting an error:

  Invalid expression Failed to execute

The problem is essentially the where_clause or SQL Expression. What am I doing wrong here?

arcpy.SelectLayerByAttribute_management('Colorado','NEW_SELECTION','"FIPS_CODE" = "13245"')


texts: I'm very new ot the GIS world, but I suddenly need to generate isochrones from several points with time ranges up to 5 hours. I managed to use QGIS and the ORS plugin to generate nice isochrones, but ORS refuses to compute over the 1-hour isochrone. Is there a way to get past that limit, or can another tool do what I want ? If possible I would like to script it so that whenever I need to do it, I just have to supply a list of coordinates.


texts: Web Server/Technology to work with Raster-Imagery Data

texts:
I am in the process of designing a web application which will allow the end users to load raster imagery data (size range from 300 MB to 500 MB) as a back ground map and a corresponding OLD JPEG image for which data needs to be edited.
Example, the latest imagery data will have a DAM which needs to be added on the OLD JPEG map, supporting data.

Web page Performance is the key concern over here and I am open to any technology (including Big Data) if it can be leveraged in any way.

If performance becomes a bottleneck for web application then an alternative suggestions for Application Visualization will be a big help. At the end of the day, I want to provide a platform where end users can access huge size raster images to process over the web.


texts: Is it possible to connect to ArcSDE using QGIS?

texts: Is anyone aware of any plugins, or any other way to connect and view data from an ArcSDE database in QGIS desktop?


texts: LoadingPanel - Waiting for Vector & WFS loading

texts:
I have vector layer with WFS protocol. and because I have a huge amount of data, there is a while before features loaded on the map.

So i need to tell user to wait a moment until they load by display a "waiting" animation.

I found this Waiting for Vector & WFS loading

and tried it with no luck so far.

here is what I did:

I placed the LoadingPanel.js
I added this stylesheet:

<style type="text/css">

.olControlLoadingPanel {

        background-image:url(loading.gif);

        position: relative;

        width: 195px;

        height: 11px;

        background-position:center;

        background-repeat:no-repeat;

        display: none;

    }

 </style>`

and finally added the LoadingPanel control :

map.addControl(new OpenLayers.Control.LoadingPanel());


texts: Voronoi Diagram on a given polygon using QGIS

texts:
I am trying to create a Voronoi Diagram on a specific polygon, but there is some issue when dealing with edges.
Here is how I do it:

Preparing the points for Voronoi and the polygon for the diagram

Create Vornoi

Cut the edge using the polygon

Combine the cut Voronoi and the polygon using Union
(not sure if this is the best way)
And here comes my problem for the edges.
I would like to:
1) remove the frame from original Voronoi map (marked in blue)
2) extend the edges to the edge of the area polygon(marked in red), so that the service area at the edge side will be realistic.

How can I do this?


texts: Exporting many tables with incrementing date file name in GEE

texts:
I am classifying exposure status of point features within a county. The majority of the time all the point features will be unexposed and so I would like to write a general function that will export a table for each day within a month's time of all the point features that intersect with a geometry. I am having trouble with writing a function to iterate the description of the table name. For example for December:
var DecAqua=Aqua.filterDate('2012-12-01','2012-12-31');

function addtoMap(image){
var id=image.id
image=ee.Image(image.id).select('sur_refl_b01','sur_refl_b04','sur_refl_b03')
var date=image.get('system:time_start')
date=ee.Date(date)
Map.addLayer(image,Aqua_vis,date, false)

}
DecAqua.evaluate(function(DecAqua){
DecAqua.features.map(addtoMap)
})

I then check these images by eye and determine that all the features are unexposed and I want to export the tables to drive- It will be the same exact table for each day. I just need to create a function that changes the description of the table to each day in the month. In the end I will have 31 tables for December.
 var exposed=featurecollection.filterBounds(AllUnexposed);
  Export.table.toDrive({
  collection: exposed,
  description:'Date',
  folder: 'exposed',
  fileFormat: 'CSV'
 });


texts: Filtering an ArcGIS Feature Service by Related Table

texts: With a feature service that has a related table, is there a way to set a definition expression using the fields in the related table? For example, with the feature service located at https://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0, is it possible to create a definition expression that would only show me Incidents that had an Incident Priority record more recent than a certain date?


texts:
Can anyone explain to me (in simple terms) under what circumstances one might use the MSK and STK files in my DEM downloads from ALOS?
I have used the DEM files but am concerned I might be missing out on other important terrain information/data.


texts: Creating metadata in zipped file geodatabase using FME

texts:
I have a workbench set up where I create a Feature Class inside a file geodatabase. the next step is to create the metadata and load it into the same Feature Class.  This all works fine.

I'm doing the exact same thing with a zipped file geodatabase and it's giving me errors.

Attempting to create table 'XXXXXXX' with 'geodb_type' set to 'geodb_metadata'. FME features of 'geodb_metadata' can only be written to existing tables. If intending to write metadata, please ensure the table already exists.  If intending to create a new table, ensure the 'geodb_type' is set to a valid table type.
A fatal error has occurred. Check the logfile above for details

I've checked all my parameters and they are the same between my zipped and non-zipped file geodatabase.

Any idea why?

Thanks


texts: The actual shape of lake is like in the right corner, but in lansat 7 image that i downloaded a strip is misplaced(left image) or shifted.][how can i correct this, i have tried georeferencing already and it didn't work


texts: Fadeout effect for TimeManager (update for QGIS 3.8?)

texts:
I'm working on an animation with the TimeManager plugin, but instead of immediately disappearing or accumulating, I'm hoping to have my points fade out.

I found an article on QGIS Planet by Anita Graser that suggests using the following code to fade out the color and decrease the size of the point to nothing:

color_hsv(
  311,
  scale_exp(
    minute(age($animation_datetime,"t_datetime")),
    0,60,
    100,0,
    0.2
  ),
  90
)

and

scale_exp(
  minute(age($animation_datetime,"t_datetime")),
  0,60,
  24,0,
  0.2
)

I tried copying these expressions into the expression editors next to the fill color and size options for the symbols, but I get an error that says "Expression is invalid" and it says the "$animation_datetime" function is not known.

Anyone have any idea how to get this to work?


texts:
I have a shapefile and I want to loop through every column and extract selected features with the specified criteria (Column has a P or L).
So my code is like
output = "All.shp"

fields = arcpy.ListFields(output)

for field in fields:
    arcpy.MakeFeatureLayer_management("all.shp", "lyr")
    name = field.name

    clause = name + " LIKE 'P' OR "+ name + " LIKE 'L'"

    arcpy.SelectLayerByAttribute_management("lyr", "NEW_SELECTION", clause)

    arcpy.CopyFeatures_management("lyr", field.name+".shp")

Clause fails with ExecuteError: ERROR 000358: Invalid expression.
Tried different things but not working!


texts: Delete tasks in Google Earth Engine using CLI?

texts:
I am trying to clear/delete my google earth engine tasks window with several commands but they do not work:
`earthengine task cancel all`
`earthengine task cancel TASK_ID`
`tasks.clear()`

tasks.clear()

// Load the Sentinel-1 ImageCollection.
var imgVV = ee.ImageCollection('COPERNICUS/S1_GRD')
        .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
        .filter(ee.Filter.eq('instrumentMode', 'IW'));

var desc = imgVV.filter(ee.Filter.eq('orbitProperties_pass', 'DESCENDING'));
var asc = imgVV.filter(ee.Filter.eq('orbitProperties_pass', 'ASCENDING'));

var date = ee.Filter.date('2015-03-01', '2015-04-20');
// Filter by date and geometry, create multiband image and clip to geometry
// var ascChange = ee.ImageCollection(asc.filterDate('2015-03-01', '2015-06-20')).filterBounds(geometry).toBands().toFloat().clip(geometry)
// var ascChange = ee.ImageCollection(asc.filterDate('2015-03-01', '2015-06-20')).filterBounds(geometry)

var ascChange = asc.filter(date).filterBounds(geometry)
print(ascChange)

Map.addLayer(ascChange, {min: -25, max: 5}, 'Multi-T Mean ASC', true);

Export.image.toDrive({
  image: ascChange,
  description:'Ascendente_CMillor_lunes',
  fileNamePrefix: 'scenedate_orbitProperties_pass_GRD',
  scale: 10,
  region: geometry})


texts: Understanding Layers files with same name after MakeFeatureLayer and SaveToLayerFile in ArcPy?

texts:
I am trying to convert several shapefiles (in folder G:\desktop\Project\lyr) into layer files using this python code:

import arcpy,os
from arcpy import env

env.workspace = r"G:\desktop\Project\lyr"
env.overwriteOutput = True
for files in arcpy.ListFeatureClasses():
    filesPath = arcpy.Describe(files).catalogPath
    arcpy.MakeFeatureLayer_management( filesPath,"lyrName")
    arcpy.SaveToLayerFile_management("lyrName",os.path.splitext(filesPath)[0] + ".lyr")

the code work fine, and all the shapefiles converted into layer files with the same name of the shapefiles:

But when I load those layers files into the MXD file, all the layers have the same name, whereas I expected each layer will have a specific name:

I really don't understand what am I doing wrong.


texts: Manually digitizing roads vs. collapsing dual lines for centrelines

texts:
I am in the midst of doing a complete overhaul of our (abysmal) centrelines, and I was wondering how everyone creates their centrelines.

We have a large rural area, and some of the roads meander all over the place within the ROW, so I am thinking that manual digitization through tracing the roads would be the best route to take.

Is there any downside to tracing, as opposed to having the centreline in the middle of the ROW?


texts:
I'm using ArcGis 10.1 but I'm a beginner in this program.

I want to make a route event layer based on a route I have already defined.
My question is in the third line when the program ask me for an input event table. I read a couple of explanations about this tool but any of them explains what table is this. Do I have to create an excel table? If yes, how does it have to look like?


texts:
I know feature classes inside a File geodatabase or personal geodatabase can have attachments enabled.

Can a shapefiles have image attachments?


texts: Black/white hatching pattern fills in QGis

texts:
I am looking to replicate black & white maps in QGis, using hatching patterns and greyscales to indicate different categories of a continuous variable (example below).

It is possible/straightforward to do so in QGis? At first sight I only see color gradients and symbol fills.

 ).


texts: From SQL Query to QGis Layer with Python

texts:
I am struggling to convert my sql query to a valid Postgres layer in QGIS with the help of Python. Here is what I tried:

SELECT * FROM test_geodb  as k, vg250 as o WHERE ST_Within(ST_PointOnSurface(k.geom),o.geom) AND o.id = 71

When running the above code in pgAdmin4 I get 2 rows as a result as I except it. When I try to call the same statement inside my Qgis Plugin, I get an empty layer.

sql = "select k.pot_field, k.geom, k.id from test_geodb  as k, vg250 as o WHERE ST_Within(ST_PointOnSurface(k.geom),o.geom) AND o.id = 71"
self.uri1.setDataSource("", "test_geodb", "geom",  sql)
layer = QgsVectorLayer(self.uri1.uri(False), "testlayer", "postgres")
QgsMapLayerRegistry.instance().addMapLayer(vlayer)

While doing this:

self.uri1.setDataSource("public", "test_geodb", "geom", "w_speed = 5.75")
vlayer = QgsVectorLayer(self.uri1.uri(False) ,"layername2","postgres")
QgsMapLayerRegistry.instance().addMapLayer(vlayer)

results in a correct selection and this:

self.db.setDatabaseName(self.uri1.database())
self.db.setUserName(self.uri1.username())
self.db.setPassword(self.uri1.password())
self.db.open()
self.query = QSqlQuery(self.db)
sql = "select k.pot_field, k.geom, k.id from test_geodb  as k, vg250 as o WHERE ST_Within(ST_PointOnSurface(k.geom),o.geom) AND o.id = 71"
while self.query.next():
    print self.query.record().value("geom")
    #geom_query = query.record().value("geom")

gives me the geometries of my polygons as postgis geometries of the two rows. By reading here, here and here, I tried to solve my problem. I assume it has to do with the setting of the  setDataSource but I don't know how to fix it.

I am using Postgres 9.6, postgis 2.3 on windows 10 with QGIS 2.14


texts: How to export a feature collection of feature collections in Google Earth Engine?

texts:
I have extracted NDVI values from Landsat 8 images to a shapefile of points 90 meters apart. I am trying to get these point files back into ArcGIS and R, but they are too big to print to the console. Also, because I used the reduce region function, each feature in my collection is actually a feature collection. Is a for loop the way to export all these points (a feature collection of feature collections) to a shapefile? For each "feature" in the feature collection, I could take the name of the feature and use that as the file name to do Export.table.toDrive().

Alternatively, I have considered selecting each feature collection individually and exporting it, but that will be complicated in the future and I don't know enough about the table structure or the properties of feature collections to do that.

Here is the link to my code. Lines 74-79 are what I am having trouble extracting. I would eventually like to do this for all the Landsat satellites if I can.


texts: GeoServer GetCapabilties shows wrong OnlineResourse: URL

texts:
In my GeoServer WMS GetCapabilities document all layers have an onlineResource parameter which ends with "wms?SERVICE=WMS&" instead of just "wms?". This has the effect that I can´t cascade my GeoServer layers with other systems as cascading is quite sensitive to irregularities.

Can anyone tell if this is normal or is it a bug in GeoServer 2.5?

Does it correspond to the OGC WMS standard?

and can I change the GetCapabilities in GeoServer per hand?


texts: get() and getProperties() are not a function, from a VectorLayer (GeoJSON)

texts:
I'm trying to get the value "GRID_CODE" from the attribute table of a GeoJSON file and keep getting this two errors:

TypeError: myFeature.get is not a function
TypeError: myFeature.getProperties is not a function

I can see that in the documentation and other examples that both are functions. I'm also using the Feature class for other purposes succefully, so is not a import problem.

In my console I'm able to see the number of features and the value of them, so I know that there is no problem with the file. How I tried to do:

  myVectorLayer.getSource().on('change', function(evt){
    var newsource = evt.target;
    if (newsource.getState() === 'ready') {
      // Here I can see the number of features
      var numFeatures = newsource.getFeatures().length;
      console.log("Count after change: " + numFeatures);
      // Here I can see what is inside these features
      var myFeatures = newsource.getFeatures();
      console.log(myFeatures);
      // Where I getting the errors
      var myNewData = myFeatures.get("GRID_CODE");
      console.log(myNewData);
    }
  });

A part of "myFeatures":

4: Feature
  dispatching_: {}
  disposed_: false
  geometryChangeKey_: {bindTo: Feature, callOnce: false, listener: ƒ, target: Point, type: "change", …}
  geometryName_: "geometry"
  id_: undefined
  listeners_: {change:geometry: Array(1), change: Array(1), propertychange: Array(1)}
  ol_lm: {change:geometry: Array(1), change: Array(1), propertychange: Array(1)}
  ol_uid: "1428"
  pendingRemovals_: {}
  revision_: 1
  styleFunction_: undefined
  style_: null
  values_:
    GRID_CODE: 16
    OBJECTID: 6042
    geometry: Point {disposed_: false, pendingRemovals_: {…}, dispatching_: {…}, listeners_: {…}, revision_: 2, …}
    __proto__: Object
  __proto__: BaseObject

OL version: v5.3

A example that uses these functions.


texts:
I am a intern working for a telecommunications company who is looking to migrate arcmap files and migrating them to arcgis online.  We are currently trying to figure out how to customize pop ups in arcgis online.  I have done some research and it looks like it may involve a combination of html and Arcade, but I do not know how to access the html code for the pop up.

We are also trying to figure out how to simplify the pop up when it has multiple items that need referencing.  For example, a pop up that will refer to photos, work orders, etc...


texts: Re-opening project file, items added from organization portal appear as broken data sources

texts:
I made a new project file last week that required a number of layers hosted in our organization's portal.  I searched for them in the Catalog under Portal, and dragged the necessary layers from the search results to the ToC.  Everything worked fine.

Today, I re-opened the project file and all the items that were added from Portal are showing up as having broken data sources (with the red exclamation point).  If I click the red ! to repair the data source, I can search for and find the correct layers under Portal, but I can't set the data source to those layers (double-clicking them, or selecting them and clicking "open" results in trying to open as if it's a folder, and there's nothing inside).

I am able to re-add all these layers from Portal, so I know there's nothing wrong with that, but I can't repair the data sources.  How can I fix this?


texts: Drawing line in reference of Geographic point (WGS84) using X,Y in meters and ArcGIS API for JavaScript

texts:
I have a CAD drawing (lines are circles) which I am trying to draw on an ArcGIS Map using JavaScript API.
I have a base reference Geographic point (WGS84) and North Angle in my source drawing, the rest of the drawing is in meters.
For example, I have reference WGS84 (Lat, Long, North angle) which is at X=20, Y=10 in CAD Drawing.
Now I have a line which is at (X1=25, Y1=25 to X2=30, Y2=30).
How I can draw that line in reference to that WGS84 point?
I am new to GIS.


texts:
I'm planning to build a cabin, and I'd like to combine all the GIS data available from my home country with my own measurements for placing and the cabin layout. That is, I need a tool which can:

save data in layers,
import third-party GIS data for elevation, infrastructure, etc., and
import a PDF, SVG or other vector graphics format to get the cabin layout.

Is there any software useful for this available for Linux (at a pinch Windows XP), preferably for free?


texts:
I'm working with thematic maps with ST_ColorMap function smoothly until I try to create my own thematic map(colormap).

WITH
 canvas AS (
        SELECT ST_Raster(
                ST_SetSRID(ST_Extent(geom), 4326),
                800,
                (800 * (SELECT (Max(ST_YMax(geom)) - Min(ST_YMin(geom))) / (Max(ST_XMax(geom)) - Min(ST_XMin(geom)))))::integer,
                '32BF', 0, 0) AS rast
          FROM estado
           )
SELECT ST_AsPNG(
        ST_ColorMap(
         ST_Union(ST_AsRaster(geom, canvas.rast, '32BF'::text, aland, 0)),'
                 100% 255   0   0
                  80% 160   0   0
                  50% 130   0   0
                  30%  30   0   0
                  20%  60   0   0
                   0%   0   0   0
                   nv 255 255 255
                  ')) AS rast

I get the following error:

ERROR:  Unknown colormap keyword:
100% 255   0   0
 80% 160   0   0
 50% 130   0   0
 30%  30   0   0
 20%  60   0   0
  0%   0   0   0
  nv 255 255 255

I tried the first example in the documentation for PostGIS:
ST_ColorMap, and I get the same error.
Only works fine with pre-defined colormap keywords.

Any ideas?

PostgreSQL version: "PostgreSQL 9.3.5, compiled by Visual C++ build 1600, 64-bit"

PostGIS version: "POSTGIS="2.1.3 r12547" GEOS="3.4.2-CAPI-1.8.2 r3924" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER"


texts:
I am new to ArcPy, and don't know how to assign different layers to the same lyr file. The layers have "pol" in common. Replacement is a single layer, and so must be walked through the entire document.

import arcpy.mapping as mapping
... mxd = mapping.MapDocument ("CURRENT")
... df = mapping.ListDataFrames (mxd, "Layers") [0]
... updateLayer = mapping.ListLayers (mxd, "Pol_01_002", df) [0]
... sourceLayer = mapping.Layer (r "g: \ Pol01_001.lyr")
... mapping.UpdateLayer (df, updateLayer, sourceLayer, False)

How can I assign a single layer style file to all layers?


texts: Hierarchy for Google maps and OpenStreetMaps

texts:
i am wondering about the hierarchy that have been used inside the Google maps and open street maps.. what kind of hierarchy was impeded inside of them ??? if a curious man like me would like to explore and read more about them, where he can find the right source to do that ??

secondly,
About the entities that are dynamically presented inside the same above mentioned programs, what was the mechanism of decision-making that led to show the presented entities in every scale level, for instant why would in this particular level of detail a labeling for a church while there are other entities that weren't shown at the same level .
i know they are related to the generalization algorithm inside of those programs, but how we can read more about them .


texts: Records of shapefile do not contain every field

texts:
I have taken this shapefile (warning > 1gB), and making my first steps towards decoding it in Python.

I had thought that for each field there would be a corresponding item in each record. Is that correct?

I have 21 fields, but only 20 items in each record(!). They almost, but not quite, align. What am I doing wrongly?

Fields

result = {list} <class 'list'>: [('DeletionFlag', 'C', 1, 0), ['ID', 'N', 10, 0], ['SOURCE_ORG', 'C', 25, 0], ['SOURCE', 'C', 30, 0], ['EL_SURFACE', 'C', 15, 0], ['NORTH', 'N', 6, 0], ['SOUTH', 'N', 6, 0], ['WEST', 'N', 7, 0], ['EAST', 'N', 7, 0], ['X_SRCE_RES', 'N', 19,
 __len__ = {int} 21
 00 = {tuple} <class 'tuple'>: ('DeletionFlag', 'C', 1, 0)
 01 = {list} <class 'list'>: ['ID', 'N', 10, 0]
 02 = {list} <class 'list'>: ['SOURCE_ORG', 'C', 25, 0]
 03 = {list} <class 'list'>: ['SOURCE', 'C', 30, 0]
 04 = {list} <class 'list'>: ['EL_SURFACE', 'C', 15, 0]
 05 = {list} <class 'list'>: ['NORTH', 'N', 6, 0]
 06 = {list} <class 'list'>: ['SOUTH', 'N', 6, 0]
 07 = {list} <class 'list'>: ['WEST', 'N', 7, 0]
 08 = {list} <class 'list'>: ['EAST', 'N', 7, 0]
 09 = {list} <class 'list'>: ['X_SRCE_RES', 'N', 19, 4]
 10 = {list} <class 'list'>: ['Y_SRCE_RES', 'N', 19, 4]
 11 = {list} <class 'list'>: ['HORZ_UNIT', 'C', 15, 0]
 12 = {list} <class 'list'>: ['COORD_SYS', 'C', 25, 0]
 13 = {list} <class 'list'>: ['HORZ_DATUM', 'C', 25, 0]
 14 = {list} <class 'list'>: ['VERT_DATUM', 'C', 15, 0]
 15 = {list} <class 'list'>: ['VERT_UNIT', 'C', 15, 0]
 16 = {list} <class 'list'>: ['MIN_ELEV', 'N', 10, 0]
 17 = {list} <class 'list'>: ['MAX_ELEV', 'N', 10, 0]
 18 = {list} <class 'list'>: ['MEAN_ELEV', 'N', 19, 3]
 19 = {list} <class 'list'>: ['SDEV_ELEV', 'N', 19, 3]
 20 = {list} <class 'list'>: ['PROD_DATE', 'C', 10, 0]

First record

result = {tuple} <class 'tuple'>: (b' ', b'       268', b'Univ of Bristol          ', b'Ant Radar and Laser Alt DEM   ', b'Reflective     ', b'   -55', b'   -90', b'   -180', b'    180', b'          1000.0000', b'          1000.0000', b'Meter          ', b'Polar Sterograph
 __len__ = {int} 20
 00 = {bytes} b' '
 01 = {bytes} b'       268'
 02 = {bytes} b'Univ of Bristol          '
 03 = {bytes} b'Ant Radar and Laser Alt DEM   '
 04 = {bytes} b'Reflective     '
 05 = {bytes} b'   -55'
 06 = {bytes} b'   -90'
 07 = {bytes} b'   -180'
 08 = {bytes} b'    180'
 09 = {bytes} b'          1000.0000'
 10 = {bytes} b'          1000.0000'
 11 = {bytes} b'Meter          '
 12 = {bytes} b'Polar Sterographic       '
 13 = {bytes} b'WGS 84                   '
 14 = {bytes} b'WGS 84         '
 15 = {bytes} b'Meter          '
 16 = {bytes} b'       -82'
 17 = {bytes} b'      4211'
 18 = {bytes} b'           2152.694'
 19 = {bytes} b'           1127.631'

You probably don't need the code, which is simple enough anyway, but here it is:

data = shapefile.Reader(arguments.data_path + '\\' + fileName)
fields = data.fields
records = data.records()

Btw, is there any advantage to using data.shapeRecords()?


texts:
Trying to deploy ArcGIS desktop on a cloud VM. I'm single user licence, and I've found three different explanations -- On the ArcGIS site, the Azure site and none of them work.

It seems like it shouldn't be hard to do. I know how to deploy a VM but Azure wants me to add some crazy data management features I don't know if I need.


texts: URL for my Protocol.HTTP never called by OpenLayers?

texts:
I have an OpenStreetMap (OSM) map with a vector layer fetching data from a Node.js server setup on my local machine on port 9000. The data is in GeoJSON format.

Here is the whole code:

        var fromProjection = new OpenLayers.Projection("EPSG:4326");
        var toProjection = new OpenLayers.Projection("EPSG:3857");

        var map = new OpenLayers.Map("map");

        var vectorFormat = new OpenLayers.Format.GeoJSON();
        var vectorProtocol = new OpenLayers.Protocol.HTTP({
            url: "http://localhost:9000/getcoords",
            format: vectorFormat,
            params: {
                "city":"PARIS",
                "city_code":3
            }
        });
        var refresh = new OpenLayers.Strategy.Refresh({ force: true, active: true });
        var vectorStrategies = [new OpenLayers.Strategy.Fixed(), refresh];

        var osm = new OpenLayers.Layer.OSM();

        var vectors = new OpenLayers.Layer.Vector({
            protocol: vectorProtocol,
            strategies: vectorStrategies,
            format: vectorFormat
        });

        map.addLayers([osm, vectors]);
        map.setCenter(new OpenLayers.LonLat(2.3983034, 47.078038).transform(fromProjection, toProjection), 6);

My problem is that my map is displayed, but the url defined in my protocol is never called. In firebug, I can't see any access to this url, so I can't see my vector layer.

What am I doing wrong?


texts: Batch Processing in QGIS 3.4 appears to be disabled

texts:
I was trying to batch reproject several layers in QGIS 3.4.2 via Processing. However, after setting up my batch and clicking Run, nothing happened. Identical procedure in QGIS 2.18.26 LTR works fine.

To reproduce: Load at least two shapefiles. From Processing toolbox choose Vector General - Reproject Layer - right click Execute as Batch Process. Add the layers to the batch, choose output Path, autofill filenames and choose destination CRS. Click Run, nothing happens.

If this isn't unique to me and a bug, I'll submit a bug report.

(I just checked using a GeoTiff DEM, batch process Gdal Warp, still does not work).


texts: How do I style lines to show gradient colors for two attributes?

texts:
I have a layer with the city streets. I have a database with traffic values, including traffic going into the city and traffic going out from the city.

I need to show the street links with different colours based on the number of vehicle going into the city (red at the right of the link) and the number of vehicles going out from the city (blue at the left of the link). I also need for the colours to be proportional based on value. Can you help me?


texts: Is there a method to determine the sources that are used in a model in ArcGIS?

texts: I have a model that I have had to go through to model parameters in order to create a geoprocessing service.  Is there a way to check all sources that are being used in the model via python?  I am attempting to publish a geoprocessing Service, however one of my sources is not registered with server which prevents my service from being published.


texts: How can I generate a fishnet grid and a matrix of percentage of overlapping in R?

texts:
I'm trying use R for create a fishnet grid like in arcGIS with many cells of same size.

In the arcGIS 9.3 we have the option of create a polygon with many small square polygons (eg. 1 x 1 degree of lat and long) in the extent of our study area using the tool 'create fishnet' (http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Create_Fishnet_(Data_Management)) and after aply the tool 'Feature to Polygon' to transform the polygon lines in square polygons. Other option is use the “Hawth’s Tools” extension and acess the “Sampling Tools” -> “Create Vector Grid (line/polygon) but the extension only work properly until arcGIS 9.2.

Then I want create the fishnet grid (polygon with many regular squares) and after calculate many percentage of overlap of some polygons to each cell of the fishnet and create a matrix with each cell in lines and each polygon in the columns, like this matrix.


texts: Making Scale Bar in ArcMap end in zeros?

texts:
I need my the last scale number to show as 900 instead of 870, but can't find the right way to achieve this in ArcMap.  I've tried many of the options in the Properties of my scale bar in ArcMap to change this, but to no avail.

Is this possible, to determine what the last number will show as, or to even have numbers that only end in zeros on my scale? (i.e. 100, 300, 900)


texts: ST_Distance doesn't use index for spatial query

texts:
I can't get PostGIS 2.1 running on PostgreSQL 9.3.5 to use a spatial index even for the simplest queries. The whole dataset is 8 million points (population count grid from here). The table is created as

CREATE TABLE points (
    population DOUBLE PRECISION NOT NULL,
    location GEOGRAPHY(4326, POINT) NOT NULL
)
CREATE INDEX points_gix ON points USING GIST(location);

The queries are as simple as they get

SELECT SUM(population)
FROM points
WHERE ST_Distance(
    location,
    ST_GeographyFromText('SRID=4326; POINT(0 0)')
) < 1000

PostgreSQL always uses Seq scan for it, I've tried a subset with 10000 points - still Seq scan. Any ideas?


texts: Using st_distance with apply functions and iterators

texts:
I'm working with a dataset of islands in which I need to calculate the distance between each island and the nearest landmass with an area greater than that island. I can do this successfully with a for loop, but this takes too long and I want to rewrite the code so that it can eventually work with parallel processing and apply functions.
Here is example code for the for loop:
library(rgdal)
library(tidyverse)
library(sf)
library(spData)

alaska <- alaska

#this dissolves all features to remove internal divisions and
#then converts multi-part polygons to single part. This
#effectively creates a separate feature for each isolated
#geometry (i.e. island)

alaska <- alaska %>%
  st_buffer(0) %>%
  summarise(area = AREA) %>%
  st_cast("POLYGON")

#recalculate area for each island
alaska$area <- alaska %>%
  st_area() %>%
  units::set_units(value = km^2) %>%
  as.numeric()

#spatial object with Alaska landmass still included
alaska_all <- alaska

#spatial object with Alaska landmass removed, leaving only islands
alaska_islands <- alaska[!alaska$area == sort(alaska$area, decreasing = T)[1],]

for (i in 1:nrow(alaska_islands)){
  d <- st_distance(alaska_islands[i,],
                   alaska_all[alaska_all$area > alaska_islands$area[i],],
                   by_element = T)
  alaska_islands$nn[i] <- sort(unique(d))[1]
}

What I'm having trouble figuring out is how to keep the alaska_islands$area[i],] iteration as part of the function. I've tried apply, lapply, and mapply and have had limited success. The most successful thus far has been:
apply(st_distance(alaska_islands, alaska_all[alaska_all$area > alaska_islands$area[i],]), 1, min)

but it seems to ignore the iterator. Some islands return the correct values (i.e. same as from the for loop) while others simply return 0.


texts: Is there an easy way to see all the MXDs that use data from a single file geodatabase (GDB) as their source using ArcCatalog? I'm not arcpy proficient. I feel like I've used a tool like this before, but can't find it anywhere. I've found ways to list data sources in a single project, but I want to do the reverse.


texts: Routing using OSM data, osm2po, and pgrouting: strange route produced

texts:
I downloaded latest data from Geofabrik and ran the data through osm2po. osm2po web service works fine. I tried to find the route from node 103843 to 170597 and got the following route:

However, using pgr_dijkstra() with data in sql file produced by osm2po, I got a totally different route with different start and end point.

To check whether my query is the problem, I used pgrouting layer in QGIS and got the same result.

Interestingly, I found that the route is not correct, as it doesn't always go along the road network.

How can I make pgrouting produces the same result as osm2po web service?


texts: Adding Multipoint Features to ArcGIS Online

texts: I was attempting to upload a zipped multipoint shapefile to AGO when I received this error:"Unable to import this shapefile. (Unable to get property 'intersects' of undefined or null reference)". I was unsure why I got the error but I noticed that AGO states at this time it does not support multipoint shapefiles. So is there some other format besides a .shp that you can upload a multipoint feature like a gdb feature class or an SDE layer or is it a no go all together.


texts: Getting polygons of all countries and ISO-3166-2 subdivisons

texts:
In order to do reverse geocoding lookups to find a country (as ISO-3166-1) and the subdivision (as ISO-3166-2) for given coordinates I am looking for a way to get all polygons of all countries and their subdivisions.

Reverse geocoding lookups with Google Maps or other services either do not always return the country and subdivision (Google Maps), or sometimes they are incorrect (geonames.org). As I understand it all countries and subdivisons are available in the openstreetmap data, but I do not know how to only retrieve the polygons - no map data, no points of interest or cities are necessary, only the outlines of all subdivisions with the given country and subdivision codes. Then I can check myself if a given point is within any given polygon, or near it.

Does anyone know how to retrieve this data from the openstreetmap data, or is there any other source for this data?


texts: SQL Query to Reverse Geocoding in PostGIS

texts:
I try to do Reverse Geocode from my shapefile on the database.
I'd already try with Spatialite and PostGIS to put shapefile (.shp) into it. But I'm still can't delivered my objection about reverse geocode from my shapefile on the database.
My shapefile (.shp) is content with district polygon, all I want is simple: Pass some coordinate, and check that coordinate is in what district polygon from shapefile, then return the district name. That's all.
Does anybody know the SQL Query to do that reverse geocode in PostGIS or Spatialite?

Thanks before. :(


texts: How to create postgresql triggers to calculate geometry from x,y and vice versa at the same time

texts:
I have a postgis table with point geometry which looks like this

CREATE TABLE mypoints
 (
  gid serial NOT NULL,
  coordid integer,
  geom geometry(Point,4326)
 );

And a table with coordinates like this

CREATE TABLE mycoords
 (
  coordid serial NOT NULL,
  x numeric(10,4),
  y numeric(10,4)
 );

I want to create several triggers, that update or insert mypoints.geom value with MakePoint(mycoords.x, mycoords.y) function, taking values from joined mycoords table, and at the same time vice versa - when mypoints.geom is updated or inserted, correlated mycoords.x and mycoords.y values should be calculated with ST_X(mypoints.geom) and ST_Y(mypoints.geom) respectively.

How can I do that?


texts:
I need to use Rtrees to make some code I'm running faster. However, in order to use Rtree, I need to install libspatialindex. When I've installed packages in the past I've been able to either download a .exe file from Chris Gohlke's site, or use setup.py install from the command prompt, after extracting the contents of a tar.gz file.

The problem I'm having is that 1.) There is no .exe file on Gohlke's site, and 2.) After downloading 'spatialindex-src-1.8.4.tar', and trying to extract it, I get the error 'Can not create output directory' - I have no idea what that's all about. 3.) I go to http://download.osgeo.org/libspatialindex/ and download the appropriate file - i.e.  libspatialindex-1.8.1-win-msvc-2010-x64-x32.zip, when I unzip it seems obvious that everything I need is there - there are a number of .dll files. It seems like this last one is the best route, but after unzipping, I don't know what to do with all the files. Do they need to do into my DLLs folder?


texts: Where to host private CartoDB/Leaflet web app

texts:
I am looking for suggestions/recommendations on where to host my cartodb/leaflet map site.

It needs to be private with authorized users and have a document management system.

So, I was thinking sharepoint online 2013 so I can use a sharepoint subsite to view the map and take advantage of the document management and sharing as well as their tasks and calendar parts.

Or I could use google app engine to host the map site and google apps for business to handle the document management, email, calendar, tasks... Both of these paths are pretty pricey to share the map and docs with 15-60 users.

Is putting this site in the cloud on google app engine or amazon cloud overkill for such a small app? will sharepoint online 2013 be able to handle this app with 15-60 users?

Is there a better option out there like website hosting from godaddy and huddle for doc management? Please let me know if you have any advice. Thanks


texts: Workflow for determining stream gradient?

texts:
As far as data goes, I'm working with NHD .shp files, 10m DEMs, and some LIDAR data.

My goal is to determine gradient for 100m segments of a network of streams.

I'm already able to do this, but I expect that my workflow is nonideal, especially in that I can't deal with branched networks at all.

If you all were going about this, what sort of steps would you use?

In addition, I posted about the problem here, where I think I did a much better job describing what my goals are.


texts:
Converting shp2mysql will leads an null value in geom filed.  how to rectify the the problem.

shp2mysql -s 32643 landuse landuse LIS >landuse.sql


texts: how to find necessary geoserver/geotools maven dependencies for a class?

texts:
I am trying to create a Web Processing Service with GeoServer. I used maven following opengeo instructions, and I get an eclipse project with a pom.xml file with dependencies like the following:

 <dependencies>
   <dependency>
     <groupId>org.geotools</groupId>
     <artifactId>gt-process</artifactId>
     <version>12-SNAPSHOT</version>
   </dependency>
   <dependency>
     <groupId>org.geotools</groupId>
     <artifactId>gt-geometry</artifactId>
     <version>12-SNAPSHOT</version>
   </dependency>
   ...
 </dependencies>

Now there is only a limited set of dependencies in the example. If I add other classes, I often get errors about class not being resolved. For example,

import org.geoserver.wps.WPSStorageCleaner;

or

import org.geotools.gce.geotiff.GeoTiffReader;

My question is, in general, where/how can I find out the correct values of <groupId>, <artifactId> etc.  for classes like above? Is there a central registry for this kind of info?

I need to do this in maven, and not by otherwise fiddling with eclipse settings and the like.
The closest thing I can find is at https://maven-repository.com/artifact/org.geoserver
However, the versions there are at 1.x, and I don't know how to use the values there.


texts: Importing atribute value to output coordinate system in ModelBuilder?

texts: I have point layer in ArcGIS 10.4 with attribute EPSG codes. I want to iterate feature selection with EPSG code, and value with EPSG code use like output coordinate system to function define projection, but there is no possible connect value to output coordinate system value. Maybe it is possible in Python script but I don't know how.


texts: What tool would be best for getting the max value out of Identical ID rows?

texts:
As the title may imply I want to keep the maximum value in field2 for several identical IDs in field1, the others are deleted for example this table:

Field1  Field2
14772   1
14772   4
14766   3
14766   1
14766   1
14766   1
14766   1
14765   1
14765   3
14765   1

becomes:

Field1  Field2
14772   4
14766   3
14765   3

by deleting all the duplicate ID (field1) with lower value in field2. for your information my final objective is to join the table with another using field1, I only want rows with highest field2 value to be joined.

I'm using Arcmap 10.1


texts: Combining objects according to attribute fields whose output Area field is equal to the input. Help me, please!

texts:
Input Feature: EXAM_region with field Area sum = 4814.34

I tried with tool Dissolve: Output Feature class must not have multi part geometries.

EXAM_region_Dissolve with field Area sum = 10876.77 wrong with input 4814.34

My data file and workflow: http://www.mediafire.com/file/qwoql6vdxliloqb/Data.rar/file


texts: Normalize or standardize map in ArcGIS for a Desktop?

texts: I made a raster using the Euclidian Distance tool. How can I standardize the raster using the fuzzy membership module in arcgis (0 to 255)?


texts: QGIS Python layerModified signal: how to find the id of modified feature

texts:
With this code on a vectorLayer v_layer:

QObject.connect(v_layer, SIGNAL("layerModified()"), self.interceptModify)

I can intercept when a geometry is changed, but how do i find which feature has been changed?

I need to find the modified feature id, but layerModified signal has not parameter

i tryed with

QObject.connect(v_layer, SIGNAL("geometryChanged(QgsFeatureId, QgsGeometry)"), self.interceptEditingModify)

no error, but the signal is not emitted by qgis


texts:
I have this code to create a raster file in python:

fileInf = QFileInfo(userIntervals)
baseNam = fileInf.baseName()
rlay = QgsRasterLayer(userIntervals, baseNam)
gdalRast = gdal.Open(str(userIntervals))
x_int = gdalRast.RasterXSize
y_int = gdalRast.RasterYSize
geo_int = gdalRast.GetGeoTransform()
bands = gdalRast.GetRasterBand(1)
data_int = band.ReadAsArray(0,0,x_int,y_int)
multipl = numpy.multiply(data_int, int(self.lineWeight.value()))
# Create an output imagedriver
driver_int = gdal.GetDriverByName( "GTiff" )
outData_int = driver.Create(str(outPath), x_int,y_int,1, gdal.GDT_Float32)
outData_int.GetRasterBand(1).WriteArray(multipl)
outData_int.SetGeoTransform(geo_int)
outData_int = None

Whwn I test my python plugin this will give me an error:

AttributeError: 'NoneType' object has no attribute 'RasterXSize'

But when I open the tif image defined as userIntervals I have 627 as x value, like in other tif images that run well. Why this happened?


texts: Problem with contour lines thickness in bigger zoom levels

texts:
I'm a beginner user of GDAL tools. I'd like to rasterize contour lines into Tiff file (for example such region: N47E006), everything works for quite small zoom levels e.g. 10... but the problem is with bigger zoom levels... contour lines are very "pixelised" and for mountains black contour lines covers almost whole Tiff image. Is there a way to create thinner contour lines for bigger zoom levels e.g. 15-18?

I'm using this for generating contour lines (10m):

gdal_contour -a elev -i 10 input.tif contours.shp

this for rasterization:

gdal_rasterize -b 1 -b 2 -b 3 -burn 0 -burn 0 -burn 0 -l contours contours.shp input.tif

and this for cutting into tiles:

gdal2tiles.py -z 15-18 -n -e -w openlayers input.tif out_dir


texts: Displaying pie charts in web map created using QGIS?

texts:
I have created a web map to show some sales information using QGIS with Leaflet library.

Is there a way to show pie charts in the same web map as a separate layer?

Although pie charts are visible in the QGIS desktop version, it disappears when it converts to a web map.

I guess there should be a way to edit the HTML file to make pie charts visible.


texts: Why might text formatting tag for bold not work in ArcGIS Pro labeling expression?

texts:
Someone told me recently that, when they used the text formatting tag for bold text in an ArcGIS Pro labelling expression:

  <BOL>Bold</BOL> test

the label appeared as:

  Bold test

when they expected:

  Bold test

What could cause this text formatting tag not to work?


texts: Identify buffer areas which meet with lines

texts:
I have a large series of points representing street posts which I have created a buffer for. I now want to find which of these buffer areas do and don't meet with a network of lines (representing electrical cables).

How would I go about doing this in ArcMap? Ideally I would have a final output of 2 layers, one showing the areas which do meet a line, and the other that doesn't. However preference is for the areas which do not intersect any lines.


texts: Problem when converting Shapefile to KML files in QGIS

texts:
I select Layer CRS as WGS 84 (EPSG:4326)
When I open the kml layer in Google earth it is wrong. In Google earth, appears some segments every where on the globe. Can anyone explain to me what is the wrong?


texts: Set meridian label position and orientation

texts:
I have followed Label coordinate position of Grid lines to be able to draw meridians and parallels with labels.
The meridian labels are placed at the Equator line and oriented in the direction of the meridians.
Is there a way to move these labels to the bottom of the map?
How can the labels be rotated 90 degrees to the right to become horizontal text at the same time?


texts:
This is a version of a question that I posted on the GRASS list, but I didn't get any suggestions there. I would like to overlay a grid (cell size about 500 m x 500m) over an animal track created from hourly locations.  For each cell that contains a track segment I want to record a direction vector which represents the direction that the animal was traveling when it passed through that cell.

I tried using the GRASS command "v.to.rast use=dir", which should create a directional vector in every raster cell that the track passes through.  It almost works, but the command does not seem to respect the order of the track.  It seems just as likely to classify a particular segment as having a direction of NE as to classify the same segment as SW (180 degrees opposite) and I couldn't see any consistency to how the directions were chosen, although I may have missed something.  Another challenge is that the animal often re-crossed its own track so that individual grid cells may contain more than one track segment--in those cases I want to sum the direction vectors using regular vector algebra.

I am new to GRASS and a bit overwhelmed, and I would be very grateful for any suggestions that would get me started in the right general direction.


texts: Where is Google Maps extension for ArcGIS?

texts: I need to import Google Maps into ArcGIS for Desktop and apparently I need to activate a Google Maps extension. I'm working on ArcGIS 10.0 and there are no such extension. Do I have to install a new extension?


texts:
I just upgraded to the Beta 2 version of MacOS 10.10 ("Yosemite").  I'm getting an error when I try to "drag and drop" shape files into QGIS.  I'm running QGIS 2.4.0, GDAL 1.11, and MATPLOTLIB 1.3.1.

I can manually add shape files using "Layer --> Add vector layer ..."  So, there is a solid work-around.

It's just the GUI that's not working.


texts: When ArcMap Rest Create Replica command is used, what is returned?

texts:
I can access a feature service, and initiate a create replica command - but i am not sure how to digest what is returned.
Example code below:
# Setting up the POST request
create_replica_form_data = {'replicaName':'traggatmot_pull',
                     'layers':0,
                     'layerQueries':'',
                     'geometry':'',
                     'geometryType':'esriGeometryEnvelope',
                     'inSR':'',
                     'replicaSR':'',
                     'transportType':'esriTransportTypeEmbedded',
                     'returnAttachments':'false',
                     'returnAttachmentsDataByUrl':'true',
                     'async':'false',
                     'syncModel':'perLayer',
                     'attachmentsSyncDirection':'none',
                     'replicaOptions':'',
                     'dataFormat':'json',
                     'f':'pjson',
                     'token':token}

r = requests.post("http://services3.arcgis.com/XXXXXXXXXXXXXXX/arcgis/rest/services/XXXXXXXXXXXX/FeatureServer/createReplica", data=create_replica_form_data)

with open("layer_pull.json", 'w') as outfile:
    json.dump(r.json(), outfile)

arcpy.JSONToFeatures_conversion("layer_pull.json", os.path.join("layer_pull.gdb", "layer_pull"))

Error:
arcgisscripting.ExecuteError: ERROR 001558: Error parsing json file 'sades_pull_01_12_2016.json'.
Failed to execute (JSONToFeatures).

This error seems to suggest that the JSON object returned by the CreateReplica request is not in the format that ArcMap is expect.  Here is a snapshot of the beginning:

Is this a GDB in JSON format?  How do I get this file into a GDB?


texts: How to parse a shapefile with Esri JavaScript API and/or ArcGIS Server?

texts:
I'm developing a webapp that uses the Esri JavaScript API 3.xx (Dojo 1.x) together with an ArcGIS Server 10.6.xx. Until now I was parsing shapefiles in my Java backend that makes use of an offical Esri shapefile reader.

Is there any way to do this with Esri JavaScript API? If not, is there any other plugin/toolset that is recommendable?


texts: Removing old logo filepath from layout view in ArcMap

texts: I'm using a very old MXD in ArcMap. We have a wall map set up with symbology to show one type of our strucutres. The problem is that in our legend, our old company logo file path has replaced the image of our logo. I can't find a way to remove it.


texts: What regular expression engine does QGIS use?

texts:
Where can I find the documentation about QGIS regular expression engine and how to craft a pattern with it. I see the following regex functions documented

regexp_replace
regexp_substr
regexp_matches
regexp_match


texts:
I am using ArcGIS Desktop Advanced 10.8.
I have a polyline shape and I need to increase the length of all the lines 1000 meters. The lines have 2 vertex only. I need to increase the length from the last vertex.
I need to do this automatically because the shape has many lines and it is impossible to modify one by one. I have tried with Extend and Scale Tools.


texts: Accessing feature extent of feature class using ArcPy?

texts: How can i access to feature extent of a feature class and change the extent using arcpy ?


texts: QGIS 3, Expression to address ranges in the symbology

texts:
I noticed many new entries in the list of expressions in the QGIS3-Version.
Is there an expression that I can use to address the symbology of a Layer?
It would be of particular interest to get the upper and lower boundaries of the selected "graduated color" symbology.

I use QGIS 3.4.6.


texts: How can I calculate the maximum sky viewing angle for every point in a DEM not covered by objects?

texts:
I am looking for areas in a city that are suited for setting up precipitation measuring stations. One constraint is, that the station has to be distant from each object at least two times the object's height.

I have a raster (14000 x 11000 cells, 2 m resolution) representing the height above the ground of every object in the city (buildings, vegetation etc.). An Approach to buffer relevant pixels didn't lead to a result due to limited computation power. My first idea was to translate this distance into an angle (26.57 deg) and run an analysis, that's giving the maximum viewing angle to the sky. If it's higher than 26.57, the cell is not suited. But I haven't found a tool to calculate exactly this for every raster cell.

What tool or alternative solution can I use to find suitable areas? I am using ArcGIS.


texts: How to make a vectorlayer through of sentence SQL on PostGRES

texts: How do I create a vectorlayer to through SQL on PostGiS on Python 2.7. I is working with QGIS 1.8 and I needed create a vectorLayer through SQL on PostGIS.


texts: In Atlas how can I put a margin around a feature but also use predefined scales

texts:
In QGIS, how can I put a margin around a feature but also use predefined scales in Atlas? I have a feature that fits in the map but very tightly, so I would like QGIS to use a smaller scale to better accommodate the drawing.
Tried to create a buffer around the feature thinking the program would understand that I also want it to appear and so shrink the drawing, but it didn't work. Is there a way to do that?


texts:
I try to insert a WMS but Google Earth says WMS capability failed.
This is the WMS:
https://ccff02.minfin.fgov.be/geoservices/arcgis/services/WMS/Cadastral_Layers/MapServer/WMSServer

I know it is a 1.3.0 WMS server, could that be the issue?


texts: List of parameters accepted by osm2po server?

texts:
Can someone please point me to the full list of parameters accepted by osm2po server (osm2poService)?

The documentation under "Server" section on osm2po.de seems to be incomplete. For example, findShortestPath is not listed in the "Table of additional service parameters".

Specifically, I am looking for parameter that may have the service return only sum of cost (say total travel time) rather than full list of LineStrings for the route.


texts:
I am extremely new to GIS and I just received a shapefile, as a zip file that includes the following files:

filename.SHX
filename.SHP
filename.prj
filename.dbf
filename.cpg

but I am not sure how I would display this data.

Is there anything else needed?

I just installed QGIS on a Debian box, but I guess it won't run, because it's just CLI, with no display environment.


texts: How to create a boundary around transmission lines?

texts:
New to QGIS and GIS in general.  I'm using QGIS 2.18 and I've downloaded the shapefile from here https://hifld-geoplatform.opendata.arcgis.com/datasets/electric-power-transmission-lines.  I set up a query to display only the transmission lines in my region.

How can I create a 1/2 mile boundary (polygon?) around the transmission lines?


texts: Calculating third coordinate on earth given two points and their distances to third point EPSG:4326 (WGS84)

texts: I am trying to find the latitude and longitude of a 3rd point on a map with EPSG:4326 (WGS84) projection. I know the coordinates of two other points and the distance in meters to the 3rd point. Ideally, I am trying to create a function to return said coordinates of the 3rd point.


texts:
I want to import csv into PostGIS database,

I receive error massage:

alpha=# COPY project FROM '/home/alpha/database/project.csv' DELIMITERS ',' CSV;
ERROR:  invalid byte sequence for encoding "UTF8": 0xc1da
CONTEXT:  COPY project, line 1

so I find my csv's coding is ISO-8859-1 and set encoding = ISO_8859_1

#SET client_encoding = ISO_8859_1;

COPY worked

but I use

SELECT * FROM project

it's give me a lot of garbled words!

so how to make it right??


texts: Point input for polyline not acceptable?

texts:
Input QgsPoint(s) are returning an error in a Polyline creation routine.
Any clues?!

    processing.runandload("qgis:polygoncentroids", Base, "memory:CenterNode")
    processing.runandload("qgis:extractnodes", Base, "memory:OuterNodes")
    Center = ftools_utils.getMapLayerByName(unicode("memory:CenterNode"))
    Outer = ftools_utils.getMapLayerByName(unicode("memory:OuterNodes"))

    # create line mesh points
    line_center = []
    featuresC = Center.getFeatures()
    for elem in featuresC:
        xy1 = elem.geometry().asPoint()
        line_center.append(xy1)
    print line_center

    line_ends = []
    featuresO = Outer.getFeatures()
    for elem in featuresO:
        xy2 = elem.geometry().asPoint()
        line_ends.append(xy2)
    print line_ends

    Mesh = QgsVectorLayer("LineString", "Mesh", "memory")
    prM = Mesh.dataProvider()
    Mesh.startEditing()
    for i in range(len(line_ends)):
        print line_ends[i]
        print line_center[0]
        seg = QgsGeometry.fromPolyline(line_ends[i], line_center[0])
        prM.addFeatures([seg])
        Mesh.updateExtents()
    Mesh.commitChanges()
    QgsMapLayerRegistry.instance().addMapLayers([Mesh])
    self.iface.mapCanvas().refresh()


texts: Limitations of PostGIS Shapefile Import GUI tool?

texts:
I would like to improve my knowledge regrading this issue.

I am using PostgreSQL version 9.5 (x64bit) on Windows 7 Enterprise (x64bit Machine). I have a table containing 3515214 rows of X,Y coordinates and a geometry column. Every time I tried to import this table to my Postgres DB using GUI tool i.e., PostGIS Shapefile and DBF Loader 2.2, I found some missing x, y values in this table when I viewed the data in SQL editor using:

Select * from my_table;

I cross-checked for missing geometry values as well like this:

SELECT COUNT(*) FROM my_table WHERE geom IS NULL;

The count result was zero means no missing geometry values. However, when I checked for X coordinate:

SELECT COUNT(*) FROM my_table WHERE x IS NULL;

There were 89k+ missing x (and y) values. I am aware that I can use shp2pgsql() or ogr2ogr() tool as well but I am not sure how these will work for this large dataset. However, my point is: are there any limitations in using GUI tool while importing a large table? How may I tackle with this ambiguity?


texts:
I have a csv file with points and convert them to polygons. I need to draw smt like

The problem is that I have radius Bearing start and end poins
How I can to draw such circles in QGIS?
Can someone recommend?


texts: Populate several fields only within selected feature classes

texts:
I am trying to produce a script that populates several fields within various feature classes I select. I am currently trying to build a list of feature classes from table of content items in an mxd. Then, I plan on using this list as input to a function (Populate) that populates the values for standardized fields.

The feature classes whose fields I will need to populate may not be gathered in a single workspace. And I may not want to perform this function on all feature classes within a particular workspace.

It seems a variable number of arguments may be necessary and that is what I have tried to perform with script similar to that shown below. The script below results in a runtime error: IOError: "[u'NameOfAFeatureClass']" does not exist. Comments in script identify some of my attempts to debug. I am running this script in the ArcMap Python window. I need to determine why the Populate function is not finding the feature classes.

mxd = arcpy.mapping.MapDocument("CURRENT")
for lyr in arcpy.mapping.ListLayers(mxd):
    if lyr.supports("DATASOURCE"):
        mylist = []
        mylist.append(lyr.name) # also tried mylist.append(lyr)

''' I tried creating a function too:
def MxdFCs():
    mxd = arcpy.mapping.MapDocument("CURRENT")
    for lyr in arcpy.mapping.ListLayers(mxd):
        if lyr.supports("DATASOURCE"):
            mylist = []
            mylist.append(lyr)
            return mylist
MxdFCs()
'''

def Populate(*args):

    FieldOne = arcpy.ListFields(args, 'FieldOne')
    for field in FieldOne:
        if field.name == 'FieldOne':
            arcpy.CalculateField_management(args, 'FieldOne',
                                            expression='999',
                                            expression_type='PYTHON_9.3')

    FieldTwo = arcpy.ListFields(args, 'FieldTwo')
    for field in FieldOne:
        if field.name == 'FieldTwo':
            arcpy.CalculateField_management(args, 'FieldTwo',
                                            expression='999',
                                            expression_type='PYTHON_9.3')

Populate(*mylist)


texts:
I've been reading Wikipedia and am having a bit of trouble.

https://en.wikipedia.org/wiki/Latitude

Geodetic latitude would clearly change if the Earth were squashed vertically.

But would places like London retain their original geocentric latitude if this happened?

Or would geocentric latitude change, too?

I made these two images.

The left image is of a perfect sphere. The right image is of an oblate ellipsoid with geodetic latitude lines. The height of the right ellipsoid is equal to sin(45) times the height of the left sphere.

The yellow dot on the left image marks Greenwich, England.

Where should the yellow dot go on the right image?

If someone could place the dot roughly, then I can then work backwards to answer my question.


texts:
I'm trying to download the OSM data for the province of Utrecht, the Netherlands. I'm following the steps as prescripted in the training manual, 7.2.4..
I have already loaded the provincial roads shapefile from here: http://www.nationaalgeoregister.nl/geonetwork/srv/dut/catalog.search#/metadata/fff94270-b5ce-4ed9-ae99-5f96096ac08d?tab=relations
So, that should give the right area I think. The coordinates given by the default are 4.76286-5.60752, 52.3291-51.8564. I figured those might be wrong or too big, but using google maps to find coordinates very similar to those. The OSM file exceeds 1GB, is there a way to see what exactly I'm downloading and select from that?


texts: Not Able to Create New Feature Class From Selecting By Attribute

texts:
Can you please take a look at this demo and let me know why I am not able to create new feature class from a shapefile based on selecting by attribute and saving the new feature class in a Geodatabase?

The file is adding to the GDB but it is empty on attributes and geometry.

# Import arcpy module
import arcpy

# Local variables:
Dataset = "D:\\GIS\\TPK\\src\\New Folder\\lui.gdb\\Dataset"
Louisiana = "Louisiana"
Louisiana__3_ = Louisiana
mm = "D:\\GIS\\TPK\\src\\New Folder\\lui.gdb\\Dataset\\mm"

# Process: Select Layer By Attribute
arcpy.SelectLayerByAttribute_management(Louisiana, "NEW_SELECTION", "\"NAME_2\" = 'Acadia'")

# Process: Create Feature Class
arcpy.CreateFeatureclass_management(Dataset, "mm", "POLYGON", "Louisiana", "DISABLED", "DISABLED", "", "", "0", "0", "0")


texts: Preventing text file automatically adding to ArcMap when using python?

texts:
I have a python script where I write result into a text file and I don't want to add the text file in my map document. But it is added automatically.

I tried with this line:

arcpy.env.addOutputsToMap = False

but it doesn't work.

import arcpy
arcpy.env.addOutputsToMap = False

txt_file = arcpy.GetParameterAsText(0)
fichier = open(txt_file, "w")
fichier.write("test")
fichier.close()

Are there any way to not add the text file automatically?


texts:
I uploaded a shapefile from JOSM to OpenStreetMap a week ago and I still cannot see  any changes on osm map. Yet when I visit my profile I see clearly that the shape was uploaded.

Do you know how much time the approval takes?

Or maybe what could be wrong with the shape?


texts: Getting unexpected field name from ArcPy

texts:
Why does the code below come up with different field data names?

When I save in a GDB it comes up with underscore() on the end of the field name & when saved as .shp it comes up with no underscore().

import arcpy

# Envrionmental variable
arcpy.env.workspace = arcpy.GetParameterAsText(0)
arcpy.env.overwriteOutput = True

# Variables
in_StatisticsTable = arcpy.GetParameterAsText(1)
in_ExcelFile = arcpy.GetParameterAsText(2)
Field = arcpy.GetParameterAsText(3)
in_BufferFeatures = arcpy.GetParameterAsText(4)
BufferDistance = arcpy.GetParameterAsText(5)
out_Feature = arcpy.GetParameterAsText(6)

try:
# Summary Statistic
   out_StatisticsTable = arcpy.env.workspace + "\out_SummaryStatistics.dbf"
   StatsFields = [["Area", "SUM"]]
   arcpy.Statistics_analysis (in_StatisticsTable, out_StatisticsTable, StatsFields, "Brgy")

# Excel to Table
   out_Table = arcpy.env.workspace + "\Out_ExcelToTable.dbf"
   arcpy.ExcelToTable_conversion (in_ExcelFile, out_Table)

# Join Field
   in_JoinField = out_StatisticsTable
   joinTable = out_Table
   JoinField = ["Brgy", "ADD"]
   arcpy.JoinField_management (in_JoinField, Field,  joinTable, Field, JoinField)

# Join Field
   in_JoinField = in_StatisticsTable
   joinTable = out_StatisticsTable
   arcpy.JoinField_management (in_JoinField, Field,  joinTable, Field)

# Feature to Point
   in_HouseHoldFile = in_StatisticsTable
   out_FeatureToPoint = arcpy.env.workspace + "\out_FeatureToPoint.shp"
   arcpy.FeatureToPoint_management (in_HouseHoldFile, out_FeatureToPoint)

# Buffer
   outfeatureclass_Buffer = arcpy.env.workspace + "\out_Buffer.shp"
   arcpy.Buffer_analysis (in_BufferFeatures, outfeatureclass_Buffer, BufferDistance, "FULL", "ROUND")

# Intersect
   in_Intersect = [out_FeatureToPoint, outfeatureclass_Buffer]
   outfeatureclass_Intersect = out_Feature
   arcpy.Intersect_analysis (in_Intersect, outfeatureclass_Intersect, "ALL", "", "INPUT")


texts:
We're upgrading our Leaflet maps to be larger on the screen and doing so in part by putting information panels, etc. over the map with varying transparencies. Obviously this is easy to do by absolutely positioning HTML next to the #map element (where the Leaflet map is put into). It can be made to lay over it nicely, however we have a Maximize control for full-screen map viewing and I'd like our custom HTML to be visible in that view as well.

I haven't seen a way to do this through the Leaflet API, itself. Thus, through experimentation, I put our custom HTML within the #map element pre-initialization. To my surprise this worked (Leaflet appends its elements within the #map element, retaining what's already there). The problem with this is that our map click event is firing even when our custom HTML elements are being clicked on. Similarly, drawing on the map functions through our custom HTML as well. This isn't the case with other Leaflet-added controls and I'm at a loss as to how to make our custom HTML likewise exempt from map interactions.

How do we get our custom HTML within scope of the Maximize functionality but outside the scope of map interactions?

We plan to use this convention heavily so this is important for us to pin down.


texts: Script error searching for tools in ArcGIS 10.2.1 search window

texts:
Until I tried installing Visual Studio 6.0 and Crystal Reports 8.5 last week, my ArcGIS was working perfectly. After the installation, however, every time I try to execute any search in the search window in ArcGIS 10.2.1 (both ArcMap and ArcCatalog), I get a script error with the message Object reference not set to instance of an object on Line 93.

Below is the function from the file which is causing the error described.
    function DoSearch()
    {
    var st = document.getElementById("st_ID").value;
    if ((st == null) || (st.replace(/\s/g,"") == "") || (st.lenght == 0))
    {
    if(GetContextCode(currentContextOnPage) != 6)
    $('#st_ID').unbind('keypress');
    else
    {
    var autoCompStr =  getAutoCompleteStrings();
    $("#st_ID").autocompleteArray(autoCompStr.split('+'),
    {
    delay:10,
    minChars:1,
    matchSubset:1,

    autoFill:false,
    maxItemsToShow:15,
    width:0
    });
    }

    document.getElementById("st_ID").focus();
    return;
    }

    var context = GetContextCode(currentContextOnPage);
    window.external.DoSearch(st, context); // <-- Error line
    }

The following are things I tried that did not yield any positive result:

Uninstalled Visual Studio 6.0 and Crystal Reports
Uninstalled and then reinstalled ArcGIS
Replacing the MdDlgContent.xsl and MdDlgHelp.xsl files with the contents of ver10.zip file as described in ESRI KB38099 here.
Updated my Java RE to the latest available this morning (Java 7 update 60 v7.0.600)
Installed all Windows Updates for Internet Explorer
Reset all Internet Explorer settings
Allow execution of all scripts

Surprisingly tool windows are not affected and I am able to run tools when I double click on them from the toolbox. The screen shot below shows the Buffer tool opened and displaying properly.

How do I fix this error?


texts: Getting map of what cells in raster are contained in different zones of polygon using ArcGIS Spatial Analyst?

texts:
I am using ArcMap 10.2.2 with Spatial Analyst.

I have a few different gridded datasets describing attributes of a city. All those datasets overlay the same gridded area so that the cell in row X column Y for any of those datasets corresponds to the same geographic location.

I also have the city delineated in zones (e.g. Census block groups) in a polygon file.

I need to know which cells in the grid(s) correspond to which zones (block groups) for further analysis. An ideal product would be a raster that is aligned with the other gridded data, with the attribute of the raster being the zone ID that the cell is mostly within. So if three cells of my grids are mostly in zone B, the product I'm after would be a raster grid with the value of those three cells = B.

A little more context in case it matters: Each of my raster datasets has different types of data, some are percentages of an attribute and some are classifications. The important thing is a cell in any of the grids refers to the same place. The polygon with zones lists the zones by a numerical ID. The end goal here is the use the desired product described above to analyze the grids of data zone-by-zone in batch based on the 'zone grid' showing me what cells should be grouped and processed together as each zone.

I've tried using zonal statistics but I don't need statistics about the raster values in each zone, I need a map of what cells are contained within each zone.


texts: Postgis create polygon extent/convex hull from spatial table

texts:
Please help,

I have a polygon layer representing building footprints. I want to create new view in postgis that will contain rectangle representing bounding box and also another view that will have convex hulls polygon of all records in buildings table.
I'm creating something like this:

CREATE OR REPLACE VIEW xxx.extent AS SELECT ST_ConvexHull(buildings_2013.geom) as geom from xxx.buildings_2013;

but I won't create spatial view. Could you please help?


texts: Is it possible to place random points within certain radius from a point?

texts: Similar to how you can place random points within lines and within a polygon.


texts: Openlayers GetFeatureInfo not working all zoom levels

texts:
I am sending GetFeatureInfo request to wms service. My parameter is like this. When I click to map, map click event is firing and I am sending this request to server.

    var params = {
            REQUEST: "GetFeatureInfo",
            EXCEPTIONS: "application/vnd.ogc.se_xml",
            BBOX: map.getExtent().toBBOX(),
            SERVICE: "WMS",
            VERSION: "1.1.1",
            X: e.xy.x,
            Y: e.xy.y,
            INFO_FORMAT: 'text/javascript',
            QUERY_LAYERS: layers_on,
            FEATURE_COUNT: 1,
            Layers: layers_on,
            Styles: '',
            WIDTH: map.size.w,
            HEIGHT: map.size.h,
            format: format,
            srs: map.layers[0].params.SRS};

My map has 10 zoom level. In zoom level-1 is working but zoom level 10 is not working. No error message occuring.


texts: "SSL Errors occurred accessing URL" QGIS 2.18.17 - Windows 10

texts:
Currently having this error when I start QGIS. A colleague of mine had the same error this morning on the same QGIS version, windows 10.

EDIT: I also had the same error crash my QGIS, while I was working.


texts: How to prevent single quotes turning my parameter into a string when using a workspace runner?

texts:
I have run the below query successfully on a spatial database in a standalone workspace:

st_intersects(st_setsrid(st_geomfromtext('$(poly)'), 27700), geom)

The poly parameter brings in wkt dynamically.

When I pass the paramater through a master workspace and run the query in the child workspace it treats '$poly' as a string rather than a parameter. If I remove the single quotes the WKT comes through as expected, however the single quotes are part of the spatial query so the SQL fails.

Has anyone got any advice on how to get around this problem?


texts: Update multi fields in multi shape files with arcpy

texts:
I have 3 shapefiles belongs to one state "District", "Mandal", "Village".

These three shapefiles have the same fields like DName, MName, VName.

I want to update all field in all shapefiles at a the same time with ArcPy update cursor.

I am new for ArcPy i tried but getting for single shapefile.


texts: Obtaining nodata information for ASTER datasets?

texts:
Is there any way to determine what the nodata value should be, in a set of geotiff images that do not have the 42113 tiff tag ?

I am trying to get elevation information, programatically in c++, and I have encountered areas that return a value of -1 (when I skim over the longitude/latitude points in Global Mapper, and I get to certain points the cursor seems to  just skip over them and the elevation shows -1, jumping from something like 200 so I know the info is missing on that exact point).

I would like to have some way of determining an invalid value for the elevation/ nodata, but I haven't found anything in my searches. And I don't trust my assumption of -1 being bad data, since it can be a very reasonable elevation.


texts: Hosting PostGIS database on a personal Google Drive?

texts:
We are a not for profit charity trying to manage/minimise costs for a GIS project being used to characterize freshwater resources and share the results.

We currently have a "migrator" which pulls data from an Epicollect5 cloud database into a Google hosted PostGIS environment.   From there the data is manipulated via an API for use in QGIS (mapping/interpretation) and in a WebMap (data graphing).  This workflow is costing money.
Is there an alternative to PostGIS on Google, we can use DynamoDB for part of the workflow but this does not support geospatial data interrogation.

Can we use a personal Google Drive for postGIS hosting, or are there alternatives for what we want to achieve?


texts: Layers not locking and exporting incorrect maps in QGIS composer?

texts:
I have a map of the US, with insets for Alaska and Hawaii. All 3 are different projections. In composer view, this is what I see:

However, what's exported is this:

When composing, the "Lock layers", "Lock styles for layers", and "Lock items" are not even remotely working. I.e. if I were to click Refresh in the above composer view, all three inset maps would update, even though I have locked everything I possible can on all three layers. "Draw map canvas items" is also unchecked for all three, for what it's worth. I suspect this may have something to do with the exporting issue. I think QGIS refreshes each little map before it exports, and this is where the locking issue comes in.

In short: what can I do to either ensure these layers stay locked, or to make sure the export matches what's in the composer view?

These two solutions have not worked for me:

QGIS Print Composer Export problems

How to handle multiple map frames with different layers in one print layout?


texts: Giving different attribute value to not connected polylines ArcGIS Pro/Python

texts: I have 33245 not connected/not touched polylines in 5 rows (with Z value). How to merge all polylines which is in one line (more close to each other) to give them attribut value? Result should be 5 merged rows (let's say X1, X2, X3, X4, X5) with different attribute (from 1 to 5). Not need to connect lines. Is there are some ready ArcGIS functions? Or would be thankful for algorithm tips for python. I am beginner user of Python.


texts: Google Earth Engine: Filter collection by system:index

texts:
I am trying to filter a Sentinel-2 collection by the system:index property. I have selected three specific tiles identified by its respective id, then tried filtering them from a collection using filter(ee.Filter.eq()) function, but it does not load any image. It works well for filtering only one image id, but is not working with several at the same time.

var tiles = [
  '20190129T160521_20190129T161214_T17RMN',
  '20190106T160511_20190106T160506_T17RNJ',
  '20190106T160511_20190106T160506_T17RNK'
]

var filtered = ee.ImageCollection('COPERNICUS/S2')
  .filter(ee.Filter.eq('system:index', tiles))

print(filtered.size());

https://code.earthengine.google.com/51da7be720dd9e67e9e32fa3c6fafb85?noload=true

I appreciate any help.

Best,

Luis


texts:
In QGIS 3.10 (Latest LTR) there are several unit types, see image below

What is the core difference between those units, in sense of their visualization behaviour on the Map?
What I noticed by so far, that some features do not always work with Millimeters, e.g. "Geometry Generator" and therefore you somehow need to switch from one unit to a different one.
On the other hand, you may work with a map, for example in a Print composer, and furthermore, such unit change can cause a huge impact on your visualization outputs.
Hense, I am looking for some kind of transforming strategy/approach that can lead me to the same visualization outcome but with the application of various Units.
Perhaps someone can refer me to any kind of explicit source with explanations.

References:

Changing units project wide from 'Millimeter' to 'Map Units'
QGIS Docs | The Symbol Selector
How map unit affects the caption size in the label in Qgis?


texts: Tools for drawing weather-rose-overlays on maps/locations

texts:
I need to create a map with points-of-interest. My initial idea is to "build" wind-roses using KML file and Openlayers: https://openlayers.org/en/latest/examples/kml.html.
This seem a bit labor intensive, so I wonder if anyone has any good alternative suggestions for this. Tools, programming language, etc. all is open.
The points-of-interests shall have an transparent overlay of a wind rose when selected.
WindRose example:


texts: zonal statistics / join with two vector layers

texts:
I have a shapefile containing three polygons of river basins with different values. I want to know the average values per country. The country thus contains three river basins. When I use join in Arcgis or join by location in QGIS the average value is just the average of the three values, not weighted by the amount of (area) overlap.

example:
basin 1 value 1 overlap 1% ;
basin 2 value 9 overlap 99%
should result in an average value of 8.92 and not 5

the eventual analysis is a global one so speed is critical. I am aware of the option the rasterize and use zonal stats.


texts: Can you do simple geoprocessing in .NET framework? (not mapping applications, not desktop add-ins)

texts:
So I will be creating a web application in .NET. It's a data entry application where someone will be inputting a bunch of a stuff from a datasheet and we'll suck it into some database tables that are part of an ArcSDE database. Some of this data will be "manufactured" with conditional statements based on what they input into the form, and here is where geoprocessing comes into play. The user will input a piece of information into the form and if it is of a certain value, we will pull spatial data from the database and do some geoprocessing. It'd just be a buffer and an intersect, pretty simple stuff to do using arcpy...but I need to integrate this into .NET somehow. Can you do geoprocessing inside of .NET? Do you have to call out to a python script?

I've read a bunch of stuff on ArcObjects SDK for .NET and then there's also ArcGIS Runtime SDK for .NET and I don't really know what to use. ArcObjects seems to be all about creating add-ins for the ArcGIS Desktop interface which isn't what we're doing at all. ArcGIS Runtime SDK seems to be all about creating web mapping applications which also isn't what we're doing. I just want to be able to do some geoprocessing in the background, return a value based on the result, and save it to a database table. This doesn't seem like something impossible to do within .NET (whether I have to call to a python script or not).


texts: Converting PostGIS table to Shapefile in Python?

texts:
I want to convert a PostGIS table into a shapefile (without using pgsql2shp).

In order to create a geometry in the shapefile I have to give the Xmin,Ymin and Xmax,Ymax, and the geometry which I have in my PostGIS table is an irregularly shaped one (I can get the exterior using bounding box but that will include some extra area more than my area of ineterest). Is there any method by which I can get the task done?

I want to do the thing programmatically and using Python.


texts: Exported OSM database do not contains node names

texts:
I've used osm2pgrouting tool to export data from osm file to my postgresql database. Now I have database with this schema:

osm_node:
   -node_id
   -osm_id
   -lon
   -lat
   -numofuse
   -the_geom

osm_relations:
   -relation_id
   -type_id
   -class_id
   -name

osm_way_classes
   -class_id
   -type_id
   -name
   -priority
   -default_max_speed

osm_way_tags
   -class_id
   -way_id

osm_way_types
   -type_id
   -name

pointcloud_formats
   -pcid
   -srid
   -schema

relation_ways
   -relation_id
   -way_id
   -type

spatial_ref_sys
   -srid
   -auth_name
   -auth_srid
   -srtext
   -proj4text

ways
   -gid
   -class_id
   -length
   -length_m
   -name
   -source
   -target
   -x1
   -y1
   -x2
   -y2
   -cost
   -reverse_cost
   -cost_s
   -reverse_cost_s
   -rule
   -one_way
   -maxspeed_foward
   -maxspeed_backward
   -osm_id
   -source_osm
   -target_osm
   -priority
   -the_geom

ways_vertices_pgr
   -id
   -osm_id
   -cnt
   -cnt
   -chk
   -ein
   -eout
   -lon
   -lat
   -the_geom

In osm2pgrouting I use this command:

osm2pgrouting -f myCity.osm -c mapconfig.xml -d postgis_db -U postgres -W postgres --addnodes --clean

Only in table ways has some ways names ... What I do wrong or how can i get streets with numbers etc.


texts:
I have recently downloaded a building footprint GeoJSON file from Microsoft Bing Maps. The file I downloaded was for the entirety of Texas, and is of approximately 2.2 GB file size. They do not provide the data in any smaller sections for the state of Texas.

My issue is that I am unable to convert this GeoJSON into any usable format, such as a shapefile. I have tried to use https://mapshaper.org/ but my file size is too large and the website crashes. Similarly, I have tried to open the GeoJSON in QGIS, but that program crashes as well. I know ArcGIS has the Data Interoperability Toolset, but that requires a special license.

Does anyone have any other techniques to convert a large GeoJSON file?


texts: Displaying multiple 2d raster layers on top of each other in ArcScene

texts:
I have 4 raster layers of the same shape but different values for each cell that I want to overlay on top of each other. This should be with some vertical space between each, so you can see the bottom 3 layers partially with a full view of the 4th layer on top. I've tried converting my layers into 3d layers, and feature classes, etc. but no matter what when I look at the Base Heights tab, the middle section "Elevation from Features" is greyed out.

I'm currently using ArcGIS 10.3.1.


texts: Looping through list of shapefiles to rename them using ArcPy?

texts:
I am trying to upgrade a simple script to list all shapefiles in a folder and if necessary in any folders within and then loop through the list of shapefiles and rename them.

import arcpy

# Set work environment
arcpy.env.workspace = "C:\\Users\\Rachael\\Documents\\Export"

# List shapefiles in folders
shp = arcpy.ListDatasets()

try:
  for shp in arcpy.ListDatasets():
    if arcpy.Exists("Histori2.shp"):
      arcpy.Rename_management("Histori2.shp", "H_BEV_CANS.shp")


texts:
Is there any 'easy' way to alter or add custom variables in a QGIS Composition in a Python script?

Setting a project variable can be done with QgsExpressionContextUtils.setProjectVariable, but is there any method like that for composition variables?


texts: How to render a table with mixed geometry types in QGIS?

texts: I created a table with geometry type "GEOMETRY" AND inserted data of point, line and polygon type. My question is how to show this spatial data Qgis not supporting for geometry type "GEOMETRY".


texts:
When creating convex hulls based on input field in qgis 1.8, there seems to be always one less convex hull created for the unique values in the input field.

For example;

I have a point vector file, and it has a field in its attribute table called 'type'. This field has two unique values, 1 and 2. When trying to create convex hulls for these types, only one convex hull is created, encompassing the 'type' value 2.

The point vector file also has a field called 'year'. This field has three unique values, 2007, 2008 and 2009. When creating convex hulls for these types, only two convex hulls are created, encompassing 2008 and 2009 values only.
I've tested this further with other vector files and it always seems to be the case that the lowest integer value is ignored when the convex hull process is run.

I have also tested this with text based fields, it also creates one less convex hull than the number of unique variables in the text field.

This issue was not present in previous verisons of qGIS. Can any of the developers or anyone else shed some light on this?

As a workaround, a dummy feature has been included in the attribute table with an additional variable where its value is lower than that of the other unique variables.


texts: Join line segments sharing a common attribute, using GDAL

texts:
I'm having trouble rendering a shapefile consisting of trail routes broken down into many short segments. So I'd like to combine them into a small number of line features, which share a NAME and touch each other.

Is this possible using GDAL? Failing that, are there other tools that don't require scripting? (I see this Python script could probably be adapted but I'd prefer a more general solution if available...)