texts: Trying to extend ol.Tile in OpenLayers 6

texts:
I am upgrading my app from OpenLayers 4.6.4 to 6.4.3 and I can't access ol.Tile anymore.  My code is as follows which works in 4.6.4 (using ol-debug.js).  What would I do to achieve the same access to ol.Tile in OpenLayers 6 ol.js?
My index.html is:

<link rel="stylesheet" href="ol.css">

My MapView class contains the following (which works in OL4 ol-debug.js but not OL6 ol.js).  It seems that Tile is only available if I import ol-debug.js (which doesn't exist in OL5 and OL6).  Is there any way around this?  Or can someone help me understand how I can grab ol.Tile to extend it?  Note: my main project's codebase is a bit old and is still using RequireJS.
class CanvasTile extends ol.Tile {
  constructor(options) {
    super(options);
  }
}

The error I get when it tries to access Tile on ol is:

Uncaught TypeError: Class extends value undefined is not a constructor or null


texts: Installing Qgis Server on Windows 7 Machine

texts: I have been trying and trying to get Qgis Server to working on my Windows 7 machine with no luck.  I have read every thread out there on the web related to how to install and nothing works.  I'm beginning to think that it's all just a nasty joke that someone is trying to play and that there isn't really a Server available.  If anyone has any step-by-step directions that actually work, would love to hear.


texts: Changing from stereographic north pole to WGS 84?

texts:
I'm trying to use a vector file created with these parameters in Esri ArcGIS 9.3.1.

Projected Coordinate System: Oblique_Stereographic
Projection: Stereographic_North_Pole
false_easting:  500000.0
false_northing: 500000.0
scale_factor:   0.99975
longitude_of_center: 25.0
latitude_of_center:  46.0
Linear Unit: Meter

Is there a way to convert/transform the vector file created in WGS 84?

There is the vector file: elevation data


texts: Refresh Map on HTML page when data change

texts:
I am new about Carto and I have a question.
I would a HTML page with Carto Maps (using JavaScript) and I would refresh the page when the data on CartoDB change.

So I ask if there is a sort of Push Notification (as CometD library).


texts: Adding height from nearest XYZ point to geom table in PostGIS?

texts:
I have been trying to get this query right and just can't seem to.

I have a building polygon table with over 7 million polygons, indexed. I then have a gridded height XYZ table with attribute 'height' spaced at 50m, which is also indexed.

I want to create a new table by selecting the closest height point to the centroid of the polygon and take the height attribute and add it to the building.

The query I was using at the moment is:

CREATE TABLE buildingheight AS
    SELECT DISTINCT ON (b.ogc_fid) b.ogc_fid, b.ID, b.wkb_geometry, h.height
    FROM building b JOIN xy_height h ON ST_DWithin(b.wkb_geometry, h.geom, 50)
    ORDER BY b.ogc_fid, ST_Distance(b.wkb_geometry, h.geom);

I tested this on a sample of 400 buildings but only a certain number gained the height attribute.

This was a hash of code I found from some other posts.

I have also tried to use the ST_ClosestPoint:

CREATE TABLE buildingheight2 AS
    SELECT b.ogc_fid, b.ID, b.wkb_geoemtry, h.height
    FROM vmd.building b, gb_xy_height h
         ON ST_ClosestPoint(h.geom, ST_Centroid(b.wkb_geoemtry) LIMIT 1;

And also the new nearest neighbour posted on: http://blog.opengeo.org/tag/knn/

I am surprised no one else has done this as I thought with all the LiDAR data, that this query would be straightforward.


texts:
I am working on Google Maps with AirMap API. AirMap API provides me with vector tile data in pbf-format.

I want to render it into Google Maps. I have researched that to render pbf vector tiles on Google Map, I need to convert it into GeoJSON data. I have a lot researched about it but I haven't found any tool to convert PBF to GeoJson or tutorial. Any suggestions about how to?


texts: copy column into another layer column programatically

texts:
I have two layers where different columns exist. I want to copy a layer column into antoher layer column programatically. I have done the below code so far:

layerNameValueSet = "PLATFORM"
#columnNameSet where to value add
columnNameSet = "ZONEID"

#LayerName Where to copy column values
layerNameValueGet= "LOT"
#Above layer's[layerNameValueGet] cloumn name from value will be get for copy in layerNameValueSet
columnNameGet = "ZONEID"

#Getting layer of specifc name
layerNameValueSetObj = QgsMapLayerRegistry.instance().mapLayersByName(layerNameValueSet)[0];
layerNameValueGetObj = QgsMapLayerRegistry.instance().mapLayersByName(layerNameValueGet)[0];

fieldIndexToSet = layerNameValueSetObj.fieldNameIndex(columnNameSet)
fieldIndexToGet = layerNameValueGetObj.fieldNameIndex(columnNameGet)

for getFeature in layerNameValueGetObj.getFeatures():

    #this logic is not correct /taking too much time hanging

for setFeature in layerNameValueSetObj.getFeatures():
    if(getFeature.id() == setFeature.id()):
        layerNameValueSetObj.startEditing()
        updateValue = getFeature[columnNameGet]
        layerNameValueSetObj.changeAttributeValue(setFeature.id(), fieldIndexToSet, updateValue)
        layerNameValueSetObj.commitChanges()


texts: Exporting ArcMap Animation with Transparent Background?

texts:
Because ArcMap (10.3.1) only exports animations at a screenshot level (not high resolution, at all), I would like to export a high-res basemap as a standalone image. It would then be ideal to export just animated points with a transparent background over top of the static map. This is an issue because ArcMap to my knowledge does not support PNG in the "export animation as sequential images" window (only BMP and JPEG).

Am I missing something here? Or is there a workaround to allow transparency in a BMP format?


texts: How to convert a SRID/SRS in PostGIS into Well Known Text (WKT)?

texts:
Is there a PostGIS function for obtaining the WKT of an SRID in PostGIS?

By WKT, I mean the ones that can be uploaded to spatialreference.org.

I'm trying to create a new SRID/SRS by tweaking existing SRID/SRS. But couldn't find a way to obtain the WKT. Search results mostly show ST_AsText, which is for converting geometry/geography to WKT.


texts: Algorithm to put label of bounds (bounds layer) inside of polygons (polygon layer)

texts:
I hope to put labels of bounds inside of the polygon in intersection with like you can see in the picture below.

I have checked multiple solutions as a topology or Maplex but it doesn't create the relationship between the labels of the  point layer and another polygon layer...

So I think I necessary should pass through a programmation.

I thought to make this algorithm :

Convert label to annotation
Calculate XY of each annotation
force each annotation to enter in the nearest corner of the polygon in intersection with

I'm not keen to follow this algorithm, I'm looking for any other suggestion.

I'm using ArcGIS 10.1, arcpy, ArcObjects


texts: Issue with delineation using dem because of a DAM

texts:
I have a high-resolution DEM which I use it delineate watershed.
I am getting the delineation like this

The main branch is not getting delineating till the source.
So I used a hillshade to check the issue.

A presence of a Dam is actually causing the issue and the values in the dem suddenly peaks due to it.

How do I fix this issue using Qgis?


texts: sending a XAPI-Request to the API-Server - over http

texts:
pretty new to Geo-Informatics so do not bear with me if my questions sound like newbie-questions: can i do some requests on POIs of Openstreetmap with XAPI.

doing like so: i send a request to the  API-Server - over http
as a respond i get the following result - in XML

example: the following link gives back all the Nodes of the Type amenity=restaurant in XML-Format.Note: the bounding box (bbox) limits the area:

http://xapi.openstreetmap.org/api/0.6/node[amenity=restaurant][bbox=9.4908142,48.7810801,9.5660019,48.8387351]

see here the results:_

<?xml version='1.0' standalone='no'?>
<osm version='0.6' generator='xapi: OSM Extended API 2.0' xmlns:xapi='http://www.informationfreeway.org/xapi/0.6' xapi:uri='/api/0.6/node[amenity=restaurant|fast_food|pub|cafe][bbox=9.4908142,48.7810801,9.5660019,48.8387351]' xapi:planetDate='20100824' xapi:copyright='2010 OpenStreetMap contributors' xapi:license='Creative commons CC-BY-SA 2.0' xapi:bugs='For assistance or to report bugs contact 80n80n@gmail.com' xapi:instance='zappyOsm'>
 <node id='721241970' lat='48.830856' lon='9.5116892' user='mabe75' timestamp='2010-05-04T19:01:28Z' uid='260302' version='1' changeset='4607010'>
 <tag k='amenity' v='restaurant'/>
 <tag k='name' v='Lamm'/>
 </node>
 <node id='392682646' lat='48.8315734' lon='9.5468864' user='MattGPS' timestamp='2010-05-11T19:00:20Z' uid='12973' version='3' changeset='4671372'>
 <tag k='amenity' v='restaurant'/>
 <tag k='name' v='Gasthaus an der Wieslauf'/>
 </node>
 <node id='319597380' lat='48.8277913' lon='9.5477029' timestamp='2008-12-17T21:13:15Z' version='1' changeset='444629'>
 <tag k='amenity' v='restaurant'/>
 <tag k='name' v='Gasthaus zur Linde'/>
 </node>
[...]

well this example does not work here... what do ido wrong

update:

although this page doesn't explicitly say where xapi.opentreetmap.org points to these days, it does say that jxapi.openstreetmap.org (which it might point to) is down for maintenance right now. However, Mapquests's jxapi instance should be up, so we should be able to do that. Well actually i did a try and did just this:

wget http://open.mapquestapi.com/xapi/api/0.6/node[amenity=restaurant][bbox=9.4908142,48.7810801,9.5660019,48.8387351]

and it works. Note that there's an extra "/api" in the Mapquest xapi URL. The bbox is currently limited to 10 square degrees. See the various links from the XAPI wiki page for more info, including the terms of service for the Mapquest instance of the XAPI.

Any idea how i can delimit the bbox - in order to run over a whole town like Hamburg or Berlin or lemme take Paris for example

By the way. How to get the results stored in a databasse- note i have to convert the xml to a db-sheme.. mysql is preferred- any idea and helping hand is greatly appreciated


texts: Is Sentinel-1 GRD product Sigma0 or Gamma0 in Google Earth Engine?

texts:
I am using Sentinel-1 SAR GRD imagery with IW and EW swaths from ESA through Google Earth Engine.

Is the pre-processed Sentinel-1 GRD product that I access through GEE is Sigma0 or Gamma0 or Beta0?

Also how can I convert from Sigma0 to Gamma0?


texts: Using model/sub-model to iterate through lines and extend them in ArcGIS Pro?

texts:
I'm trying to build model which create from XY values lines two times and then loop through them to extend each of them individually and merge them back. I built two models: 'main model' that creates lines from XY values, calls support model and merges lines back.

And another 'support model' which loop through my lines and extend them (or should be doing it).

My problems:

support model extend each line, create output but not allow me to merge lines with the same name
cannot merge my looped left and right lines back,
looping is quite slow (for 150 lines it takes about 15 min).

I assume there is a problem with the output from support model but I don't know how to fix it.

I figure out that i need to collect my output which generates me output lines but with the same name. Now I'm trying to push nr to the end of each name and strange thing start to happening.

I calculate name for each line adding %output_value% at the end of copy feature output but its still grey. I added also connection as precondition but it won't help. When i run model inside model builder it works, i see that it gives my shapefiles new names but it not generates output. In the other hand when i run model through geoporacessing it creates "ERROR 0008000 - The value is not a member of ."  I tried also with parse path but it creates same error.

Any ideas how to solve it?


texts: Link raster (.tiff) with attribute table (.txt) in QGIS or R

texts:
I am new in GIS, and I downloaded a gridded dataset from this source

The data come with a raster file as well as a range of attribute data files. In ArcGIS I can easily join the .mdb Microsoft Access attribute table with the .adf raster. However, I am now in a Mac, that can't handle .mdb. Fortunately the data is also downloadable in an interchangeable format, including a .tiff raster file together with several .txt files with attributes.

How can I link the TIFF with the TXT data in R or QGIS from a Mac?

Once uploaded, how can I select one particular attribute (and discard the others) similar to what I would do with the lookup function? The idea is to finally save a raster in tiff with only one specific column among all the different variables included in the attribute tables.


texts: How to create buffer around point having projection 4326

texts:
I am trying to create buffer (in meters) around point(long lat alt) which is in projection 4326 with below code. But it is not giving expected output.

SELECT ST_AsTEXT(ST_Buffer((ST_GeomFromText('POINT(78.385333 17.433293 0)', 4326)),63.763271854));

But if i convert point to geography it is giving correct result.

SELECT ST_AsTEXT(ST_Buffer((ST_GeomFromText('POINT(78.385333 17.433293 0)', 4326))::geography,63.763271854));

What this st_buffer doing with geography datatype. Without converting it to geography how can i do that? I am new to postgis.


texts: How to read part of a TIFF as array and export it with its correct coordinates using GDAL?

texts: I would  like to be able to read a part of a TIFF file as a numpy array (using read as array(xoff, yoff, xsize, ysize) and be able to export it again to TIFF file, having this subset its correct coordinates. I was thinking obtaining the Geotransform from the original file, and adding/substracting from its coordinates, the offsets multiplied by the pixel size. I think that would give me the correct Geotransform to apply it when exporting. Would that be correct? Would there be any other way? (I dont want to use gdal_translate for this process).


texts: Can a plugIn in QGIS let me cut polylines where the points of another shapefile are?

texts: I want to know if there is a plugin/tool in QGIS, that let me cut lines of a shapefile where the points of another shapefile are.


texts: Estimating spatial autocorrelation from counts on linear network

texts:
I'm working with count data sampled along roadways. I would like to estimate the spatial autocorrelation of the counts, but I'm having trouble wrapping my head around how to incorporate the network structure of the roadways.

Consider for instance the spiders data set from spatstat, with a random count variable added (eggs maybe?):

set.seed(1)
spiders$data$count <- rpois(48, 10)
plot(spiders)

What would be the correct way to estimate spatial autocorrelation of counts along this network?


texts: Can I get the metadata about the themes in Oracle MapViewer?

texts:
I am trying to use the MapViewer xml api to generate a dynamic theme (for generic highlighting support), but don't want to expose table names and such to users, I would like then to communicate in terms of themes.  Is there some way that I can obtain the mappings from theme to table so that I can generate dynamic themes based on jdbc_query element?

The jdbc_query needs me to give it some SQL which identifies the instances to be included in the dynamic theme.  I want the user to be able to specify a theme name and then be able to construct an sql statement which gets the geometry of the nearest neighbour to a particular point on that theme.  To do this I need to know which table the data in the theme came from and which column contains the geometry in that table.

Can I find that information using an info_request perhaps?


texts:
I am running the tabulate intersection tool for two vector shapefiles - lines and polygons.
I am using it to calculate the length of various road classifications (i.e. arterial, collector, highways, local roads) within a given set of census block groups. Using the GEOID of each block group as zone fields and the functional road classification of US roads as the class fields, I should have somewhere between 1-4 records for each GEOID in the output. However, I lose roughly 4,000 of ~26,000 GEOID records in the output.
I looked back at some of the GEOIDs missing tabulate intersection output and they definitely have the class features (AKA roadways) that I am trying to calculate for them, so I'm unsure as to why the tool skipped them?


texts: How does latitude of origin work in Mercator

texts:
I'm trying to make a coordinate transformation using GDAL/osr python bindings. I have a longitude an a latitude and I want to transform them into the mercator coordinates.

So I define the mercator projection as:

srs = osr.SpatialReference()
srs.SetMercator(41.602, 2.403, 1, 0, 0);

and the input point projection as

srs2 = osr.SpatialReference()
srs2.SetWellKnownGeogCS("EPSG:4326")

When I transform the point supposed to be 0,0 in the mercator projection, using

transf = CoordinateTransformation(srs2,srs)
transf.TransformPoint((2.403,41.602))

The x result is 0, as expected, but the y is a high number: 3799198

What am I doing wrong?


texts: How to calculate Raster Area per Polygon?

texts:
In ArcMap, I have a raster file that contains 6 classes of landcover and a shapefile that is the census data (OA boundaries and their population).

I want the area of each class in each OA?

For instance, I need to add six columns to the census shapefile (i.e one column for each class) and calculate the area of that class in the appropriate OA...

Does anyone know how I can solve this?


texts: How to make a REST get request to Geoserver in Python?

texts:
I was wondering how to make a GET request to geoserver 2.6 in Python.

import urllib2, json
url = 'http://localhost:8080/geoserver/rest/workspaces.json'
authKey = 'admin:geoserver'
headers ={'Authorization': "Basic " + authKey}
params = {}
request = urllib2.Request(url, json.dumps(params), headers)

try:
    response = urllib2.urlopen(request, timeout=30).read()
    print json.loads(response)
except urllib2.HTTPError as e:
    print e
    print e.header
    print e.read()

with code above, I get HTTP Error 500: Server Error.
If I set the value of authKey to '', then I get "HTTP Error 401: Full authentication is required to access this resource"

So how can I set up the request header with authorization?

Update:
    I print e.headers in the exception, then I got:

Date: Tue, 17 Mar 2015 15:33:04 GMT
Content-Type: text/html;charset=ISO-8859-1
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 6639
Connection: close
Server: Jetty(7.6.13.v20130916)


texts: Differences between Python window and IDLE for Scripting with ArcGIS Desktop?

texts:
I'm making a power point presentation about the differences between Python window and IDLE for my coworkers. I only use the python window to get feedback from my custom toolbars. I tried using it once to help make sense of an ArcPy function.

It wasn't worth the effort and I really didn't get anywhere. I usually save my code as a python script in IDLE. I don't want to put together a presentation that just tells my coworkers that I don't like Python Window and neither should they so I'm looking for more information on Python Window in ArcMap.

So far I have:

The default environment is different
ArcMap is only 32-bit, while IDLE can be installed as a 64-bit
The ArcMap instance is already started if you're using Python Window
You shouldn't use python window for large scripts
ArcPy is already imported in Python Window

I want to make this as referable as possible; my goal is to create something that makes sense by itself so that it can be used as a reference.

Are there any other differences that I've missed that I should know about?

I've read Differences between Python window and Python script tool?, but I have a hunch - or misguided hope - that there's a little bit more to it than that.


texts: Raster Over Layer in Leaflet from GeoServer

texts: I want to add a raster over layer onto the base layer and the raster layer is published by a Geoserver WMS. I set the raster layer's geographic coordinate system as the same as the cloudmate tiles. The raster source is a layer of the United States in the GeoServer sample data. I can get the layer in Leaflet and do spatial queries, like query a part of the raster by bounding box successfully, which means the WMS is good. But the raster image never overlays correctly. I've set the same GCS and projection. Why does that happens? Is there any successful instruction or sample about it?


texts:
I am using the following instructions to read a TIGER/Line gdb into R.

The first commands work correctly and print out the feature classes:

fgdb <- "ACS_2014_5YR_BG_48_TEXAS.gdb"

subset(ogrDrivers(), grepl("GDB", name))
fc_list = ogrListLayers(fgdb)
print(fc_list)

 [1] "ACS_2014_5YR_BG_48_TEXAS"            "BG_METADATA_2014"
 [3] "X00_COUNTS"                          "X01_AGE_AND_SEX"
 [5] "X02_RACE"                            "X03_HISPANIC_OR_LATINO_ORIGIN"
 [7] "X07_MIGRATION"                       "X08_COMMUTING"
 [9] "X09_CHILDREN_HOUSEHOLD_RELATIONSHIP" "X11_HOUSEHOLD_FAMILY_SUBFAMILIES"
[11] "X12_MARITAL_STATUS_AND_HISTORY"      "X14_SCHOOL_ENROLLMENT"
[13] "X15_EDUCATIONAL_ATTAINMENT"          "X16_LANGUAGE_SPOKEN_AT_HOME"
[15] "X17_POVERTY"                         "X19_INCOME"
[17] "X20_EARNINGS"                        "X21_VETERAN_STATUS"
[19] "X22_FOOD_STAMPS"                     "X23_EMPLOYMENT_STATUS"
[21] "X24_INDUSTRY_OCCUPATION"             "X25_HOUSING_CHARACTERISTICS"
[23] "X27_HEALTH_INSURANCE"                "X99_IMPUTATION"
attr(,"driver")
[1] "OpenFileGDB"
attr(,"nlayers")
[1] 24

However, when I try to import specific feature classes, the following error occurs:

> X01 = readOGR(dsn=fgdb,layer="X01_AGE_AND_SEX")
Error in readOGR(dsn = fgdb, layer = "X01_AGE_AND_SEX") :
  no features found
In addition: Warning message:
In ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv,  :
  ogrInfo: all features NULL

These feature classes  do not  contain geometry data, which may be why there are no features found.

Is there workaround to read non-geometry feature classes into R from a gdb file ?  The only solution I've found so far is to use GDAL command line tools to export the feature class to csv which would then be read into R, but I would like to cut out this middle step.

ogr2ogr -f CSV output.csv ACS_2014_5YR_BG_48_TEXAS.gdb X01_AGE_AND_SEX


texts: I'm following the tutorial at http://www.hibernatespatial.org/tutorial-hs4.html. I've created a maven project, and imported it into Eclipse. However, when I run mvn dependency:list, I get the error Missing artifact org.postgis:postgis-jdbc:jar:1.5.3. The same error is reported from within Eclipse. Any idea on what I may be doing wrong?


texts: Normalising Drunk Driving and Postcodes data using ArcGIS Desktop

texts:
I have been provided a dataset of drink driving incidents aggregated into postcodes.  This is where the incident happened, not where the driver lives.

Postcode 1   - 12 incidents
Postcode 2   - 163 incidents
etc.

This is for an entire state in Australia, so just showing total counts will pretty much be a population map.

Therefore I will need to do a bit of normalisation.

With postcodes not being equal-area, my obvious choices are either area or population (which I have the information for.

Population might not be accurate, as there might be factors like particular rural areas being notorious for drink driving due to no public transport, or other factors.

Area seems incorrect, as lets say we have two equal area postcodes, one rural and one urban, is it fair to normalise by area alone?

I then considered other options such as calculating the total lengths of roads within each suburb and using that.

I don't have traffic data, but in an ideal world, would using some sort of traffic count data be also an option?

The essential question I want the map to answer is, "Where are the hotspot areas for drink driving within this state of Australia?"

How would you go about this?

Final result
http://au.news.yahoo.com/qld/video/watch/21428474/drug-and-drink-driving-hotspots-revealed/

The news guy did not quite follow the script/advice I provided, and I really wanted to avoid 3D, but you know media.


texts: Using online GIS map with shapefiles as basemap in ArcMap?

texts:
An official website is providing some GIS data as cadastre map with the following addres:

http://cadastre.mimt.gov.ir/Map/Map.aspx?PNid=0

The mentioned website's data are secure and are not available to download for users. I want to display the content of this website in ArcMap background as a basemap to compare with my own data. Because of the wide area of study area it is not possible for me to take screenshots and georef them!
Do you have any suggestion for me to overcome this problem?


texts: How do i query data like POI locations from OSM?

texts:
I posted a question on Reading terrain data from Google? and got an answer that opened up a whole new world to me; that google wasn't the only service that was logging/tracking GIS information.

My original question was not answered and i marked the first answer correct as i thought it would provide me (and other people) with enough information to solve the question.

I still don't know how to get the information i want. I want to call an API (from c# to be specific or just through http requests) that returns information about an area. I want to know what parts of the area is covered in forest, water, roads but i also need to know the location of different structures like stores, gas stations, atm's etc.

My initial understand is that while OpenStreetMap might be the central data storage, the real-time querying seems to be delegated to other services/servers/companies? Can someone confirm or correct me in this?

I searched and found an API documentation here http://wiki.openstreetmap.org/wiki/API_v0.6 but it doesn't help me much. Then i found MapQuest - i beleive that is a provider of data so i created an account. It seems i also need a developer account and i can't use the same email? I never managed to create a developer account - i blame a faulty UI but lets assume i get the account and a valid API key - HOW do i query the data i need.

Can someone give me an example - preferably a http GET request url encoded on how to query the information described for a given (you pick) location?


texts:
I'd like to create a line style in QGIS 3.4 where short text is written on the line. I am able to create a symbol layer in the line style, as a character symbol, but here only a single character is allowed.

Labelling is not an option for me, because the text is not an attribute of the line layer and text should be written several times on the line.

What I could create:

What I would like to create:


texts:
I cannot find anywhere why BLH (where B is geographical latitude, L geographical longitude and H is elliposidal height) is called BLH.

The origin of the letter H is clear, but what about B and L?

Many sources over internet, like this one, use these same symbols to represent geo points.


texts: Do I need to have QGIS installed on a machine to make use of it's python libraries?

texts:
I'm trying to make a simple stand-alone app to expedite the production of some site plan maps for my work. The maps are very formulaic, and follow a set template every time. With the QGIS libraries, I believe this may be possible to implement for free. I was thinking of making a simple app in python that takes a few strings of input from the user to fill in the boxes in the form at the bottom of the map document, connects to our geodatabase and the parcels layer, zooms to a parcel with an ID specified by the user, and generates a map of it and the surrounding area

Would I need QGIS installed on the machine to actually do this, or would i be able to get away with just including the libraries and installing GDAL?


texts: Field Calculator: Simple Python If-then and maths

texts:
I want to take all positive values in a field and multiply them by -1000. To do this, I put together the following code block:

def myCalc(x):
  if (x > 0):
    x*(-1000)
    return x
  else:
    return x

and then I call the expression:

myCalc( !FieldName! )

However, when I execute this field calculation, I get no warnings or errors, but the values in my field also don't change. The numbers look like this (before and after the calculation):

What is wrong with my code?


texts:
I have my plugin which works for QGIS 2.8.2.
I want to migrate the same for QGIS 3.0. I resolved initial error of pyqt4 to pyqt5 and so on.

Now I get following error for resources file.

TypeError: qRegisterResourceData(int, bytes, bytes, bytes): argument 2 has
 unexpected type 'str'

My existing resource file is compiled with pyrcc4 command. I need to compile it again with pyrcc5 command.

I went to my plugin folder from command prompt and did

pyrcc5 -o resources.py resources.qrc

'pyrcc5' is not recognized as an internal or external command,
operable program or batch file.

I have pyrcc5.bat in "C:\Program Files (x86)\QGIS 3.0\apps\Python36\Scripts"
When I try to run this batch file I get:

pyrcc5.exe not found anywhere in the folder.


texts: Improving upon ArcGIS Buffer/Dissolve performance?

texts: I'm wondering if anyone else has experienced significant performance penalties when using the ArcGIS buffer function with the 'dissolve' option on point features.  My dataset is a shapefile of 260 points, basically clustered into 9 groups so there is a significant amount of overlap.  The buffer option executes in a second or so, while the dissolve option executes in 12 minutes. So I'd be in trouble with 10,000 points, right? ESRI knowledge base wasn't too much help.


texts: I was following along reading some instructions. I entered an incorrect username in my EE code editor. How do I change the user name to my name?


texts: How do I convert MultiLines to MultiPolygons using Postgis

texts:
In postgis I'm using the following query to buffer lines to polygons:

UPDATE rivers
  SET poly = ST_Multi(ST_Buffer(lines, 0.01))
  where id = 1;

The column 'lines' is a MultiLine and the column 'poly' is a MultiPoly. In record #1 'lines' contains 92 overlapping Line types. I would expect the result of St_Buffer to be a MultiPoly, but it is just a Polygon (If I run the above query without St_Multi I get a sql error. What am I doing wrong?


texts: Color-code a Leaflet polyline based on additional values, e.g. altitude, speed,

texts:
I'd like to draw a GPX-track on a Leaflet map. The polyline shouldn't have only one color, but I'd like to show certain values like altitude, speed, heart-rate, temperature, cadence, slope color-coded. Of course only one value can be visualized at once.

The values would be stored together with L.LatLng, e.g. in a meta: {ele: 298, hr: 155} object.

I'm new to Leaflet and especially concerned about finding an efficient way to do this. The first which came to mind was to create hundreds or thousands of polylines each with a special color. But this sounds very greedy regarding memory and cpu.

Any ideas?

An example what I mean can be viewed here


texts: Customize the KML exported from Geoserver

texts:
I would like to customize the KML that is exported from Geoserver (2.5). Specifically, I would like to add a "name" tag under the "Document" tag and add an arbitrary number of "Folder" and "name" tags. The reason for this is to provide a hierarchal structure when the KML file is represented in a table of contents tree.

For example, I would like to customize the exported KML file to contain:

<kml>
    <Document>
        <name>Great Places</name>
        <Folder>
            <name>Heaven</name>
            <Folder>
                <name>The Garden Of Earthy Delights</name>
                .
                .
                .
            </Folder>
        </Folder>
    </Document>
</kml>

Right now I only get this:

<kml>
    <Document>
        <Folder>
            <name>...</name>
            .
            .
            .
        </Folder>
    </Document>
</kml>

Can someone point me in the right direction?


texts: I have scanned old map (no grid ref etc) and then assembled high res JPEG in Photoshop (but obviously could save in other file format, e.g., TIFF) I am now trying to georeference in QGIS 3 but on trying import raster I only have weird coloured box in middle of Georeferencer (where my map) should be. I can open other JPEGs (not photoshopped) but don’t understand what doing wrong. Is there something embedded in PS JPEGs that QGIS doesn’t like. Do I have to run through image converter? If so, what? I am running on a Mac.


texts: How do I detect solid fill tiles in mapnik?

texts:
I'm using mapnik (python api) to render a very simple map where land polygons are black and water is white. There are no other features on the map. I'd like to detect if my tile is completely solid (ie. either black or white) so I can mark the tile as being 'fully land' or 'fully water'... this would help me save a ton of space later on when I pack the tiles together.

I know you can call the painted() function on an image in mapnik, but I don't think this works if a feature gets painted.

>>> im = Image(256,256)
>>> im.background = Color('white')
>>> m = Map(256,256)
>>> render(m,im)
>>> im.painted() # should be False


texts: Processing area of interests within Grass GIS

texts:
I'm looking to process a region within a satellite image in Grass GIS. In ENVI I would create a region of interest (.roi) and then create a subset.

Say, if I have co-ordinates for a rectangle within my image, can I create a min/max bounding box and mask the area inside, then invert the mask so processing only applies to areas inside the region of interest?

If anyone can share their knowledge or even a google search term that will get me on the right track, it would be greatly appreciated


texts: How to resolve this error with GeoServer Explorer Plugin

texts:
This morning I changed my default password of geoserver and since then publishing layers or projects from QGIS not working using GeoServer Explorer Plugin. I am getting this error while trying to connect to Geoserver with the plugin:

Traceback (most recent call last):
      File "C:/Users/xyz/.qgis2/python/plugins\geoserverexplorer\gui\explorer.py", line 98, in run
        command(*params)
      File "C:/Users/xyz/.qgis2/python/plugins\geoserverexplorer\gui\gsexploreritems.py", line 534, in populate
        raise e
    FailedRequestError

I have changed the password to default again.  Reinstalled Geoserver to overwrite the securities and reinstalled QGIS (by deleting the OSGeo4W64 Directory) and deleted the local .qgis2 folder. At one moment I was not even able to see Workspace directories but I am still getting the above error upon connecting . I can add WMS from geoserver to my QGIS project but I can not publish the layer or project from QGIS.
Versions:
QGIS : 2.14.1 Essen
GeoServer explorer Plugin: 0.1.1
Geoserver: 2.8.2


texts: Converting data from geodatabase to latitude and longitude format

texts:
I am computer science student with no experience in Geographic information systems. I am trying to convert a geodatabse National land cover database to a latitude and longitude format. This database only has layer for some reason and no tables. So, far from my research I came to know about few tools such as ArcGIS etc to convert the data.

Can someone suggest me some procedure to convert this data to latitude and longitude format?

If someone knows of some better database, can they redirect me towards it.


texts: Copying attribute field into another layer and importing data from file into attribute table

texts:
I am using QGIS 3.12 and wanna know how to copy and paste field attribute from one layer into another?

Here is what I wanna do:

copy all the attribute field from 1st pic to 2nd
delete all field in 2nd pic which doesnt exist in 1st pic.
and import the value from any file (e.g.: Excell, CSV format)


texts: Any python script to convert a geoPDF to a KML embedded with a jpg link?

texts:
I have many geoPDFs. I want to turn them into KMZ or KML+JPEG using a python script.

Any suggestions?

SEE CODE BELOW


texts: NDVI time series in R -- how do I create a time series object from a data frame?

texts:
I am doing a time series analysis of NDVI using the bfast package in R.  Bfast requires a time series (TS) object.

I have successfully created a data frame with the NDVI at various point locations for tiffs in a given directory (code for this is at the bottom of the post).

Problem 1: the code does not extract the date of the images.  Landsat file names give year and Julian day starting at the 10th character (YYYYDDD) so this should be possible. But how?  And will the Julian day be recognized as a date?

Problem 2: once the date is extracted, how do I create  TS object from the data frame?

Thanks for any tips! I'm new at R, so be gentle.

Code for extracting values at point locations:

require(raster)
require(rdgal)
require(sp)
setwd("C:\\Users\\Work\\LSTest")
pts <- readOGR(getwd(), "MyPoints")
LS.files <- list.files(getwd(),pattern="\\.tif$", full.names=FALSE)
India.LS <- stack(LS.files)
pts@data <- data.frame(pts@data, extract(India.LS, pts))


texts: Changes in extent in sentinel image while calibration with snap tool

texts:
i have a problem with the extents of my sentinel 1 image, actually as shown in the image above, am selecting the frame 1 to download from ESA, when i process the snap tool to calibrate i only get the frame 2 and my area is not totaly covered.

Can anyone help me with this?

I am new to radar imagery.


texts: Along a line create profile/cross-section lines then extract elevation points from them

texts:
I know that maybe this question has got an answer, but I need to extract elevation data from a line of a defined length (p.e. 300 meters). Also I want the software (QGIS or ArcGIS) to draw this lines with a regular interval (p.e. 50 meters). The last thing I want to do is to extract elevation data (p.e. each 5 meters) within each line. I was told that this could be done automatically; if not I want to know how I can do this.

This is an example:


texts: How to export/download the data of more than one-year timeline that includes more than one image in the dataset?


texts: When I use the geocoding tool to plot cities/states in the U.S. it plots only one point. However, the attribute table shows that all the points have been plotted. Furthermore, the one point is not accurately located on the OpenStreetMap (the point is in TX according to the attribute table when I select the feature, but it is visually located on Kansas). They are not plotted elsewhere when I zoom to layer (i.e. they are on the same CRS).


texts: How to identify a series of Longitude and Latitude coordinates for a building?

texts:
I have hundreds to thousands rows of data that includes the GPS coordinates of the specific location (includes building footprint and outside the building within the property survey boundaries as well as off the property boundaries) that an employee completed a task using a handheld device with GPS technology. Currently, to determine which GPS coordinates are within the building footprint or property survey boudaries, I have to copy and paste to an application such as google maps to identify the address.

So far I have found answers to how to calculate the midpoint in a series of GPS coordinates. However, I am trying to figure out how to identify which series of GPS coordinates are within a specific building footprint and property survey boundary using the "offifical" GPS coordinates of the address. By official, I mean GPS coordinates of the location when I input the address of the building in an application that provides the GPS coordinates, which I will use as the midpoint.

Can someone help me figure out how to either calculate or identify which GPS coordinates in my data are within the building footprint and/or property survey boundary from the midpoint?


texts: Creating multiple separate vector lines from list of coordinate pairs in QGIS

texts:
I'm a QGIS user with 2 years of experience but I don't know how to do this task easily. I'm on QGIS 3.10.6 A Coruna.
I know how to import CSV coordinate points and then convert them to a vector using "Points to Path" but I don't want to make one long vector from all of the points, I would like to create multiple separate vectors from each coordinate pair.
I could import each pair as a separate CSV list of two points, join them ("Points to Path"), and then merge each resulting vector file but I'm hoping for an easier way as I will have many pairs to import and merge into one layer.
My data looks like the snapshot below (coordinate system: EPSG:27700 - OSGB 1936 / British National Grid). I can also easily reformat the CSV if needed.
Is there a more efficient way to do this?

The Linestring / WKT geometry is the most solution in my case due to the application of the dataset:
Each point marks the start and end of sections of interest on a train line. After visualization, I can take a subset of points separated by larger distances to add a 3rd point in the Linestring expression to better match the curve of the track and then re-import the CSV.
I also found a similar explanation to the problem at:
https://www.reddit.com/r/QGIS/comments/98t8r3/generating_lines_from_csv_containing_xy_coords/


texts: Transforming bounding box from object detection ML to shapefile

texts:
I'm working on a Python script to build a point shapefile I can open on QGIS from a list of bounding box (X and Y coordinates) returned by an Object Detection algo.
I know the CRS/EPSG and bounds of the TIFF file I ran the prediction on.
However I'm not sure how to handle the list of X and Y Bounding box coordinates: should I convert each coordinates into the original CRS while creating the point shape object ?
Or I just need to append each object with it's X and Y coordinate and save the shapefile with the correct bounds and CRS?


texts: Adding Coordinates to shapefile using ArcPy?

texts:
I want to add latitude and longitude column and their values in decimal degrees to my shapefile (fishnet). How to use ArcPy for that?

I have added lat and long using arcpy.AddGeometryAttributes_management but the unit I need is degree decimal and I got it in meters. My code is as below:

arcpy.AddGeometryAttributes_management("fish_lyr","CENTROID")

When specifying degree decimal:

arcpy.AddGeometryAttributes_management("fish_lyr","CENTROID","DEGREEDECIMALS")

it gives the following error:

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000800: The value is not a member of FEET_US | METERS | KILOMETERS | MILES_US | NAUTICAL_MILES | YARDS.
Failed to execute (AddGeometryAttributes).


texts: How can I create an average/center line in from multiples lines?

texts:
I have some polylines. The origin of every line is the same and I would like to obtain the geometric centre of all the lines represented by a new polyline which must be the centroid of the lines.

How can I do that using QGIS ?
Is there any name for this kind of geometry operation ? I think that 'centroid' is not the correct name for this operation.


texts: Expression to replace characters in Attribute table

texts:
I have a string field. Which requests to put the letter F after the number to all positive digits, and the letter B after minus digits and to delete the sign -.
Finally, I want a result like this:


texts: Configuring QGIS Web Server and Web Client on ubuntu?

texts:
I'm trying to properly install and config the web server and web client on an ubuntu machine (14.04)
For now, I'm just testing it, to present later to my boss.

I followed these links:
qgis-web-server-tutorial-wiki, and anitagreser-step-by-step-on-ubuntu (I can't post more than 2 links, hehe)

so... i'm at this point

When i try the GetCapabilities, this happens:

(Is this the page I should see?)

When I try the /ip-local-machine/qgis-web-client/site, i get this:

And when i hit the naturalearth link, I get stuck on a "loading map" page... forever....

Can anyone help me?


texts: Rotate & Shift Image with QGIS Georef Plugin

texts:
I am trying to reference an image to a map using the georef plugin. We have images from electrical resistivity tomography which are normal pngs with image coordinates. and we have measured points in the field by an RTK GPS measurement. What I need is a linear referencing of the image (only worldfile) with shift, scale and rotate. The image below shows the situation:

The result is anywhere but not on the section line. the worldfile result is like this:
0.02247045541586595
0
0
-81.09547939153824814
412331.87089667085092515
4385191.09988579899072647
as you see, there is no rotation, it should be like this - done with ArcGIS reference tool with 2 points:
-0,022802199437638223
-0,036435520886296563
-0,036435520886296563
0,022802199437638223
412333,69858059636

what I am doing wrong? any hints or help would be great, because we want to move completly from ArcGis to QGIS...


texts: Interpolating over time based on distance in R?

texts:
I have points with unequal distance from each other. Each point is a GPS sampling point which means it follows a  non linear path. I have taken samples at defined interval: 1 hour.  In each sampling point, I have also recorded elevation. I would like to make these points interpolated to 20 -minutes, which means elevation will also be interpolated with weight based on the distance of each station from each other.

Is this possible to do in ArcGIS Desktop 10.1, perhaps using ModelBuilder?


texts: Summarising an attribute from point layer in polygons with FME

texts:
I have a number of polygon feature sets and a point layer containing an attribute with population count. I want to summarise the population attribute for all points within each polygon feature set using FME.

Ie. the end product should be a number of polygon layers with a population attribute.

So in short: How to get the sum of attribute X from all overlapping points in a point dataset, for each out of N polygon feature sets, using FME?

(I'm basically trying to recreate the "Join attributes by location" tool in QGIS with FME.)


texts: Isolate points with same parcel but different x and y coordinates

texts: I have a large list of 100000 points in shapefile format. These points have address, parcel number and x and y coordinates as attributes. I would like to know which and how many points have the same parcel but different x and y coordinates.


texts: dismo - Plotting individual predictor responses

texts:
I have a MaxEnt model implemented in dismo package. The package has the convenient function response to plot predictors' responses as the ones provided by the model html output, in R plotting style.

I would like to plot the predictor responses of the"single-predictor" models likewise (as the ones shown below in the html), either by adapting the response function or by directly accessing data, but I couldn't find a solution for either cases.

More specifically, I can find out where to retrieve the plotted values in the model object.

To be more clear, here below in blue the plots I'm referring to (from MaxEnt html output)

EDIT: here's a reproducible example

library(raster)
library(dismo)

## create 5 dummy predictors layer and stack them
iterations <- 5
mn <- c(0:10)
stdev <- c(0:10)
preds <- list()
for(i in 1:iterations){
  xy <- matrix(rnorm(40000, mean=sample(mn, 1), sd=sample(stdev, 1)),200,200)
  preds[[i]] <- raster(xy, 8,9,45,46, crs="+proj=longlat +datum=WGS84")
}
preds_stack <- stack(preds)

## create random locations and random background points
ext <- raster(matrix(0,1,1), 8,9,45,46, crs="+proj=longlat +datum=WGS84")
ext <- as(ext, 'SpatialPolygons')
locations <- spsample(ext, 200, type='clustered')
background <- spsample(ext, 2000, type='random')

## run MaxEnt
argumemts <- c("-J", "-P", "askoverwrite=false", "threads=6")
mod <- maxent(x=preds_stack, p=locations, a=coordinates(background)[,1:2], args=argumemts)
mod # opens html output


texts: Holding horizontal and vertical lines while measuring in QGIS

texts: Is it possible to hold horizontal and vertical (similar to Ortho mode from Autocad) lines while using the measurement tool in QGIS?


texts: How to identify Polygon within another Polygon layer

texts: I have two polygons files. The first one has several smaller polygons within it eg.a shapefile with all US states, the other polygon file has a single polygon eg. a river basin. I am trying to get all the polygon (states) within the second polygon(river basin). Intersection tool in Arcgis10 clips the first polygon whereas I want all the intersecting polygon to maintain its original boundaries.In this way I will have the exact state boundaries. The basic idea here is to identify all the polygons intersecting  another polygon layer. thanks in advance.


texts: Issue with editing a feature class within ArcGIS

texts:
I have tried editing a feature class in an ArcGIS drawing which results to an error related to the specific geodatabase. The description in the error says "Check to see that you have the appropriate permissions". The same issue applies to all feature classes within the specific geodatabase.

I have double-checked that the drawing is not open on a colleagues machine, in order to avoid any Schema Lock related issues. Furthermore, other colleagues are experiencing the same issue with the specific drawing, so it is not something happening only on my end.

While I cannot edit any feature class within the geodatabase, I can delete them.

Does anybody knows what might be the issue here?


texts: PostGIS transform geometry with long crs

texts:
How do i transform a geometry to a new geometry with a crs like urn:ogc:def:crs:EPSG::25832

st_transform(geom,integer srid) obviously doesn't work since my srid is a string

found a solution

ST_Transform(geom,
             ST_SRID(
                     ST_GeomFromGeoJSON(
                       '{"type":"POINT",
                         "coordinates":[0,0],
                         "crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::25832"}}}'
                        )
                    )
                )


texts:
I am 100% new to ArcGIS and I am feeling more than lost. I have found quite some tutorials on the web but they do not really help me - they explain nicely how to analyse perfectly prepared data and maps. But the dirty work to me seems completely uncovered. What I would like to do is the following

For my country I have a Stata dataset on individuals and postcodes
My second Stata dataset contains measurements and their coordinates
For each individual I would like to know inverse weighted average distances to the x closest measurements

I guess ArcGIS is well suited for this. I managed to load a proper basemap and a layer containing postcodes. Now I face the following questions and I do not really know where to begin. How do I have to format my Stata-files? In which format (dbase, personal geodatabase...) do those data have to be? I´m very willing to work my way through, but I just have no idea where to start. Do you have some reference to a tutorial or so where such topics are covered - and not just how to change a color? Thanks a lot!


texts:
The following Python code is very helpful to reverse the direction of lines in QGIS:

layer = qgis.utils.iface.mapCanvas().currentLayer()
for feature in layer.selectedFeatures():
   geom = feature.geometry()
   nodes = geom.asPolyline()
   nodes.reverse()
   newgeom = QgsGeometry.fromPolyline(nodes)
   layer.changeGeometry(feature.id(),newgeom)

(see https://gis.stackexchange.com/a/9285/77061)

Unfortunately, the code doesn't work for polygons. Replacing asPolyline() and fromPolyline(nodes) with asPolygon() and fromPolygon(nodes) hasn't helped. Is there a Python code that works for polygons?

if layer.geometryType() == 2:
    # ?

Edit:

For PostGIS and most likely some other data providers it's possible to digitize polygons clockwise and counter-clockwise. Creating a marker line symbology (e.g. triangle) for such layer may result in inward and outward rotated markers. So I want to reverse the direction of the anti-clockwise digitized polygons through the Python console.


texts: Why is node tool deleting unselected points in lines?

texts:
I am freehand editing lines to a shapefile on Mac QGIS 2.2.0, and have my snap settings at vertex and segment @ 20 pixels. The lines are roadways and I have merged them all into one feature and merged the attributes too.

When attempting to delete a handful of points together (by clicking and dragging), I noticed that points in lines way up north somewhere are also deleted. So I tried exiting, re-starting, and zooming out to see if it happened again. The extra nodes that are deleted are not selected. Also, when trying to delete the target points one by one, different points are deleted up north too, also one by one. It is as if they were somehow linked.

What could account for this?


texts: Unknown Error? - A Column was specified that does not exist

texts:
shps = [(shp1,"field1"),
        (shp2,"field2")]

for item in shps:
    shp = item[0]
    field = item[1]
    for row in arcpy.SearchCursor(shp, fields='"{0}"'.format(field)):
        if row == MyInVariable:
            sql = '"{0}" = \'{1}\''.format(field,MyInVariable)
            if arcpy.Exists("fl"):
                    arcpy.Delete_management("fl")
            fl = arcpy.management.MakeFeatureLayer(shp,"fl",sql)
            break
    del row

The above code produces an error that states: "A column was specified that does not exist." field1 and field2 do exist as columns in shp1 and shp2 respectively. Where have I gone wrong?


texts: Seeking public Web Map Tiling Service (WMTS)?

texts:
Does anyone know of an "almost always available" service URL for a public facing Web Map Tiling Service (WMTS)?

I'm keen to test WMTS client capabilities without having to configure a WMTS server.


texts: How to create a value-by-alpha map in Java?

texts:
Someone has post similar question as mine before : similar question

But my objective is slightly different.

I have a shape file (.shp) (a country map)

I would like to write a piece of java code to create a value-by-alpha map like below:

Do anyone know is there any java library to do this?

Can GeoTool do this? If can, then how?


texts: For a while now I have been trying to use r.mapcalc from the QGIS Processing Toolbox. However, the algorithm does not give me any output. I have tried several raster layers and different expressions, but the algorithm never outputs anything to the "Results Directory". Below there is an image that shows a simple example of algorithm setup. Maybe I am missing something, but I did not find anything similar online.


texts: I tried to dissolve smaller features into larger (from unit to district) with field in related table. I can easily see the related records of related (many) table but unable to dissolved the features based on this (related) field. I also failed to do summary statistics of field at related table.


texts: PyQGIS GRASS r.reclass from Processing without result

texts:
I would like to reclass raster image with PyQGIS command from the Python Console. It runs without error but nothing is created. I have tried a lot of codes from here, but nothing is working.

from PyQt4.QtCore import QFileInfo
import processing

# Define input and output paths
filePath = "/home/lukas/Desktop/Sentinel/flood.tif"
output = "/home/lukas/Desktop/Sentinel/flood_reclass.tif"
rules = "/home/lukas/Desktop/pyqgis/reclass.txt"

# Get raster data
fileInfo = QFileInfo(filePath)
baseName = fileInfo.baseName()
rlayer = QgsRasterLayer(filePath, baseName)

# Define the minimum extent of the region
extent = rlayer.extent()
xmin = extent.xMinimum()
xmax = extent.xMaximum()
ymin = extent.yMinimum()
ymax = extent.yMaximum()

import processing
processing.runalg("grass7:r.reclass", rlayer,None, rules,
"%f,%f,%f,%f"% (xmin, xmax, ymin, ymax), 0.0, output)

Console show no error but there is no result. I have tried to run this in tool, with these layers and rules file and it was working. When I copy command from processing tools history - which worked in tool - it is not working in console.


texts: Using gdal functions from OSGeo4W out of their shell?

texts:
I would like to use some gdal functions from OSGeo4W (gdal2xyz, and gdal_merge) for my work. I can use them in the OsGeo4W shell provided after installing the package. But I want to use them in Pythonout of the OSGeo4W shell. I have Python2.7, gdal, gdal-python binding installed (all for 64 bit). However, I don't have a clue on how to use those gdal functions out of their shell.

The reason I want to do this is that I have a module created from ArcGIS ModelBuilder which I exported as a Python script. With this script, I want to use gdal2xyz, gdal_merge, etc. to continue data process.


texts:
I want to know if anyone has been able to download data from a etrex 10/20/30 directly from Qgis. The usb protocol decsribe in a recent post does not do the trick. GpsBabel documentation
states that

  "This unit uses GPX format, not Garmin protocol. Therefore one should
  communicate with it by reading and writing GPX files instead of using
  this format. Members of this class of products do not support realtime
  positioning protocol."

All I want is to be able to download my data within QGis

Thanks before hand

Gerardo


texts: Show geoJSON properties in jQuery Mobile Panel

texts:
First off I'm a novice at JS so please bear with me if this is a simple task to complete.

I'm currently using the stock LeafletJS popup bubble to display the properties from my geoJSON. However, I would like to utilize the jQuery Mobile Panel to display the properties from my geoJSON file when it is clicked on, it is similar to the OpenLayers example here. Thanks in advance and below is my code for loading the geoJSON!

$.getJSON(dict[geoJSON Variable Goes here],
      function(data){
        L.geoJson(data, {
          style: style,
           onEachFeature: function (feature, layer){
             if (feature.properties.SOMETHING == 0){
                 return layer.bindPopup("" + feature.properties.Name + " LABEL
LABEL");}
                else if (feature.properties.Attacks == 1){
                         return layer.bindPopup("" + feature.properties.Name + " LABEL
" + feature.properties.SOMETHING + " label");}
                else {
                      return layer.bindPopup("" + feature.properties.Name + " LABEL
" + feature.properties.SOMETHING + " label");
                                }
                            },
                        }).addTo(GROUPLAYER FOR LAYER ON/OFF);
                    });


texts: Getting dataframe extent from a polygon and exporting to PDF issue

texts:
I created a script to get the extent of a polygon, apply it to the data frame extent, and then export the layout as a PDF. However, I'm not getting any errors but the script is printing out at a different scale and the wrong area (can't quite tell what area it is that it's printing/moving to).

Can anyone point me to what may be causing the issue and/or any documentation that might help me figure out what the problem is?

The script is as follows:
(Note, there are no parameters since I'm automating a very specific workflow that utilizes templates and the same layer names each time).

# Import modules

import arcpy
from arcpy import mapping

# Allow overwriting
arcpy.env.overwriteOutput = True

# Get the X and Y information for each polygon
mxd = mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
for lyr in arcpy.mapping.ListLayers(mxd, "", df):
    if lyr.name == "MapbookGrid":
        mapGrid = lyr

# Set the current data frame as a variable
dataframe = mapping.ListDataFrames(mxd, "*")[0]

# Gets the extent of the current data frame
frameExtent = dataframe.extent

rows = arcpy.SearchCursor(mapGrid)
shapeName = arcpy.Describe(mapGrid).shapeFieldName
for row in rows:
    feat = row.getValue(shapeName)
    Name = str(row.PageNumber)
    #print "Executing print of page: "+str(Name)
    arcpy.AddMessage("Executing print of page {0}".format(Name))
    extent = feat.extent
    pdfName = Name + ".pdf"
    pdfStore = r"\\GISAPPSER2\Engineering_GIS\ScriptWork" + pdfName
    #print pdfStore
    arcpy.AddMessage("PDF name is {0} and is stored as {1}".format(pdfName, pdfStore))
# Obtain X and Y
    XMAX = extent.XMax
    XMIN = extent.YMin
    YMAX = extent.YMax
    YMIN = extent.YMin
# Store data frame extent from polygon
    frameExtent.XMax, frameExtent.YMax = XMAX, YMAX
    frameExtent.XMin, frameExtent.YMin = XMIN, YMIN
    dataframe.extent = frameExtent
# Export to PDF
    arcpy.mapping.ExportToPDF(mxd, pdfStore)


texts: Creating 3D Local Scene using pointcloud, DSM, and orthomosaic from Drone in ArcGIS Pro?

texts:
I am trying to create a local 3D scene in ArcGIS Pro and display data fro drone flights. I have the orthomosaic from the flight as a .tif, the Digital Surface Model as a .tif, and my pointcloud from the flight as a .las file. When I add the data to arcpro I find that all the data shows up in the middle of Africa, I know this is because there is no coordinate system assigned to the data. I would like to move the images to the correct location but that isnt as important. Right now I need to use the ortho to display the elevation data that the drone gathered. I have tried to add the DSM as a elevation source but I get this error

My next issue is that my point cloud data is floating up in the area over the orhto and DSM,

I need the point cloud on the same level as the other data and I want the ortho to have the elevation contours from the DSM.

Is there anyway to move or edit the data? How do i assign a coordinate system?

How do I adjust the height of the point cloud?


texts:
My understanding is that Folium still does not have capability to create labels for polygons. Tooltips do not work for my use-case since I can have hundreds of small polygons and I don't want users to have to scroll manically around to find what they're looking for.
To work around this gap, I am calculating the centroid of each polygon and then placing markers on those locations. Then, I can style the icons using HTML to create labels.
However, this is not ideal since the icons are staying at the same size on the map regardless of zoom level. This relative sizing makes my map look awful the further one zooms out:

Is it possible to create icons which have a fixed size on the map? I want these markers/labels to stay inside the polygon and not scale as the users change zoom levels.
I have tried using text-size-adjust but this is not doing the trick (tried running the notebook in Firefox and Edge).
html='
xxx
'

Relevant code:
#place the markers on centroid locations
m.add_child(folium.Marker(location = coordinates, icon=DivIcon(
    icon_size=(100,100),
    icon_anchor=(40,2),
    html='
%s%s%s
' % (text_1,text_3,text_2)
    )))


texts: plugin compile with make would not compile module

texts:
Ubuntu 14.04
QGIS 2.6
PyQt4

I'm following one of many tutorials on 'plugin builder', here is the latest one I'm trying with: http://www.digital-geography.com/build-qgis-plugin/

It all seems very straightforward. I run 'make'...
make
pyrcc4 -o resources_rc.py  resources.qrc

A new file: 'resources_rc.py' is added to the plugin folder. Nothing else.

On loading the plugin through QGIS nothing happens except a 'No messages." message at the bottom-right of the screen.

It seems 'make' is not compiling the modules. Even after making changes to a dialog with Qt Designer.... and running 'make' again, it ignores the changes to the ui files. On running 'make' again I get:
make: Nothing to be done for 'default'.

I wish not to mislead.. but I notice the 'test_plugin_dialog_base.py' (I assume this is the default dialog created by plugin builder) has no corresponding .py file; I can see test_plugin_dialog.py and test_plugin_dialog.pyc; are they the compiled (py and bytecode) ui?

Assuming that 'make' somewhat doesn't work, I run:
pyuic4 -o test_plugin_dialog_base.py test_plugin_dialog_base.ui

A new file is created: 'test_plugin_dialog_base.py'

I run 'make' again for good measure...
make: Nothing to be done for 'default'.

On loading the plugin in QGIS I get the same 'No messages.' message at the botton-right for a couple of seconds before disappearing. The plugin is visible and ticked in the plugins manager put not loaded.

Am I doing something wrong?

'make test' returns the following

********************************************
********************************************
----------------------
Regression Test Suite
----------------------
nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module
QGraphicsScene::addItem: item has already been added to this scene
#1 Test that the plugin __init__ will validate on plugins.qgis.org. ... ok
#2 Test we can click cancel. ... ok
#3 Test we can click OK. ... ok
#4 Test that QGIS properly parses a wkt string. ... Loading a style file that was saved with an older version of qgis (saved in 1.9.0-Master, loaded in 2.6.1-Brighton). Problems may occur.
ok
#5 QGIS environment has the expected providers ... ok
#6 Test we can click OK. ... ok
#7 Test that translations work. ... FAIL

======================================================================
FAIL: Test that translations work.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/xxxxxx/.qgis2/python/plugins/TestPlugin/test/test_translations.py", line 49, in test_qgis_translations
    self.assertEqual(real_message, expected_message)
AssertionError: u'Good morning' != 'Goeie more'

----------------------------------------------------------------------
Ran 7 tests in 0.143s

FAILED (failures=1)
----------------------
If you get a 'no module named qgis.core error, try sourcing
the helper script we have provided first then run make test.
e.g. source run-env-linux.sh <path to qgis install>; make test
----------------------
********************************************
********************************************

Apart from the 'Translation error' the rest seem to work ok. Except it doesn't.


texts:
Is there a way I can remove the center point from my results in a query like the following?

(select * from cities
where l = true
and ST_DWithin(geography(cities.geog), (SELECT geog FROM cities WHERE cities.i = 'HNL'), 120000)
LIMIT 25)
UNION
(select * from cities
where l = false
and ST_DWithin(geography(cities.geog), (SELECT geog FROM cities WHERE cities.i = 'HNL'), 200000)
LIMIT 5);

EDIT:
ah. this seems to work:

(select * from cities
where l = true
and ST_DWithin(geography(cities.geog), (SELECT geog FROM cities WHERE cities.i = 'HNL'), 120000)
and geog != (SELECT geog FROM cities WHERE cities.i = 'HNL')
LIMIT 25)
UNION
(select * from cities
where l = false
and ST_DWithin(geography(cities.geog), (SELECT geog FROM cities WHERE cities.i = 'HNL'), 200000)
and geog != (SELECT geog FROM cities WHERE cities.i = 'HNL')
LIMIT 5);

but is this the fastest way? I can probably swap out the sub-queries when I call this function from within express.js


texts: Can anyone point me to a good introduction to the INSPIRE directive? I know it's basically WMS 1.3 with added bells and whistles but now I'm back in Europe I should probably find out what they are.


texts: How to add rasters of different sizes with Arcmap or Qgis raster calculators?

texts:
I've got 8 rasters all of different sizes. What is the proper syntax, for the raster calculators of either Arcmap or Qgis, that will output a raster that covers the extent of all my data not just the area of overlap?

Thanks.


texts:
As per the geoserver documentation, I have installed geoserver. I am using 2.13.0 version of geoserver and geofence server plugin downloaded from "nightly GeoServer community module builds" - http://ares.opengeo.org/geoserver/master/community-latest/ (version 2.13.0)

After installation , I checked for the geofence GUI in document which is different from the one I have installed. the image shown below is given in the docs.

http://docs.geoserver.org/latest/en/user/community/geofence-server/gui.html

But , what I got is shown in the following image

Moreover, in the documentation, it is stated that in geofence rule, access type ACCESS can be selected.But I dint get that option in my access dropdown

Is there anything I have missed while installing or I have to install other than 'Geofence-Server-plugin' ?
The application is supposed to be as shown in the documentation. But why it is different ?


texts: Distance between two vector lines in each east-west raster row (in QGIS)

texts:
I have 2m-resolution raster LiDAR data of a marsh edge from two moments in time and I am trying to calculate how much the marsh has "retreated" between the datasets.
I used the LiDAR data to draw vector lines where the marsh edge is, which you can see in my screenshot below.

I am interested in, for each East-West row of the original raster data, what the distance between these two vector lines is. Ultimately, I want a vector/table of distances between the marsh edge lines for each row of the original raster data.
I have each vector line as a shapefile right now.
Euclidean Distance between two lines was close but was seeking the "closest" point rather than a perfect East-West distance.
Any advice on how to do this? Should I rasterize the vectors first? (was trying this but haven't gotten rasterize to work yet) Maybe there is an easy way in python?
I am running QGIS 3.16.2 with GRASS.


texts:
I'm trying to set up a QGIS project for creating a map of a fictional planet smaller than Earth. See here for a helpful question that doesn't quite touch on what I'm trying to accomplish (I don't mind a non-cylindrical projection, and don't have any shapefiles or rasters that the map has to "fit").
My primary goal is to be able to draw continents as if viewing their orthographic projection, while having the ability to check their ellipsoid measurements. After several hours of searching, I still haven't found if that capability exists in QGIS, so I've contented myself with a lonlat world map. The problem is, I still can't get the equatorial distance from -180 to 180 degrees to match the circumference I calculated.
Here is the proj4 string for the custom CRS:
+proj=lonlat +a=5733900 +lat_ts=0 +lon_0=0 +rf=700 +units=m +no_defs

(The fictional planet has an equatorial radius of 5733,9 km and a polar radius of 5725,7 km, and should have an equatorial circumference of 36027,1 km if I've calculated right.)
I have set Project Properties>General>Measurements to custom ellipsoid with the above mentioned equatorial and polar radii, and set the custom CRS as the project's CRS.
I have created a vector layer with the custom CRS, a polyline that should show the bounds of the map. It is a rectangle from degree coordinates -180 to +180 x and -90 to +90 y. However, when I measure the equatorial distance across this rectangle (at y=0), I get wildly varying distances. Here is an example:

Even when I have defined the coordinate reference system as eqc, I still get an incorrect circumference at the equator.
What do I need to change in order to be able to get realistic measurements? Is there any way to work on all parts of the ellipsoid in one QGIS project (and have them have fairly orthographic dimensions when I zoom in on them), or should I be looking into some other software?


texts: Dissolving polygons when only relationship is spatial location?

texts:
I have a feature class with parcel information; some of the parcels have roads included while others do not. When a parcel has a road included there is always a matching parcel without the road included. But there isn't always a parcel with the road included. In the image below you can see there are two parcels sitting on top of one another; one includes the road while the other does not.

From my research I know dissolve should be the way to go but the problem is there are not matching fields. I have tried to straight dissolve (without the option dissolve based on field) but, since they have matching boarders it dissolves into the road blocks and the parcels are no longer distinguishable. There is no common field to dissolve on and I want to be able to automate this since I need to be able to do it for a large area. Also, when there is the situation of two parcels on top of one another I would like to keep the 'subcatchme' values with letters proceeding it as seen in the record with 'subcatchme' = ICI_1788263_1.

It is important to note there are often parcels that do not have overlapping attributes, and I don't want to loose those records. Also I must keep the field 'CatchmentName'.

I am working in ArcMap 10.4 with the advanced license. I can work in arcpy though I am not the most experienced.


texts: Importing simulation from ParaView to ArcMap

texts:
I made a simulation and reworked the output with ParaView. I simulated an avalanche on a DEM and what I want to do is to compare the area of the simulated avalanche with that of the real avalanche. To do this I would use ArcMap 10 where I already have the real area as a shapefile.

How can I bring what I have on ParaView to ArcMap?


texts:
I'm in troubles with the projection of a GRIB product. I have a Cloud mask image and I want georeferencing it with GDAL. I need to pass through gdal_translate before, since i need to fix the bounding box, but i don't know this box. The product is EO:EUM:DAT:MSG:CLM on Eumetsat product navigator.
Any suggestions?


texts: Identifying all points with specific attribute to polygon with same attribute using ArcMap?

texts:
I am working with a fairly large dataset and am trying to identify the points with a specific attribute (letter and number combination) that matches a polygon with the same attribute, but only when the point is spatially located within the matching polygon.

This may take more than one step and I have not been successful in search for the right steps.


texts: How to convert QGIS generated tiff images into jpg/jpeg using GDAL command line utilities?

texts:
I want to develop a web portal that will show the images dynamically produced by QGIS, but QGIS provided tiff images are too big in size and it is not possible to show it on website using image viewers. That's why I have decided to convert those tiff images into jpg/jpeg to reduce in size as well as browser friendly so that I can show those images on my website easily. But I don't know how to convert tiff images into jpg/jpeg using gdal commands.

Please help me in this regard.


texts: Learning classical geography - recommended literature etc

texts:
I've been working in the field of GIS for a few years now, and there are some disciplines of knowledge where I lack a good degree of education.

My educational background is that I've studied computer engineering, and completed a bachelor degree, so I'm well at ease with any technical aspect of the job that comes up. Setting up servers, programming/scripting etc.

But what I lack is a good solid knowledge about cartography, geodesy and similar topics that fall within the domain of geography, which is of course a central aspect of the job.

Some subjects I would like to know more about are, for example, cartography, geodesy, datum, reference ellipsoid, the geoid, map projections, spatial reference systems.

So what I would like you to do is to point me to some good literature and other resources where I can learn about these topics. Don't be afraid of suggesting any authoritative "bibles" that hold Humanity's accumulated knowledge in these fields, I'd rather choose that instead of some beginners-level book that only gives an introductory knowing.


texts: Pgrouting can't find postgresql (on Mac)

texts:
I've installed both postgreSQL 9.0 and postgreSQL 9.1 on my mac, using binaries from http://www.kyngchaos.com. I also have postgis 1.5 installed.

I tried to install pgrouting, again using binaries from aforementioned website, but when I ran the core sql it gave the Error: could not access file “$libdir/librouting (How to fix Error:  could not access file "$libdir/librouting"?) error.
So, instead I tried to build it from the source. but now when I run: cmake . , I get" -- PostgreSQL not found.
FATALERROR Please check your PostgreSQL installation"
I tried to append it to path using "export PATH="$PATH:/usr/local/pgsql-9.0/bin""
but it still didn't work.
Any help is appreciated!
Thanks

P.s. I should mention that I want to tell the system to install pgrouting for postgresql 9.0 and NOT 9.1 version.


texts:
What I'm trying to do is with JSTS to check with lineGeom.crosses(polygonGeom) function if a line is crossing completely a polygon.

The problem is that both cases from the picture returns true. I don't know why.
Is there another way to check only the first case with line 1.


texts: Using iterator in a cost distance analysis model with multiple destinations

texts:
I am building a cost distance model to find three different paths. Each has his own start and end point. So there are three start points with each an end point belonging to it. I want to use an iterator and variable inputs:

The iterator works now and creates three different outputs with each start point. The problem is that I cannot connect them with the end points. I can always only put end point 1 into the model and every start point end at end point one. But start point two and three should end on their own end point.

I tried to write Endpoint_%Value% but he does not accept it. I couldnt get it to run yet. Can anyone help?

I now did it like you said and get this:

That means that it is still not working correctly and although I put OBJECTID as destination field it connects the startpoint to all three destination points..

I now tried:
As I write destination_%Value% in the Cost path input field with stable inputs it works and I get the output I want!!
But as I'm doing it with variables he does not accept this input... I dont understand why because it is exactly the same only written somewhere else...


texts:
I received a shapefile containing data from a topographic survey of a farm. The file has a lot of lines containing elevation data. The person who made the survey did it with a GPS set up on a ATV.

When I load the shapefile in QGIS I have the Metadata :

"Geometry type of the features in this layer: Polygon
The number of features in this layer: 1942"

I want to create a slope map from this topo survey. So I guess one of the first steps is to create a raster layer from the vector layer. However before that, I think I have to create a GRASS map with the module v.in.ogr.qgis. When I use this module, I have this message :

Building topology for vector map ...
Registering primitives...
0 primitives registered
0 vertices registered
Nombre de n�uds : 0
Nombre de primitives : 0
Nombre de points : 0
Nombre de lignes :0
Nombre de contours : 0
Nombre de centro�des : 0
Nombre de surfaces : -
Nombre d'�les : -
Building topology for vector map ...
Registering primitives...
0 primitives registered
0 vertices registered
Building areas...
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
Nombre de n�uds : 0
Nombre de primitives : 0
Nombre de points : 0
Nombre de lignes :0
Nombre de contours : 0
Nombre de centro�des : 0
Nombre de surfaces : 0
Nombre d'�les : 0
Successfully finished

The module creates a new map name that I can see when I click on "add a GRASS vector layer". However, there is no layer available for this map.

What's wrong? The problem may come from the original shapefile. Bus as I am not a GIS specialist and I am a new QGIS user, I would like to get some help.

I have QGis 1.8.0-Lisboa, Windows 7 and my computer is a French computer (which could explain why there are some French words in the v.in.ogr.qgis message).

Thank you

Best,

Baptiste


texts: How to aggregate values of different statistical areas that are overlapping?

texts:
Let's say I have one polygon layer counties with the polygons of administrative borders and another layer postal codes with the polygons of postal code areas.

I have some statistical values per polygon for both, let's say the population per county and the number of people who read Magazine X per postal code.

Both datasets have the same total coverage, they are always overlapping but the boundaries of the polygons inside are very different.

What options are there to combine values here? For example if I would like to calculate the number of people in county Y who read Magazine X? I know this is a hard problem, especially because in the example I chose population in reality is not uniformly distributed in a county nor a postal code area. Still, surely there are some existing techniques?

I am looking for general terms and ideas behind techniques or algorithms, not specific tools in software.


texts:
Anybody know an alternative to profile graph option for ArcGIS 10.2? 3D Analyst can produce a profile, however it's extremely bare bones and doesn't include a scaling option.

Does anybody know an effective alternative to make a profile graph that can be added to ArcMap layouts?


texts: Problem with writing input and output for QGIS user script

texts:
I need to write QGIS script, which removes features with same value of specific attribute - in output will be only features with first occurrence of value. I know, how to check duplicity, but I don't know, how properly create output from my script, when I need it to use in graphical modeler.

Also, what is the best way to get input into the script?

I am beginer in QGIS scripting, but I noticed that the basic scripts deal with inputs differently than any downloaded user scripts (which follow this documentation: https://docs.qgis.org/2.6/en/docs/user_manual/processing/scripts.html).


texts: Postgis 2.1 Inconsistent with spatialreference.org

texts:
The County of Napa, California, uses a projection "NAD_1983_StatePlane_California_II_FIPS_0402_Feet"; for example their roads.prj file has:

  PROJCS["NAD_1983_StatePlane_California_II_FIPS_0402_Feet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",6561666.666666666],PARAMETER["False_Northing",1640416.666666667],PARAMETER["Central_Meridian",-122.0],PARAMETER["Standard_Parallel_1",38.33333333333334],PARAMETER["Standard_Parallel_2",39.83333333333334],PARAMETER["Latitude_Of_Origin",37.66666666666666],UNIT["Foot_US",0.3048006096012192]]

I looked this projection up at spatialreference.org and fount a match to this: http://spatialreference.org/ref/esri/102642/ There is an INSERT statement provided:

  INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext)
  values
  ( 9102642, 'esri', 102642, '+proj=lcc +lat_1=38.33333333333334 +lat_2=39.83333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs ', 'PROJCS["NAD_1983_StatePlane_California_II_FIPS_0402_Feet",GEOGCS["GCS_North_American_1983",DATUM["North_American_Datum_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["False_Easting",6561666.666666666],PARAMETER["False_Northing",1640416.666666667],PARAMETER["Central_Meridian",-122],PARAMETER["Standard_Parallel_1",38.33333333333334],PARAMETER["Standard_Parallel_2",39.83333333333334],PARAMETER["Latitude_Of_Origin",37.66666666666666],UNIT["Foot_US",0.30480060960121924],AUTHORITY["EPSG","102642"]]');
                      [inserted new line for clarity]

As you can see the values for the column "srid" is "9102642".

The problem is that the table "spatial_ref_sys" prohibits a value that exceeds 998999.  Here is the table SQL showing the constraint:

  CREATE TABLE spatial_ref_sys
  (
   srid integer NOT NULL,
   auth_name character varying(256),
   auth_srid integer,
   srtext character varying(2048),
   proj4text character varying(2048),
   CONSTRAINT spatial_ref_sys_pkey PRIMARY KEY (srid),
   CONSTRAINT spatial_ref_sys_srid_check CHECK (srid > 0 AND srid <= 998999)
  )

The constraint is the "<= 998999" and since the INSERT statement's srid value is 9102642, the INSERT fails.

So I checked to see if the srid 102642 was taken and it was not:

  select srid from spatial_ref_sys where srid = 102642;

I then modified the insert statement by removing the first digit "9" from the srid value and then performing the insert.

I then proceeded to import a shapefile using the PostGIS Shapefile Import/Export Manager (v.2.1.0) and specified the srid to the column I had created:

My questions are:

1) why would the INSERT statement for PostGIS be in excess of 998999 when PostGIS's table
has a constraint to limit srids?

2) Will the work-around I used cause any problems or violate some "plan"?

3) If the first digit "9" is an error, what is the best way to report such at spatialreference.org?  Their website does not seem to provide for error reporting.


texts: Im new to GIS and am just curious if there is an instance where a feature can be a point in one map and a polygon in another map and vice versa?


texts: Line of best fit at each location between two raster stacks in R

texts:
I know how to calculate the r^2 correlation at each position between two raster stacks via:
library(raster)
s1<-rasterstack1
s2<-rasterstack2
a <- length(s1)
b <- length(s2)
s <- stack(s1, s2)
fun=function(x) { if (is.na(x[1])){ NA } else { m <- lm(x[1:a] ~ x[(a+1):(a+b)]);summary(m)$r.squared }}
r.squared <- calc(s, fun)

However, I am trying to find the line of best fit for each position's correlation relationship. So let's say an output raster/matrix of:
[y=x^.8, y=X^.3]
[y=x^.5, y=x^.9]

where y would be the estimated dependent variable from a given x variable (what the r^2 values are based on). I would then theoretically want to be able to give an input x and have an estimated raster or matrix of estimated y values...
I would assume the output would be along the lines of this:
output<- function(x) A <- matrix(c(x**.8, x**.3, x**.5, x**.9), 2, 2)
end<-output(x)

The part I am struggle with is calculating those equations and storing them in a matrix form. The furthest I've gotten is:
predict <-function(rasterstack){
  # Values for (layers, ncell, ncol, nrow, method, crs, extent) come straight from the input raster stack
  # e.g. nlayers(rasterstack), ncell(rasterstack)... etc.
  print(paste("Start:",Sys.time()))
  print("Loading parameters")
  layers=nlayers(rasterstack);ncell=ncell(rasterstack);
  ncol=ncol(rasterstack);nrow=nrow(rasterstack);crs=crs(rasterstack);
  extent=extent(rasterstack);pb = txtProgressBar(min = 0, max = ncell, initial = 0)
  print("Done loading parameters")
  mtrx <- as.matrix(rasterstack,ncol=layers)
  empt <- matrix(nrow=ncell, ncol=2)
  print("Initiating loop operation")
  numb=1

  for (i in 1:ncell){
    setTxtProgressBar(pb,i)
    if (all(is.na(mtrx[i,1:(layers/2)])) | all(is.na(mtrx[i,((layers/2)+1):layers]))){
      empt[i,1] <- NA
    } else
      if (sum(!is.na(mtrx[i,1:(layers/2)]/mtrx[i,((layers/2)+1):layers])) < 4 ){
        empt[i,1] <- NA
      } else {

        empt[i,1]<-as.expression(coef(lm( mtrx[i,((layers/2)+1):layers] ~ mtrx[i, 1:(layers/2)]))[2])*x+(coef(lm( mtrx[i,((layers/2)+1):layers] ~ mtrx[i,1:(layers/2)]))[1])

  }
  print("Creating empty raster")
  eqmatrix <- raster(nrows=nrow,ncols=ncol,crs=crs)
  extent(eqmatrix) <- extent
  print("Populating correlation raster")
  values(eqmatrix) <- empt[,1]
  print(paste("End on",Sys.time()))
  eqmatrix

}
}

predict_matrix<-predict(rasterstack=s)

but this creates the error:
"as.expression(coef(lm(mtrx[i, ((layers/2) + 1):layers] ~mtrx[i, :
non-numeric argument to binary operator


texts: Define projection of TIFF file when exporting from Python

texts:
I am struggling with getting spatial data into a readable TIFF file with the right projection. As far as I can understand, my problem is that the longitude and latitude is not saved as the projection when I save it to TIFF file in Python, but it uses the dimensions of array as the projection coordinates/size (834x1115). I have also tried saving it as a NetCDF file but this does also not work. I tried thorugh QGIS to export it to the right projection but this does also not work. I have longitude and latitude for every point but somehow this is not saved in the file, so QGIS reads it this way.
This is an example of what the data looks like using gdalinfo:

Driver: GTiff/GeoTIFF
Files: yearly_precipitation_2008.tif
       yearly_precipitation_2008.tif.aux.xml
Size is 1115, 834
Coordinate System is `'
Metadata:
  TIFFTAG_IMAGEDESCRIPTION={"shape": [1, 834, 1115]}
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
  TIFFTAG_SOFTWARE=tifffile.py
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  834.0)
Upper Right ( 1115.0,    0.0)
Lower Right ( 1115.0,  834.0)
Center      (  557.5,  417.0)
Band 1 Block=1115x1 Type=Float32, ColorInterp=Gray
  Min=0.415 Max=7.939
  Minimum=0.415, Maximum=7.939, Mean=2.033, StdDev=1.026
  Metadata:
    STATISTICS_APPROXIMATE=YES
    STATISTICS_MAXIMUM=7.9388275146484
    STATISTICS_MEAN=2.0331832805082
    STATISTICS_MINIMUM=0.41479951143265
    STATISTICS_STDDEV=1.025994406909
    STATISTICS_VALID_PERCENT=43.73

Follow up:
I ave tried to reproject doing this using the command line:

gdalwarp -wm 2000 – srs ”+proj=longlat +ellps=WGS84 +datum=WGS84
+no_defs” – t_srs "EPSG:4326" -tr 926.6254331 -926.6254331 -te
1226864.395378 3990864.002497 -80399.894893 4896300.006573 -r cubic -ot
Float32 -co COMPRESS=DEFLATE -co PREDICTOR=2 -co ZLEVEL=9 -overwrite
NETCDF: /Users/.../TIFF_files/yearly_precipitation_2008.nc:pred /Users
/.../TIFF_files/yearly_precipitation_2008.tif

But then I get the error ERROR 4: –: No such file or directory eventhough the directory and files does excist. Does anyone know how to fix this?


texts: Raster to polygon conversion losing data?

texts:
I'm trying to do a simple conversion with Raster to Polygon. However, as you can see in the picture below not all data (the area in orange) makes the transition. Raster to the left and polygon to the right.

The RGB colors of the orange area is 255 222 183 compared to 255 251 205 for the yellow area. The raster is currently in TIFF format but I have also tried png with the same result. My version of ArcMap is 10.4.1.

Do you know how to solve this?


texts: Arrange pair of coordinates in Python lists

texts:
I have these coordinates of a bounding box in this format:
(51.901071, 7.543488, 52.002215, 7.692406) and I want to convert it into a list of coordinates so that I can iterate through the pair. The final output should be like this: [(51.901071, 7.543488), (52.002215, 7.692406)] How can I convert the coordinates into a list?


texts: How to create a GeoPandas GeoDataFrame from rasterio features?

texts:
I try to create a GeoDataFrame of paches of same values in a binary raster using rasterio and GeoPandas. data_file is a binary TIFF raster with 0 where there is no deforestation and 1 if there is a deforestation event.
I tried the following :
# read the data and create the shapes
with rasterio.open(data_file) as f:

    data = data.astype('int16')
    shapes = rasterio.features.shapes(data)

# read the shapes as separate lists
deforestation = []
geometry = []
for shape, value in shapes:
    deforestation.append(value)
    geometry.append(shape)

# build the gdf object over the two lists
gdf = gpd.GeoDataFrame(
    {'deforestation': deforestation, 'geometry': geometry },
    crs="EPSG:4326"
)

I get the following warning :

/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:9:
FutureWarning: Assigning CRS to a GeoDataFrame without a geometry column is now deprecated and will not be supported in the future.
if name == 'main':

From what I understand, the shapes GeoJSON-like dicts are not interpreted as shapely shape by GeoPandas, so I end up with a Gdf without 'geometry' column which cannot be used to create a shapefile.
What is the more efficient way to transform them into shapely polygon ?


texts:
I am considering upping my programming skills by taking a python geoprocessing course through ESRI.  Before I part with the hefty registration fee, I would like to get your opinion on the value of 24 hrs of instructor led python programming.  I am primarily interested in learning the following:

For those of you who have taken a course such as this, did you walk
away with applicable skills or more theoretical knowledge?
For those of you who have recently been in the job market, did you
find employers looked favorably on having a class such as this on
your resume?
For employers, does a specialty course like this really matter, or do most GIS
analysts/specialist learn python programming on their own?


texts: FME 2015.1.01 and SQL Server 2012 Native Client Issues

texts:
I'm having trouble connecting to a SQL Server 2008 database from FME 2015.1.01 on a computer with SQL Server Management Studio 2012, including SQL Server Native Client.

Here's the error message:

MS SQL Server Reader: Failed to connect using SQL Server 2012 Native Client, trying to use SQL Server 2008 Native Client. Provider error '(-2146824582) Provider cannot be found. It may not be properly installed.'. Connection string 'Provider=SQLNCLI10;DataTypeCompatibility=80;Data Source=TNSV05;Initial Catalog=XXX;User ID=XXX;Password=********'
MS SQL Server Reader: Microsoft SQL Server 2012 Native Client is available at http://www.microsoft.com/en-ca/download/details.aspx?id=29065
MS SQL Server Reader: Connection failed.  Connection string `Provider=SQLNCLI10;DataTypeCompatibility=80;Data Source=TNSV05;Initial Catalog=XXXX;User ID=XXXX;Password=********'. Provider error `(-2146824582) Provider cannot be found. It may not be properly installed.'
MS SQL Server Reader: Ensure Microsoft SQL Server Native Client 2008 or 2012 is installed
UniversalReader -- readSchema resulted in 0 schema features being returned

The error indicates that the NACL needs to be installed, but it definitely is.

Any ideas?

Edit: it's the 64 bit version of FME.


texts: Renaming .met file with ModelBuilder which uses iterator to rename .sid files?

texts:
I have a model that iterates through a folder containing .sid raster datasets, amongst other types of rasters (so I'm using a *.sid wildcard).

I note, however, that ArcCatalog/ModelBuilder/Rename tool cannot rename the .met file of this .sid dataset, hence the renamed dataset does not have projection information.

Does anyone know how to force ModelBuilder to rename the .met component of a .sid file?

Possibly I'd have to save it as a Python script and add some code to that.


texts: How to create a generalized polygon layer from a raster?

texts:
I have a tiff file where I have extracted vegetation in a height interval from LIDAR. At the moment the picture is kind of blurry with no data cells between vegetated cells. I would like to create a polygon layer out from this to be used as a mask on sat images with sharp boundaries. I am working with ArcMap is this possible?

I have been thinking of running a smoothing tool and then make vector, but the kernel size is to small in Arcmap, I have a resolution of about 1 meter. I would need to use the majority filer in Arcmap many times..
Any ideas how to solve this?


texts: Automate creating Folder on Layer Panel on QGIS using python?

texts: How can I automate creating multiple Folder with sets of its own Folder Namr on a Layer Panel on QGIS using python?


texts: Data organization strategies for .csv and .shp

texts:
I'm organizing a large amount of data for a project and the data is stored in .csv format, with a code to relate each row to a polygon in a .shp. I was planning on converting the .csv data into .dbf and importing it into a geodatabase, all using ESRI tools. Is this the best way of organizing such data? (The alternative I thought of was to join the .shp and the .csv and to export the data so I have a permanent link, but it seems like I would have a lot of duplicated data)

I'm interested in learning how best to improve my work flow and organize this data. I am planning on doing it all using ArcGIS 10 and using python where possible.


texts:
I've only just started using QGIS (done some things in ArcGIS before) and SAGA tools don't work. The results don't make sense, QGIS stops answering or there is a python error.
Could it be that there is something wrong with the installation? Or do I need to learn some python to fix it?


texts: How to MOVE and RESIZE Features within a Layer?

texts:
I am still new to ArcEngine 10, I currently am able to create a feature layer that is associated with a feature class. Its a polygon layer. So I can create polygon, give it attritbute table and put it on a layer using UNIQUEVALUERENDERER.

My question is, is there a tool bar control, or any way I can MOVE or RESIZE my polygon easily. I current use "esriControls.ControlsSelectFeaturesTool" to select the tools. Is there an easy way to do this?

Thanks and Regards


texts: How is object created as line using createline stored in .tab file?

texts:
I used Mapbasic and made data imported from excel into mappable and added projection to WGS 84  and updated table using:

update TABLE set obj = createline(x1,y1,x2,y2)

to create line and the line was create which I could see in mapper window but when I looked at the browser window the no of column has not changed. How is this obj created stored in table in .tab file as I can see spatial coordinate in MS SQL table.


texts: Combining cost analysis and voronoi-like area interpolation regarding slopes

texts:
I have DEM raster data of an island and I have 10 points (cities).

My task is to map the island into areas. Inside these areas everything must be nearest to the corresponding city/point, and each area must be delimited against neighboring areas where other cities are nearest. So in principle it is similar to a voronoi calculation.

The difference from a classic voronoi is that these areas must be calculated "3-dimensionally", meaning they must be defined using costs respecting how long it would take to get around the cities regarding all slopes.

Thus, e.g. a city inside mountains must result in a much smaller area than a city in flatlands (because it takes longer/has higher costs moving over the mountains than over flat land).

Of course I will need a cost analysis in GRASS in the first place. But what tools/plugins can I use to calculate the "3D-Voronoi-part" to generate my delimited areas map using this cost data?

I hope I made clear what I need to figure out how to do.