texts: Why won't all the attributes show in the popup?

texts:
I'm struggling with an ArcGIS JavaScript API 4.4 popup.

There are dozens of attributes on dozens of layers, which is a lot of coding if I have to specifically mention and format every single one. I want to bring in every attribute that is published in a given feature layer, and thought this would work:

var infoPopup = new PopupTemplate({
    title: "Feature Attributes",
    content: "{*}"
});
var layerPole = new FeatureLayer({
    url: "http://****/arcgis/rest/services/Click/XY_Rewrite/MapServer/22",
    opacity: 0.9,
    popupTemplate: infoPopup
});

I was thrilled when it looked like it worked...

... but on further examination, that's only three of the 34 attributes published in the map service. There's no apparent reason those three were chosen -- they aren't all the same type, they aren't the first three in the field list, etc.

  OBJECTID ( type: esriFieldTypeOID , alias: OBJECTID )
  CREATIONWORKREQUESTID ( type: esriFieldTypeString , alias: Creation Work Request ID , length: 10 )
  LASTWORKREQUESTID ( type: esriFieldTypeString , alias: Last Work Request ID , length: 10 )
  G_KEY ( type: esriFieldTypeInteger , alias: G_KEY )
  SUBTYPECD ( type: esriFieldTypeInteger , alias: Subtype )
  SYMBOLROTATION ( type: esriFieldTypeDouble , alias: Symbol Rotation )
  MATERIAL ( type: esriFieldTypeString , alias: Material , length: 5 , Coded Values: [WD: Wood] , [ST: Steel] , [FG: Fiberglass] , ...3 more... )
  CLASS ( type: esriFieldTypeString , alias: Class , length: 5 , Coded Values: [4: Class 4 Pole] , [0: Class 0 Pole] , [00: Class 00 Pole] , ...7 more... )
  POLENUMBER ( type: esriFieldTypeString , alias: Pole Number , length: 20 )
  (etc)

What's wrong with this JavaScript popup, what's wrong with my map service, or is there a better way to drop all published attributes into a popup template ?


texts: gdal_translate KMLSUPEROVERLAY creates blank black image

texts:
I am trying to convert a geotiff to kmz file to view in GE.  The geotiff is 878,720 KB.  Using a 'regular kml' - the resolution is very low in GE.  Having read around - it seems as conversion to a superoverlay is the best method?

I have chosen to use gdal_translate above other methods (e.g. MapTiler or Arc's tool that costs) because I have been using the GDAL python library already and I am trying to automate the entire process.

To test, I type into UNIX:

gdal_translate -of KMLSUPEROVERLAY filepath/2010_full_mosaic.tif filepath/2010_full_mosaic.kmz

A kml file is created....but on loading it into GE it is blank (black) - although extent/projection appear correct.

Would anyone be able to advise what I may have done wrong?  When using the gdalinfo command, I am provided the following details:

Driver: GTiff/GeoTIFF
Files: Filepath/2010_full_mosaic.tif
       Filepath/2010_full_mosaic.tif.ovr
       Filepath/2010_full_mosaic.tif.aux.xml
Size is 10572, 22630
Coordinate System is:
PROJCS["WGS 84 / UTM zone 36S",
    GEOGCS["WGS 84",
         DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",33],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32736"]]
Origin = (390313.896406000014395,8164584.107470000162721)
Pixel Size = (25.000000000000000,-25.000624509551976)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  390313.896, 8164584.107) ( 31d58'18.28"E, 16d35'54.43"S)
Lower Left  (  390313.896, 7598819.975) ( 31d56'22.37"E, 21d42'38.47"S)
Upper Right (  654613.896, 8164584.107) ( 34d26'57.65"E, 16d35'45.40"S)
Lower Right (  654613.896, 7598819.975) ( 34d29'41.00"E, 21d42'26.42"S)
Center      (  522463.896, 7881702.041) ( 33d12'49.09"E, 19d 9'27.96"S)
Band 1 Block=10572x1 Type=Float32, ColorInterp=Gray
 Overviews: 5286x11315, 2643x5658, 1322x2829, 661x1415, 331x708, 166x354

Becky


texts:
I'm trying to find the most "affordable" way to have a routable database, and I'm having some questions that maybe some of you can clarify.

My aim is to store all data in our server (not external APIs) and use Postgres/PostGIS, so what I'm looking for is to download all the database.

I know some sources:

OSM: I should download all Europe and make it routable in order to use it with pgRouting, but my main doubt is the consistence of data. Does anybody know if there is any company that uses OSM data in a production server?

Michelin: The source we currently have. We access it through an API, and we want to change it due to high costs.

ArcGIS: I know that ArcGIS offers a routable street database, but I think is only an API, you can't download it.

Google: The same as ArcGIS, only offer data via API

Does anybody knows any other source for a routable street database?


texts: ENVI raster file with nodata change to 0

texts:
I have a geotiff that I converted to a ENVI raster file with the following command:

  gdal_translate -of ENVI srtm_05_08.tif data.bil

The geotiff has water values supposedly set to nodata.  I am doing an interpolation on the data.bil file, and when I do, the water shows up at a height of about 32000m.  I am wondering if there is a simple way to change the nodata to be 0.  I tried:

  gdal_translate -of ENVI srtm_05_08.tif data.bil -a_nodata none

and

  gdal_translate -of ENVI srtm_05_08.tif data.bil -a_nodata 0.0

but neither of those seemed to work.

Is there an easy way to switch the data values?  I could do something like:
if (val>5000) then val=0
but I am very much a beginner and don't know how to do it.


texts: I want to know if there is a method for displaying camembert and histogram on map  using Openlayers3 and/or Geoserver. Like the picture bellow


texts: Stopping return of ArcGIS to tool dialog when tool fails?

texts:
When a tool processed in foreground fails, I have some time to read the log. After closing the log I get redirected to the tool dialog, where I stopped just before executing the tool. I know this is often handy, but while debugging models, I'd appreciate if the next step after closing the log was plain document (like when running the tool in background) or even "model builder" window.
Is there any way how to change this behavior (except for running all the processes in background, which is not what I want for other reasons, or running the model from Model Builder, which is not possible with "white boxes")?


texts: How to identify custom lines in .Dgn file using DgnLib?

texts:
I am getting a problem, I can't identify custom lines in .Dgn file.

As you know, in Microstation 7, we can assign the style value of lines from 0 to 7.

But if  lines are customed lines, they always have the style value is 0. How can we identify them ?

Please find the attached image file for demo.

Thank you very much for your help !


texts:
I am exporting some tables from PostGIS to a geopackage. My command to do is task is as follows
ogr2ogr -append -f GPKG E:\workspace\test.gpkg PG:service=XXXX -where app_einzugsgebiet.hauptgemeinde=70346  app_einzugsgebiet -nln Einzugsgebiet -nlt MULTIPOLYGON -lco GEOMETRY_NAME=shape -a_srs EPSG:31287

Now, I would like to use the WHERE IN clause in my command. However, I could not figure out how. I tried the following command
ogr2ogr -append -f GPKG E:\workspace\test.gpkg PG:service=XXXX -where app_einzugsgebiet.hauptgemeinde IN (70319, 70101, 70346) app_einzugsgebiet -nln Einzugsgebiet -nlt MULTIPOLYGON -lco GEOMETRY_NAME=shape -a_srs EPSG:31287

I am getting an error that says ERROR 1: Couldn't fetch requested layer 'IN'!. I tried with square bracket but it did not help either.
Obviously, my syntax is not okay.
So how do I do that?


texts: A way to measure whether two variables have similar spatial distributions?

texts:
I'm doing a project that's looking at a certain disease outbreak and vaccination in California counties using arcmap. I have aggregated data joins for disease outbreak rate, personal belief exemptions, vaccine coverage, and other demographic data (ethnicity, income...). All of the data layers are joined to the CA counties, so location differences is not an issue.

I am looking for a way to analyze the spatial distributions of, for example, personal belief exemptions and a certain ethnicity, to see if the data clusters in similar locations. I was thinking about spatial autocorrelation, but I am not sure if that applies for more than one variable.


texts: Create a new point from a reference point, degree and distance

texts: I'm trying to calculate the coordinate of endPoint  using the lat/lon of startPoint as a reference.  I know the distance between the start and end points and I know the azimuth to the endPoint.  I found one example using Geod but i'd like to hopefully do this in python with Geos and with WGS84 or similar spheroid model.


texts: Shapefile import with Oracle + GeoServer produces points instead of vector shapes

texts:
I have implemented the example at http://www.gistutor.com/openlayers/22-advanced-openlayers-tutorials/47-openlayers-wfs-t-using-a-geoserver-hosted-postgis-layer.html and got it working properly.

Now I am trying to get the same example running, but with Oracle Spatial (or Locator). I imported the test data shapefile to my Oracle DB using Oracle Map Builder (https://forums.oracle.com/forums/thread.jspa?threadID=1030707&start=0&tstart=0).

The data imported without errors, and I was able to configure GeoServer layer to use Oracle datasource for the data. However, when I look at the data with GeoServer's "layer preview", it's just points when it should be vector shapes.

This is how my layer looks like with Postgis (and how it should be):

And this is how it looks like with Oracle:

Any ideas on what went wrong (e.g. loading the shapefile, configuring Oracle, configuring GeoServer)?


texts: Looking for freehand editing tool in QGIS 3.x

texts:
Is any tool in QGIS 3.x for freehand editing?

In 2.4 version it is there but in 3.x I can't find any tools.


texts: Using Osmosis to extract highways and move to a MySQL database

texts:
I am pretty new to using Osmosis and I have been having a hard time of getting it going. So basically I am trying to extract highway data from the latest osm planet dump file using osmosis and moving into a mysql database.

I followed the simple script of

osmosis --read-pbf file="C:\A\Osmosis\planet.pbf" --tf accept-ways highways=* --used-node --write-xml highways

But I keep getting the error
"the following named pipes () and 1 default pipes have not been terminated with appropriate output sinks."

Can anyone help me. :)


texts: How to handle domains in python scripts for ArcGIS AGOL

texts:
I am trying to create a python script that automatically updates certain fields in an AGOL feature layer with UpdateCursor. The script works on "normal fields", but I don't know how to get it to work on fields with attribute domains. The script doesn't react to neither the domain code (11, 12 etc ) nor the value ("Steel", Cupper.. etc).
The script looks like this:
from arcgis.gis import GIS
gis = GIS("https://arcgis.com", "xxx", "xxx")

import arcpy

fs=gis.content.get("xxxx")

fu = fs.layers[0].url

feltnavne = [f.name for f in arcpy.ListFields(fu)]

with arcpy.da.UpdateCursor(fu, feltnavne) as cursor:

    for row in cursor:
        if row[2] == "Starpipe":
            row[0] = "Starpipe"
        cursor.updateRow(row)

This works with normal text fields. But I cant get it to work on fields with domains, where eg. 11 = "Starpipe".


texts: Finding the exact coordinates of circle's extreme east and west points on a sphere

texts:
I'm currently implementing the Bentley-Ottman algorithm applied to spheres, involving intersections of many spheres on one sphere, circles in most cases of course.
This requires locating "event" points on the sphere (ie: points where something "special" happened, such as extreme points of intersection circles or intersections between these).

My question is very similar to this one, mainly because I'm asking for the exact same thing : the eastmost and westmost points of a circle on a sphere, in my case named the start and end points of the circle. These points have the particularity of being the tangency points between the circle and a special longitude.
The problem resides in finding these as exact coordinates.

I'm working with the CGAL library, which provides a great deal of exact intersection primitives, and these are in my opinion probably the most appropriate way to find the exact start-end points.

So far I've tried to reduce the problem to a simpler one : instead of finding the longitudes of these points, I'm trying to find the height of the horizontal plane which contains these two points.
Using the following notations :

S : start point
E : end point
C : center of the circle (not on the sphere of course)
r : radius of the circle
O : center of the sphere
R : radius of the sphere
h : height of the horizontal plane containing the start-end points
H : intersection between the pole axis and the horizontal plane
containing the start-end points
phi : the latitude containing C
phi' : the latitude containing the start-end points.

Starting out from the formula based on the Law of Sines, from the last post :

sin(phi') = sin(phi) cos(r/R)

We notably have :

h = R sin(phi')
sin(phi) = OC / R

Giving finally :

h = OC cos(r / R)

This is as far as I've gotten, and I'm stuck on finding an algebraic form of this cosine.


texts:
I have 12 raster on NDVI. I want to use if conditional statement. Something like this :

Con ("raster1"=="raster2"=="raster3"=="raster4"=="raster5"=="raster6"=="raster7"=="raster8"=="raster9"=="raster10"=="raster11"=="raster12","raster1",255)

In that statement, I use raster calculator. But, it is error.
Does anyone know how to perform this in ArcGIS?


texts: Using Google as Base Layer with Openlayers 3.11.x (lastest)

texts:
It's possible with Openlayers 3.0 like: http://openlayers.org/en/v3.0.0/examples/google-map.html

But I want to use lastest version (3.11.x) of OpenLayers and Google Base Layer.
Not working with lastest like:
http://bl.ocks.org/elemoine/e82c7dd4b1d0ef45a9a4

Any suggestion? Or should I use any other basemap?


texts: How can a 3D model of a building be displayed in a web-browser?

texts:
I would like to try to show a proposed building in a web-browser such that the user can interact with it in a way similar to google maps streetview. Is it possible to do this, in any platform?

I can produce the building format in any geospatial format known to humanity, but as far as I can tell, Google Streetview only allows points to be inserted using their API. I don't want to force users to download a plugin to view this (which is why I would prefer not to use the Google Earth plugin)[updating this point in response to comments].

One thought I had was to try to make a panorama using static images of the building in some other tool that would be scrollable to give the appearance that it was embedded in a map. I presume this would be against the terms of service of Google, but I'm mainly curious how this can be done.

I'm also open to using any paid service for this functionality, or considering any new technology such as Kartograph, WebGL or perhaps a 3D javascript library such as http://threejs.org/


texts: Display Shapefile on website (Java or PHP)

texts:
i have to write an application where similar to Google Maps where i have to display a shapefile in a web application. My available technologies are Java (frontend framework: Apache Wicket) or PHP. It has to work under Firefox 4+ and IE8+
What are my options?

I have found a JS library:
http://badassjs.com/post/845509816/rendering-binary-shapefiles-with-javascript
But it does not seem to work under IE8.

I have read about Web Map Service (WMS). That seems to do the job but requires setting up another server. I could probably live with that.

Are there any other options? What are the best options?


texts: Adding band to existing GeoTiff using GDAL?

texts:
This seems like it should be straightforward but I can't for the life of me figure it out.

Given an existing GeoTiff containing a single band, how can you add another band to that GeoTiff?  Is the only way to do this to use GDALCreate() to create a new output file with an additional band and then copy the existing band from the original file to the new file?  That's the only solution I've come up with so far but it just seems like there should be a simple way to add a band to the existing dataset.


texts: Raster layer changes from transparent to black on certain zoom level

texts:
I upload a geotiff file to mapbox and created a layer with it. It works as expected on zoom level 2 up to 5.4 and then suddenly the background changes from transparent to black. Any ideas why that happens?

You can see the map here:

https://api.mapbox.com/styles/v1/felixmichel/cj1550ogw002s2smkgbz60keh.html?title=true&access_token=pk.eyJ1IjoiZmVsaXhtaWNoZWwiLCJhIjoiZWZrazRjOCJ9.62fkOEqGMxFxJZPJuo2iIQ#2.1/-3.499049/50.617268/0

The greyish border next to the coastline is the raster layer.


texts: Convert CSV file to shapefile and show data in view

texts:
I'm searching differents methods with QGIS to convert my CSV file to shapefile and show my points in the view. I tested differents methods that I have seen on the forum and It's not really what I want to get. In the CSV, my columns are like this : name, latitude,longitude

Espoey,43.248333,0.155
Chelle-Debat,43.303661346435504,0.224329993128777
PIC DU MIDI,42.933,0.15
Pic-du-Midi,42.93639,0.14278
Tarbes - Ossun - Lourdes,43.187,0.005
[MAE] CollŠge Jean Bouzet - PONTACQ,43.1853389,-0.1094389
Arcizans-Avant,42.98333,-0.1
BagnŠres-de-Luchon,42.8,0.6
Luz-Saint-Sauveur,42.87191,-0.00322
Boss•st-Central,42.776111,0.689722
Soumoulou,43.2656,-0.1875
Benasque, Refugio De Estos,42.683333,0.483333
Nay,43.18333,-0.26667
Saramon,43.52318,0.76349
BIELSA REFUGIO DE PI,42.669,0.099
ERISTE REFUGIO ANGEL,42.628,0.46

@J.Monticolo yes I did this method, the link "QGIS documentation" and I have my points in the view. My last question, all my points are on Africa. But they are normaly on all the world. It's a projection problem... ?


texts: I have a road pavement polygon layer (rose polygon colour). I want to split it at intersections just as a typical center line layer (black lines) is, so that individual street segments can be selected. I have tried buffers, unions, spatial joins, but I have not been successful in using them to segment the layer. Any tips?


texts: How to interpret I and Q components of a GPS baseband signal?

texts:
I am designing an RF frontend for GPS using MAX2769 chip. However, due to lack of theoretical and practical background in signal processing and knowledge about GPS, I am unsure how to interpret the I and Q baseband signals which are the output of MAX2769.

According to Wikipedia, the Q component carries the data for civilian use. Since I can't decrypt the military data, can I completely ignore the I component (in L1)?
Do the bits encoded in I and Q correspond to the data structures defined in the official GPS specifications[0] (Appendix III, page 153 specifically)?
Why do I get 2 bits for I and 2 bits for Q component from MAX2769, when they only encode zeros and ones?

[0] http://www.gps.gov/technical/icwg/IS-GPS-200H.pdf (I can't post more than two links)


texts: Getting error while assigning Geolocation to raster

texts:
I am using VIIRS imagery EDR dataset and trying to give Geolocation to Brightness Temperature layer by creating VRT files of Longitude, Latitude and Brightness Temperature layers given in HDF5 dataset.
I have used GDAL Translate command to create VRT and then warped VRT file of Brightness Temperature to Geolocation and convert it to TIFF. Here I am getting error as shown in screenshot below.
Kindly help me to figure out the issue.


texts: Publish a feature service from a shapefile in ArcGIS Online using JavaScript

texts: I have created a custom HTML page for data extract analysis using ArcGIS API, the API save the shapefile in zip format by default in my ArcGIS portal, so I just want to publish the shapefile(.zip) as a hosted feature layer using JavaScript.


texts:
I am a long time user of various GIS packages and am starting to explore QGIS in more detail.  I have a polyline shapefile with some multipart features.  I did not create the shapefile, but must edit it to fix the multipart features - they need to exist as single part features.  Its easy enough to run the Topology Checker and create a "must not have multi-part geometries" rule to identify the problematic features.  Its also easy enough to select the offending features and run the "Multipart to singleparts" tool to get single part features.
I noticed that the default output is set to [Create temporary layer].  Is there a way to set the output as the original layer instead of creating a temporary layer?  If not, then what is the "normal" process for appending the layer containing the single parts into the original layer that had the multipart features?  Naturally before I would append the temporary layer, I would delete the multipart feature from the original layer.


texts:
I'm starting to use the Pgrouting function on my database Postgresl. I have the table of links (id, source, target, cost) which contains the set of edges of my graph. I want to calculate the shortest path of a given node to another. The pgr_dijkstra function returns an error that I have not understood. Here is the table of edges:

When I'm trying to run this request:

SELECT seq, id1 AS node, id2 AS edge, cost
FROM pgr_dijkstra('SELECT id, source,target, cost FROM ubanlinks', 244225135, 598385915, false, false);

It returns this error:

  ERREUR:  Error computing path: Unknown exception caught!
  ********** Erreur **********
  ERREUR: Error computing path: Unknown exception caught!
  État SQL :38001

Does anyone have an idea as to what is the problem of my request or my table?


texts: Clicking on feature to create particular new map using ArcGIS API for JavaScript?

texts:
I have a polygon layer visible from scales 0 to 8 (bigger to smaller). The thing is that I would like to click on a SINGLE feature of this polygon layer and then going to a different map (but in same div), where only this feature is highlighted.

For example, imagine that you see a map of the USA states. Then you click on South Carolina state and see something similar to this ESRI example: http://help.arcgis.com/en/webapi/javascript/arcgis/samples/query_hover/index.html.

So the thing would be, clicking on the feature and switching automatically (without pressing any button) from the general map of the USA to a particular map for a particular feature where more specific operations can be applied, in this case, to South Carolina state.

Is this possible?


texts:
I'm using the tiler-tools library from: https://code.google.com/p/tilers-tools/wiki/QuickStart

And specifically this command: ./gdal_tiler.py --zoom=9-15 my_map.vrt

To generate tiles. When I use the --zoom option, I get this error:

ValueError: invalid literal for int() with base 10: '9-15'

From this output:

Traceback (most recent call last):
  File "./gdal_tiler.py", line 184, in <module>
    main(sys.argv)
  File "./gdal_tiler.py", line 177, in main
    parallel_map(process_src, flatten(res))
  File "/usr/share/nginx/www/newtest/tilers_tools/tiler_functions.py", line 97, in parallel_map
    return map(func, iterable)
  File "./gdal_tiler.py", line 66, in process_src
    prm.walk_pyramid()
  File "/usr/share/nginx/www/newtest/tilers_tools/tiler_backend.py", line 662, in walk_pyramid
    if not self.init_map(self.options.zoom):
  File "/usr/share/nginx/www/newtest/tilers_tools/tiler_backend.py", line 271, in init_map
    self.calc_zoom(zoom_parm)
  File "/usr/share/nginx/www/newtest/tilers_tools/tiler_backend.py", line 490, in calc_zoom
    self.set_zoom_range(zoom_parm, (min_zoom, max_zoom))
  File "/usr/share/nginx/www/newtest/tilers_tools/tiler_backend.py", line 990, in set_zoom_range
    zlist.append(int(zchunk[0]))
ValueError: invalid literal for int() with base 10: '9-15'

After that error the command drops and tiles aren't generated – what's wrong?


texts: Clip, or intersect, lines to polygon with QGIS

texts:
On QGIS 2.16.2, I have a polygon layer of states and a line layer of streets. What I want is all streets that lie within a certain state, either as an additional attribute or as a sub-layer.

In the end, I only want to show the streets within a certain state.

Extension: Some polygons overlap with each other. In these cases, the lines should be shown for both polygons.


texts:
I work with MODIS NDVI rasters in 2016. I have 23 rasters stacked in one object. I have 2 raster by month. I would like the average by months and conserve a raster for each month.

ndvi.stack <- stack(result)

# attribute name for each raster stacked
idx <- seq(as.Date('2016-01-17'), as.Date('2017-01-03'), '16 day')
names(ndvi.stack) <- idx

dim(ndvi.stack)
#[1] 302 268  23
## Set up color gradient with 100 values between 0.0 and 1.0
breaks <- seq(0, 1, by=0.01)
cols <- colorRampPalette(c("red", "yellow", "lightgreen"))(length(breaks)-1)

##plot
levelplot(ndvi.stack,at=breaks, col.regions=cols, main="NDVI 2016")

I would like to get something like that


texts: Using carto-vl to connect to local installation

texts:
I'm trying to use carto-VL on a local instalation via docker. Everything works fine with carto.js v4 and airship, but when i try to use carto-vl it always gives errors and I can't access my datasets, here's what i'm doing:

carto.setDefaultConfig({
   serverURL: 'http://localhost/user/dev'
});

And it gives me this error

I've used the same code here just changing the default config, i've tried to input as other thread sugested, but it gives me the same problem.

    const source = new carto.source.SQL(`select * from cordoba_catastro_simple where year > 1900 and year < 2018`, {
    user: 'dev',
    apiKey: 'default_public'
  }, {
    serverURL: 'http://localhost/user/dev'
  });

is there anything I can do to fix this?

edit:
I've tried to put the 8181 port on the serverURL but it gives the same error and the default auth is already set

Edit2: I've been digging into the carto-vl.js file itself, and found one of the sections that presents the problem

the e variable was supposed to have a stats item inside but it doesn't have it... can someone give me a hint of how to solve this problem?


texts: Why does FeatureClassToFeatureClass field mapping create shapefile with no attribute values on local machine from ArcSDE?

texts:
I have inherited taking over and supporting and ArcSDE GIS database. We have a process that we must do every 6 months to export certain features from the ArcSDE database into shape files so that they can be imported into a Smallworld GIS data. Yeah, I know. Why is our company using two different GIS systems? Don't ask. This was already in place before I even got involved with all of this.

In any case, we have a set of Python scripts that are being used to join shape files to feature classes in the GIS database. We run the Python scripts via ArcMap via the Geoprocessing->Python console.

However, it only works if we log into our GIS server and run ArcMap from there. If we attempt to do this from outside the GIS server, then the resulting output shape file has the right number of records, but all the attributes are either zero (for number attributes) or null (for text attributes). Again, running this in ArcMap 10.0 sp4 on the ArcGIS server works. Running it from ArcMap 10.0 sp4 on say my local machine, which has access to the data and I can bring it up, results in the exported shape file having no attribute values.

My other question is, I don't understand all of the parameters passed into the arcpy.FeatureClassToFeatureClass_conversion function.

Here is an example from the script:

arcpy.AddJoin_management("AERIALTAP","STATUS","TGIS.AE_STATUS","VALUE","KEEP_ALL")
arcpy.AddJoin_management("AERIALTAP","LOCATION_S","TGIS.AE_LOCATION_SOURCE","VALUE","KEEP_ALL")
arcpy.FeatureClassToFeatureClass_conversion("AERIALTAP","C:\TGIS\Final","AERIALTAP","#","ID ID true false false 9 Long 0 9 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.ID,-1,-1;X X true false false 19 Double 10 18 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.X,-1,-1;Y Y true false false 19 Double 10 18 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.Y,-1,-1;REGION REGION true false false 4 Text 0 0 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.REGION,-1,-1;MAINT_RESP MAINT_RESP true false false 4 Text 0 0 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.MAINT_RESP,-1,-1;OBJECTID OBJECTID true false false 19 Text 0 18 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.OBJECTID,-1,-1;STATUS STATUS true true false 50 Text 0 0 ,First,#,C:\TGIS\First\AERIALTAP.shp,TGIS.AE_STATUS.DESCRIPTION,-1,-1;LOCATION_S LOCATION_S true true false 50 Text 0 0 ,First,#,C:\TGIS\First\AERIALTAP.shp,TGIS.AE_LOCATION_SOURCE.DESCRIPTION,-1,-1","#")

I understand what the join calls are doing.

I understand the first three parameters into the conversion call (input feature class, output directory, output feature class name). The rest I have some sort of idea, but not completely sure. It definitely looks like it's mapping the input feature column to an output feature column. The "#" seems to be a definition of a delimiter between fields, but the rest confuses me.

I've searched the ArcSDE web site and nothing is very clear about it. I have yet to find an example like what I have.

Any help would be appreciate.

If I do just this it works, but that's without any joins defined:

arcpy.FeatureClassToFeatureClass_conversion("AERIALTAP","C:\TGIS\Final","AERIALTAP")

This works. But once I enter the field mapping and the joins, forget it. It won't work unless I'm on the production ArcSDE GIS server.


texts: leaflet control geocoder positioning as texfield and icon

texts:
i am using leaflet control geocoder, i cannot figure out two things, the first is i want to position it in a div, not on the map, is there a way i can do that? if yes then how?

i have only come across the positioning method but it only lets me select it in the form of topleft topright etc. the second problem is that i want to set an icon both for when the marked location that pops up when geocoder gives result and for the actual geocoder (like a little search icon ), heres what i have.

I am relatively new to this.

 var geocoder = L.Control.geocoder({
        collapsed:false,
        position:"topright"
})
    .on('markgeocode', function(e) {
    document.getElementById("currentLocation").value=e.geocode.name;
    e.geocode.icon=MarkerIcon;

    })
    .addTo(mymap);


texts: Has anyone used Esri JSON data with json-schema validation?

texts:
Passing data between web services often means passing JSON data.  A standard for evaluating JSON data is under development at json-schema.org.  I would like to incorporate Esri JSON data in my schema definition.  Has anyone developed json-schema definitions for Esri JSON or GeoJSON? I am new to json-schema.  These definition files work at jsonlint.com  However, I'm not sure if the schema definition is complete.  Can anyone improve on the schema definitions provided here or point to existing public definitions?

P.S. Somebody with more reputation points should create the tag, "json-schema".

Polygon geometry:

{
    "$schema": "http://json-schema.org/draft-06/schema#",
    "$id":"https://some.site.somewhere/esri-polygon.json",
    "title":"esri-polygon",
    "type": "object",
    "properties": {
        "rings": {
            "title": "Rings array",
            "description": "An array of one or more rings. Unit of measure is defined by the spatial reference.",
            "type": "array",
            "items": {
                "title": "Ring array",
                "description": "An array of vertices that describe a single ring.",
                "type": "array",
                "items": {
                    "title": "Vertex or point array",
                    "description":  "An array of numbers that describe a vertex, or point. X and Y coordinates are required, with optional Z or M coordinates.",
                    "minItems": 2,
                    "maxItems": 4,
                    "items": { "type": "number" }
                }
            }
        },
        "spatialReference": {
            "type": "object",
            "properties": {
                "wkid": {"type": "integer"},
                "latestWkid": {"type": "integer"}
            }
        }
    }
}

Point geometry:

{
    "$schema": "http://json-schema.org/draft-06/schema#",
    "$id":"https://some.site.somewhere/esri-point.json",
    "title":"esri-point",
    "type": "object",
    "properties": {
        "x": {
            "type": "number",
            "title": "Cartesian x-axis position",
            "description": "Distance along the x-axis.  Unit of measure is defined by the spatial reference."
        },
        "y": {
            "type": "number",
            "title": "Cartesian y-axis position",
            "description": "Distance along the y-axis.  Unit of measure is defined by the spatial reference."
        },
        "spatialReference": {
            "type": "object",
            "properties": {
                "wkid": {"type": "integer"},
                "latestWkid": {"type": "integer"}
            }
        }
    }
}

Line geometry:

{
    "$schema": "http://json-schema.org/draft-06/schema#",
    "$id":"https://some.site.somewhere/esri-polyline.json",
    "title":"esri-polyline",
    "type": "object",
    "properties": {
        "paths": {
            "title": "Paths array",
            "description": "An array of one or more paths. Unit of measure is defined by the spatial reference.",
            "type": "array",
            "items": {
                "title": "Path array",
                "description": "An array of vertices that describe a single path.",
                "type": "array",
                "items": {
                    "title": "Vertex or point array",
                    "description":  "An array of numbers that describe a vertex, or point. X and Y coordinates are required, with optional Z or M coordinates.",
                    "minItems": 2,
                    "maxItems": 4,
                    "items": { "type": "number" }
                }
            }
        },
        "spatialReference": {
            "type": "object",
            "properties": {
                "wkid": {"type": "integer"},
                "latestWkid": {"type": "integer"}
            }
        }
    }
}


texts: How to locate PostGIS AMIs on Amazon EC2?

texts:
There are nearly 7000 AMIs on EC2, but I'm having a difficult time figuring out which ones have what I'm looking for--in this case PostGIS on Linux.  No specific version/configuation--I want to check out various ones.

If I enter postgis on the AMI search, I get 6 AMIs:

I know the opengeo AMIs have postgis, but they don't appear.  It appears you have to already know which AMI you are looking for or know which keywords to use.  In this case, opengeo will get the results.  But I wouldn't have known that without prior knowledge (opengeo blog post about their AMIs).

Even once I locate an AMI, I'm having a hard time figuring out what it actually is and what software versions without actually starting an instance. The AWS console tells you platform, but not much else unless the creator put it in the description.

There could actually be more PostGIS AMIs that aren't discoverable.  Is there an internet source that tracks PostGIS AMIs?  Maybe provides a little more metadata about them?

What are others doing?  Just starting with the OS and installing from package or source themselves (right now, I think that's the easier option).


texts: How can I publish MrSID files in geoserver?

texts:
I need to publish MrSID files using geoserver 2.1.4.

I am unable to even get the plugin to add the store in geoserver.

Does anyone have any suggestions on how to achieve this?


texts: How do simple statistics based on polygons?

texts:
I have a shapefile from a city. I divided this shapefile into polygons (squares, majority). I would like to perform simple statistics in each square in a easy way, because it is almost impossible to do it by hand.

Can someone help me? I have basic knowledge of scripting. I have ArcGIS 10.

1st edit:
 I have a shapefile of points. Each point is a well, each well have some informations (example: depth). I want to have statistics for each square. I want to know how many wells I have in each squares, what is the mean of the depth and so on


texts:
I'm using GRASS 7.6 to clip a raster (i.e. big_raster) layer on a smaller one (i.e. small_raster).
Both the rasters are made by nan and 1 values.

I used the map calc tool

r.mapcalc expression="raster_clipped = if( “small_raster@PERMANENT” , "big_raster@PERMANENT" )"

Why do I get this error?

Invalid map <“small_raster@PERMANENT”>
Parse error
ERROR: parse error
Traceback (most recent call last):
  File "/usr/lib/grass76/gui/wxpython/gui_core/goutput.py",
line 473, in OnCmdOutput

self.cmdOutput.AddStyledMessage(message, type)
  File "/usr/lib/grass76/gui/wxpython/gui_core/goutput.py",
line 771, in AddStyledMessage

self.AddTextWrapped(message, wrap=None)
  File "/usr/lib/grass76/gui/wxpython/gui_core/goutput.py",
line 720, in AddTextWrapped

txt = EncodeString(txt)
  File "/usr/lib/grass76/gui/wxpython/core/gcmd.py", line
99, in EncodeString

return string.encode(_enc)
UnicodeDecodeError
:
'ascii' codec can't decode byte 0xe2 in position 27: ordinal
not in range(128)


texts: How does getLegendGraphic, from GeoServer, handle attribute-based styles?

texts:
I have a layer with a color attribute and I write an SLD with a fill color like this:

<sld:PolygonSymbolizer>
    <sld:Fill>
        <sld:CssParameter name="fill">
            <ogc:PropertyName>color</ogc:PropertyName>
        </sld:CssParameter>
    </sld:Fill>
</sld:PolygonSymbolizer>

Each geometry will have its own fill color, based on the value of its color attribute.

However, the legend does not reflect that.

Does GeoServer have a way to generate a good legend for this kind of SLD body, where we have attribute-based styles?


texts: Why is POINT type layer not displayed correctly in my mapserver map?

texts:
I have 14 shapefiles from same source with the same WKT:

PROJCS["GRS_1980_Transverse_Mercator",
GEOGCS["GCS_GRS_1980",
DATUM["D_GRS_1980",
SPHEROID["GRS_1980",6378137,298.257222101]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]],
PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",500000],
PARAMETER["False_Northing",-6000000],
PARAMETER["Central_Meridian",24],
PARAMETER["Scale_Factor",0.9996],
PARAMETER["Latitude_Of_Origin",0],
UNIT["Meter",1]]

This WKT does not match any CRS perfectly, but it is very similar to LKS92/Latvia TM:

PROJCS["LKS92_Latvia_TM",GEOGCS["GCS_LKS92",
DATUM["D_Latvia_1992",
SPHEROID["GRS_1980",6378137,298.257222101]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",24],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",-6000000],
UNIT["Meter",1]]

Only 3 lines are different:

# WKT my shapefiles have
PROJCS["GRS_1980_Transverse_Mercator",
GEOGCS["GCS_GRS_1980",
DATUM["D_GRS_1980",

# WKT for LKS92/Latvia TM
PROJCS["LKS92_Latvia_TM",
GEOGCS["GCS_LKS92",
DATUM["D_Latvia_1992",

The only issue I am having right now - POINT type layer is not shown correctly on my map. RASTER, LINE, POLYGON type layers are displayed correctly. Layers of type POINT are not shown correctly.

Image #1 - shows how my map is displayed in mapserver. There is a single black circle outside of map extent area. What I expect to see is something similar to image#2.

Image #2 - shows how the layers are displayed in QGIS.

Image #3  This is what I see when I open the shapefile with QGIS.

I see 2 possible solutions:

I convert the POINT type shapefile (called places.shp) so that points are shown on the map
I create a new shapefile with a few POINT type elements which would be in same CRS and work properly in my application.

I have tried both options, used QGis and also ogr2gui. No matter what I do, POINT type layer is not shown properly and there is only a single black dot on the map:

mapfile.map:

LAYER
    NAME "places"
    DATA places
    STATUS ON
    TYPE POINT
    FEATURE
        POINTS
            1 1
        END
    END
    CLASS
        NAME "places"
        SYMBOL "circle"
        SIZE 16
        COLOR 0 0 0
    END
END

SYMBOL
    NAME "circle"
    TYPE ellipse
    FILLED true
    POINTS
        10 10
    END
END

I have tested my application on Mapserver 6.0.3 and 6.4.1.

Edit#1:

This is what QGIS tells me when I check properties of places.shp

Extents
In layer spatial reference system units
xMin,yMin 312500.00,172500.00 : xMax,yMax 762500.00,437500.00

extent I have defined in mapfile.map:

EXTENT 313187.4 146161.56 766469.92 470367.64


texts: What types of lat/long coordinates are these?

texts:
I'm trying to map out a set of coordinates that I received:

 N 39,21.440 W 120,48.076

But i'm not familiar with the format.  I'm familiar with DMS lat/longs and the standard(?) format (eg, 39.123234, -121.348348)

Can anyone tell me how I can convert these to either DMS or standard?


texts: Merging polylines that join in ArcGIS Desktop?

texts:
I have a number of polylines (around 9000), a number of which have one or both ends touching another polyline. I would like to merge these ones together into one polyline - thus reducing the number of polylines and ensuring that each line represents one real-world object (rather than having multiple lines per object).

I cannot find a scriptable (preferably through a Python script) way to do this.

Is this possible?


texts:
What units are used in GDAL Proximity or GRASS Rasterize?
- 'new size' parameter


texts: Calculating the length of a single edge in QGIS

texts: I need the correct length of a edge between to points(yellow line in the picture below) in the unit [m] for validation of an equation. I just found the possbility to add geometry (length) to the attribute table of the tracks, but the lengths which I get by adding this column to the attribute table doesn't make sense.


texts: QGIS print composer does not export high res details from Spatialite layer

texts:
I downloaded OSM.pbf data from Geofabrik, and I followed https://anitagraser.com/2014/05/31/a-guide-to-googlemaps-like-maps-with-osm-in-qgis/
this example to import pbf file to SpatiaLite layer for my map. (QGIS 3.4.2) Now I have google style OSM data as Spatialite layer.

I need to print out 60km x 60km zone in high quality, so I zoomed out map from canvas to fit my target area in the screen, and moved to print composer (or print layout). Then I set the layout size, set north/south/west/est extents, then export image to have my target resolution (16000px).

However, after I checked high resolution png file, all names, roads and rivers are magnified, and all details & minor roads are ignored. It seems that print composer exported the exact same image of canvas, which I zoomed out to fit 60km x 60km target region in screen.

This never happened to me When I printed maps from Quickmap service plug-in. Using maps from the plug-in, even though map was zoomed out, print composer exported high quality map with details.

How can I export high quality details from Spatialite layer using print composer?


texts:
am working on Angular 11 project having arcgis javascript version 4.17
when doing Drag and Drop on the map it self by the mouse, there is a kind of lagging that happens on it. the movement is not smoothly done.
note it is not something with the internet connection,
Code:
const properties: esri.MapProperties = {
      basemap: this.basemap
    };
this.map = new EsriMap(properties);

const map_view_properties: esri.MapViewProperties = {
      container: this.mapViewEl.nativeElement,
      center: this.homeService.mapCenter,
      zoom: this.homeService.mapZoomLevel,
      // tslint:disable-next-line: object-literal-shorthand
      map: this.map,
    };

this.view = new EsriMapView(map_view_properties);


texts: Export map image in QGIS using a precisely defined area

texts:
I have to continuously export map images (of different layers) from QGIS to use them in Photoshop for further processing. Given that Photoshop can't deal with world files, I need to export the images in precisely the same size, scale and mapped area.

My workflow is to store a QGIS project for every map project. Reopening the QGIS projects and exporting images gives perfectly fitting images that can be stacked in Photoshop. This setup is rather fragile, though. Moving the map in QGIS just a little bit and accidentally saving the project leads to images that don't match any more. The same happens when the QGIS window size is changed.

I tried to copy and paste the values (like "Extent North, West, East, South", "Scale" and so on) from the "Save map as Image" export dialog, just to find that the exported maps aren't always the same size. Perhaps this has to do with some rounding errors.

So, how can I export images of a given map that have precisely the same size, resolution and covered area so that they can be stacked in post processing?


texts: How to sort legend values efficiently in QGIS print composer?

texts: Using QGIS 2.0, I have a vertical color legend for raster values, created in the print composer. I want the values sorted in descending order from top to bottom, which appears to be the reverse of the default order. I have found that I can manually re-order each individual item in the legend's properties by clicking the up and down arrows with that item selected. Is there a more efficient approach? The best answer would provide something (is the legend a class?) that I can manipulate with the Python console.


texts: Spatial join and sum of attributes between 2 layers

texts:
I have on a spatial join issue : I need to perform a spatial join from a building shapefile to a grid feature class (200 * 200 meter). The spatial join needs to compute the sum of each attribute per tile.

More precisely, i have several attribute (income, surfaces, number of people per buildind, ages, children and so on). The aim is that each building within a tile has to be concatenate. For example, if within a tile, there is 2 buildings, one of 60 m² and the other is 40 m², the result of the tile in the field surface must be 100 m².

Does someone know how to solve this problem ?


texts: PostGIS ST_Point_Inside_Circle radius unit

texts:
I'm trying to use the ST_Point_Inside_Circle function from PostGIS but I'm not sure about the unit the radius is stored.

Let's say I have a table with the following points:

   Id | Point
    1 | POINT(-60.64855 -32.96482)
    2 | POINT (-60.65871 -32.93411)

and I want to query them by doing

 st_point_inside_circle(Point,
 -32.93690, -60.64343, radius)

Now, I know that distance from (-32.93690, -60.64343) to P1 is of about 1460 m and from (-32.93690, -60.64343) to P2 is of 3117.5 m.
Using a trial-and-error approach I was able to determine that if
 radius < 0.02839 and radius > 0.02838 I was able to get the 2 points in my query.
However, the value for radius doesn't make much sense. Which units is it expressed in? Since the distance between points is too short, I don't think that not using a spheroid would affect the results. Maybe I am doing something wrong.
Should I use ST_Buffer instead?


texts: How to get an ArcGIS custom tool to run fom the command line?

texts:
I have been experimenting with ESRI's CalculateArea custom tool and it works fine running  within ArcGIS from a toolbox.  Then I wanted to see if I could run it as a standalone script from the commandline like this:

c:\Python27\ArcGIS10.1\python.exe calcAreaTest.py

calcAreaTest.py

import arcpy
arcpy.AddToolbox(r"D:\Toolbox.tbx")
arcpy.CalculateArea(r"D:\data.gdb\data", "Area")

The following error occurs:

Traceback (most recent call last):
  File "D:\calcAreaTest.py", line 3, in <module>
    arcpy.CalculateArea(r"D:\data.gdb\data", "Area")
  File "D:\Toolbox.tbx", line 25, in CalculateArea
arcgisscripting.ExecuteError: ERROR 000582: Error occurred during execution.

I can paste the same code from calcAreaTest.py into the ArcGIS Python code window and it works.  Anybody know how I can get it to work from the commandline?

Here is the link to the source code of the GPCalculateArea tool if anybody is interested at looking it.
GPCalculateArea custom tool


texts: ArcGIS 10.1 Geocoding problems - Creature Feature Class/Error processing the table

texts:
I am trying to geocode a list of addresses to location in a particular shapefile which has roads. I'm using ArcGIS 10.1, and trying to geocode using the address locator 10.0 north america geocode service (in table of contents, right click on the file -> geocode address).

The spreadsheet that I am trying to geocode is in .xls format. The geocoding MATCHED ~640 cases, before it gave this error:

  Creature Feature Class/Error processing the table

There are no unusual characters in the field names - all of them either have a letter or a number, and nothing else.

Scanning over the spreadsheet, there do not appear to be any null values, and the addresses do not seem to contain any periods, or characters that would otherwise be unacceptable to an address locator (my thoughts on the matter obviously).

I've looked over other problems of a similar nature that have been posted in various forums, and most of the answers seem to be that the problem lies in the data, or in the format of the data.

So my questions are:

Is there a specific problem with the data that I should look for?
Why would the address location terminate after ~640 successful matches?
Is there a better way to place point representation on a map, rather than geocoding a list of addresses via address location to a shapefile?
Could the problem be with the shapefile, and some of the shapefiles attributes?


texts: Toggle labels on/off for a layer with PyQGIS 2?

texts:
I try to toggle labels on/off for a layer in QGIS 2.18 with PyQGIS. In PyQGIS 3 a method QgsVectorLayer().setLabelsEnabled() seem to have been added, but as far as I see, such is not available in PyQGIS 2 (There is no such hint Since QGIS 3.0 as well in the doku for PyQGIS 3 https://qgis.org/api/classQgsVectorLayer.html#a4cdece41437b32f4adafeb1caa10ad1b).

My first try was to access the labeling configuration of the layer with sth. like

label_settings = my_layer.labeling().settings()
label_settings.enabled = not label_settings.enabled
my_layer.setLabeling(label_settings)

but the labeling() and setLabeling() methods are not available in the python bindings (e.g. https://qgis.org/api/2.18/classQgsVectorLayer.html#ada12f21c42e2f3c2eaa2b234ff25ed28).

There is a method QgsVectorLayer().enableLabels() as well, but this is deprecated (https://qgis.org/api/2.18/classQgsVectorLayer.html#ae7735460da1518febff85575851b8e88) and seems to have no effect.

Any suggestions?


texts: QGIS's "setItemPosition" doesn't seem to work for QgsComposerLabel

texts:
I'm using QGIS 2.18 and I'm printing maps using a QGIS plugin I made myself. The method setItemPosition(x, y) is working fine with my legend (QgsComposerLegend object).

But when I try to use the same method setItemPosition(x, y) with a piece of text (QgsComposerLabelobject), it doesn't do anything and my text remains in the upper left corner of the composition :

As you can see above, all my 5 labels are stuck in the upper left corner of the picture, while my idea was to put the 5 labels in 5 different places, using a for loop in Python.

Additional relevant info :

My paper size is (260, 200)
I used label.setItemPosition(150, 50) as a test, so the labels should be placed around the middle of the picture.


texts: Specifying which point buffers fall within a particualar land type (polygon)

texts:
I have a point buffer layer which represents tick occurrence and a polygon layer which represents landcover types (derived from Corine land cover). I want to define which point buffers (1km) fall within urban areas to define risk zones. I also want to do this for thresholds of temperature and precipitation (which presumably I'm going to interpolate as gridded and mask onto polygon) to define 'high-risk zones'. I’m quite NEW to QGIS so not sure how to approach this. I have tried using the intersect tool but that just selects all the points from the land cover layer.

Attribute table for points

Attribute table for land cover


texts: Selecting features based on relative distances between features in single shapefile using ArcGIS Desktop?

texts:
I have a set of polygons within a single shapefile. I want to keep only polygons, which are located >500 meters from another polygons in the same shapefile.

I thought to apply NEAR Tool in ArcGIS to measure the NEAR distances and then Select the features located > 500m. However, the NEAR Tool measures the closest distances from one feature to another feature only if I have two shapefiles.

Is there a way how to select features based on near distances in within a single shapefile?

I am using ArcGIS 10.1 with Spatial Analyst licence.


texts: What resources can you suggest for making beautiful online Maps or Mapping applications?

texts: As a GIS developer, my design skills are rather limited. Are there any links, books or resources, that you would suggest to make my online maps more pleasing and beautiful?


texts: Issue with qgis2threejs and compatability with QGIS 3D view

texts:
I have an issue with qgis2threejs running in QGIS 3.10.7 on Windows 10
When I open the qgis2threejs panel I get the error message below:

"No 3D objects were rendered? There is a compatibility issue with QGIS
3D view. You need to close QGIS 3D view(s) and restart QGIS to use
this preview."

I have uninstalled and re-installed both the QGIS and the qgis2threejs plugin.


texts:
I have created one table in my PostGIS nut I cannot insert point.

What is wrong with my query?

CREATE TABLE app (
  p_id INTEGER PRIMARY KEY

);

SELECT AddGeometryColumn('app','the_geom','4326','POINT',2);

INSERT INTO app(p_id, the_geom) VALUES(2, POINT(-71.060316, 48.432044));

After the last query it shows some error..

ERROR:  column "the_geom" is of type geometry but expression is of type point
LINE 1: ...SERT INTO app(p_id, the_geom) VALUES(2, POINT(-71....
                                                             ^
HINT:  You will need to rewrite or cast the expression.

********** Error **********

ERROR: column "the_geom" is of type geometry but expression is of type point
SQL state: 42804
Hint: You will need to rewrite or cast the expression.
Character: 53

I already check my PostGIS version.

SELECT PostGIS_full_version();

I got the following output..

"POSTGIS="1.5.3" GEOS="3.3.1-CAPI-1.7.1" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.3" USE_STATS"


texts: Load testing WMS capabilities for GeoServer instance?

texts:
I would like to load test the WMS capabilities for our GeoServer instance. How should I go about this?

Server is running 64 bit ubuntu 14.04, Oracle Java 8, and geoserver 2.7.2

I know I could simply post the link to social media and have a bunch of people blast away at it but I don't know what to use to actually track performance metrics like the quantity of simultaneous users vs, load times, latency, and errors.

Ideally there would be both client side and server side tools to help track this and simulate a large user load.

Any suggestions?


texts: Hook two horizontal slider each other - PyQt5

texts:
In my QGIS Plugin I have this Qt dialog where there are two horizontal sliders. I'm trying to hook one to the other in this way: if the checkBox is checked, I take the difference between them and if one is moved the other change the value using the difference. This is the code I tried, but it does not work.

def run (self):
   self.dlg = Dialog()
   if self.dlg.checkBox.isChecked():
      firstDate = self.dlg.horizontalSlider.value()
      secondDate = self.dlg.horizontalSlider_2.value()
      difference = abs(secondDate-firstDate)
      self.dlg.horizontalSlider.sliderMoved.connect(self.dlg.horizontalSlider_2.setValue(firstDate+difference))
      self.dlg.horizontalSlider_2.sliderMoved.connect(self.dlg.horizontalSlider.setValue(secondDate-difference))
   self.dlg.show()

This is the dialog to be more clear:


texts: QGIS 2.6 Atlas creator - number of copies of output based on field

texts: I am using QGIS 2.6 to create a series of maps based on a coverage grid. For each grid, I have a field named COUNT, that determines the number of copies I'd like to output. Is there any way to automatically set this up using the the atlas creator?


texts: Simulating the expansion of polygon features

texts:
I've got what I'm hoping will be an interesting question.  I'm working on an assignment for an intro to GIS course that uses some Gulf oil spill data to introduce common vector-based spatial analysis methods (buffers, overlays, etc.)  I've got a polygon feature class that holds the bounds of the Deepwater Horizon oil spill on a given day, and I'm simulating its expansion with buffers.

It does the job to illustrate the concept, but certainly doesn't provide realistic results.  It got me thinking about how this could be done in a way that provided less uniform results, mimicking/faking the effect of currents directing the oil in various directions as it expands.

In a general sense, I'm looking for a workflow that would accomplish the following given an input polygon feature:

Create a new polygon feature that is bigger than the original by a specified area (like 10 sq. km.) or maybe a specified factor (like 5%)
The new polygon feature would have an arbitrary shape, with the caveat that...
The new polygon feature would contain the original polygon feature (this point isn't a deal breaker, but would be nice to have)

Any real-world solution would have to involve modeling ocean currents, fluid dynamics, and the like, which goes well outside the scope of what I'm trying to do (though solutions incorporating this are certainly welcome and would be interesting to see), but the idea has piqued my curiosity about the underlying spatial problem and I'm curious what solutions are out there.  I've got one solution in mind, but I'd like to hear what solutions others may have.

I'm working in the ESRI world, but solutions that involve other packages/platforms are certainly welcome (though I may not be able to test them).  General algorithms, pseudocode, and code are fine as well.


texts: Initial state of VB .net checkbox to toggle ArcMap layer visibility

texts:
I have a checkbox control as part of an ArcMap add-in with a dockable window in VB .net that turns a particular layer's visibility on and off in ArcMap. The initial state is set to "unchecked". But, if I load the tool into ArcMap and use it when that layer is already visible, the checkbox works in reverse (checked when the layer is off and unchecked when the layer is on). Is there any way I can check the visibility of the layer when the tool is first loaded and then set the state of the checkbox?

I tried putting some code in Public Sub New() function for my dockable window, but this crashed ArcMap. Here is what I had (with 3 dots representing other code). My checkbox is named chkBasemap. In this simple example, there are always only 2 layers in my map. I just assume the basemap layer I want to toggle the visibility of is always the second layer. The first layer is a polygon layer.

Imports ESRI.ArcGIS.ArcMapUI
Imports ESRI.ArcGIS.Carto
Imports ESRI.ArcGIS.CartoUI
Imports ESRI.ArcGIS.Display
Imports ESRI.ArcGIS.Framework
Imports ESRI.ArcGIS.Geodatabase
Imports ESRI.ArcGIS.Geometry
Imports ESRI.ArcGIS.esriSystem

Public Class DockWinClimateTools

  Public Sub New(ByVal hook As Object)
        InitializeComponent()
        AddItems()
        CheckStates()
        Me.Hook = hook
  End Sub

  Private m_hook As Object
  Public Property Hook() As Object
    Get
      Return m_hook
    End Get
    Set(ByVal value As Object)
      m_hook = value
    End Set
  End Property

  Public Class AddinImpl
    Inherits ESRI.ArcGIS.Desktop.AddIns.DockableWindow

    Private m_windowUI As DockWinClimateTools

    Protected Overrides Function OnCreateChild() As System.IntPtr
      m_windowUI = New DockWinClimateTools(Me.Hook)
      Return m_windowUI.Handle
    End Function

    Protected Overrides Sub Dispose(ByVal Param As Boolean)
      If m_windowUI IsNot Nothing Then
        m_windowUI.Dispose(Param)
      End If
    End Sub
  End Class

  Private Sub chkBasemap_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkBasemap.CheckedChanged
      Dim pMxDoc As IMxDocument = My.ArcMap.Application.Document
      Dim pMap As IMap = pMxDoc.FocusMap
      Dim pLayer As ILayer = pMap.Layer(1)

      If pLayer.Visible Then
          pLayer.Visible = False
      Else
          pLayer.Visible = True
      End If

      pMxDoc.ActiveView.ContentsChanged()
      pMxDoc.ActiveView.Refresh()
  End Sub

  Public Sub CheckStates()
        Dim pMxDoc As IMxDocument = My.ArcMap.Application.Document
        Dim pMap As IMap = pMxDoc.FocusMap
        Dim baseLayer As ILayer = pMap.Layer(1)
        If baseLayer.Visible Then
            chkBasemap.Checked = True
        Else
            chkBasemap.Checked = False
        End If
   End Sub
End Class


texts: QGIS, Table Manager cannot rename column title

texts:
My current attribute table has a column whose title exceeds the ten letters maximum.

I installed Table Manager, hoping I could rename the certain field to further use it (in order to add some symbology based on the values it contains).
However, the Table Manager doesn't even show it.

Anyone knows where the problem lies?


texts: OL3 with custom projection (Proj4) and wmts

texts:
I have a problem with projection in ol3.
I want to integrate a wmts layer with projection: EPSG:25832 (UTM 32) using Proj4.

I tried to combine the ol3 wmts example : https://openlayers.org/en/latest/examples/wmts.html
with a previous question here: Openlayers3 using custom EPSG:25832.

At the moment this is my code:

<script src="https://openlayers.org/en/v4.0.1/build/ol.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.12/proj4-src.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.12/proj4.js"></script>
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>

<script>
  var myProjectionName = 'EPSG:25832';
  proj4.defs(myProjectionName, "+proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs");
  var projection = ol.proj.get(myProjectionName);
  var projectionExtent = projection.getExtent();
  var size = ol.extent.getWidth(projectionExtent) / 256;
  var resolutions = new Array(14);
  var matrixIds = new Array(14);
  for (var z = 0; z < 14; ++z) {
    resolutions[z] = size / Math.pow(2, z);
    matrixIds[z] = z;
  }
</script>

When i run my learning script i get followed error:

TypeError: projection is null  ol3.html:19:1

meaning this line:

resolutions[z] = size / Math.pow(2, z);

What have I done wrong?


texts: How to define PROJ.4 string for GDAL projection

texts:
I'm doing some zonal computations in GDAL using the code posted in the solution here: Issue Trying to create Zonal Statistics using Gdal and Python.

It runs fine for me using the example data posted with the question, but when I try with my own GeoTiff and shapefile, this step:

# Read projection info from input GeoTiff
raster_srs.ImportFromWkt(raster.GetProjectionRef())
target_ds.SetProjection(raster_srs.ExportToWkt())

# Rasterize zone polygon to raster
gdal.RasterizeLayer(target_ds, [1], lyr, burn_values=[1])

throws the following error:

ERROR 1: No PROJ.4 translation for destination SRS, coordinate
transformation initialization has failed.

gdal info:

Driver: GTiff/GeoTIFF
Files: data/ndvi/ndvi_c_dk_20150405.tif
Size is 29424, 30470
Coordinate System is:
LOCAL_CS["unnamed",
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (-19.000000000000000,37.999585000000003)
Pixel Size = (0.002413000000000,-0.002413000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -19.0000000,  37.9995850)
Lower Left  ( -19.0000000, -35.5245250)
Upper Right (  52.0001120,  37.9995850)
Lower Right (  52.0001120, -35.5245250)
Center      (  16.5000560,   1.2375300)
Band 1 Block=29424x1 Type=Byte, ColorInterp=Palette
  Color Table (RGB with 256 entries)

Knowing that the coordinate systems info is missing, I think I should explicitly define the Proj4 string. I've found examples of doing such like this:

wgs84_wkt = """
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.01745329251994328,
        AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4326"]]"""

then I presume I could do

raster_srs.ImportFromWkt(wgs84_wkt)
target_ds.SetProjection(raster_srs.ExportToWkt())

But I have no idea how to define the correct Proj4 string in the first place.


texts:
I used to run the GeoTagged Photos To Points tool fine. Now when I just open the tool window there is the red cross error next to the input field without me having added anything yet. When I try to run the tool with some inputs despite the warning (which is non descriptive since there is no context window that appears to tell me anything) an error dialogue box shows up but it only says error with an exclamation mark but nothing else. No description of what the issue might be. No error code like 9999 or anything.

Can you suggest what the issue might be?


texts:
I've followed the instructions from this question Installing QGIS3 on Ubuntu 16.04 Xenial: dependency problem

I tried all the possible repositories but It keeps installing the 2.18 version.

Can anyone explain me how to install qgis3 on ubuntu 16.04 please?


texts: Getting CRS to export shapely polygon to shapefile

texts:
I am trying to export a shapely polygon to a shapefile. I have tried this, but the CRS is missing, when I try to import it in to QGIS.
The shapely polygon is from this OSMNX example but edited to work with location.
My (list of two) polygons:
In [68]:

isochrone_polys

Out[68]:
[<shapely.geometry.polygon.Polygon at 0x1d884a52cc0>,
 <shapely.geometry.polygon.Polygon at 0x1d883974f60>]

I tried this using Fiona:
from pyproj import Proj, transform
import fiona
from fiona.crs import from_epsg
Proj(isochrone_polys[0].crs)

But have an attribute error:
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-100-f3e93644040a> in <module>
      2 import fiona
      3 from fiona.crs import from_epsg
----> 4 Proj(isochrone_polys[0].crs)

AttributeError: 'Polygon' object has no attribute 'crs'

The edges in and nodes in the street network in the tutorial seem to be in 4326, but when I put this in as the CRS in QGIS, it was incorrect.
edges is a geopandas dataframe, while the isochrone_polys[1] is in shapely.
type(edges)
Out[11]: geopandas.geodataframe.GeoDataFrame

type(isochrone_polys[1])
Out[12]: shapely.geometry.polygon.Polygon

print(edges.crs)
+proj=utm +zone=55 +ellps=WGS84 +datum=WGS84 +units=m +no_defs

print(isochrone_polys[1].crs)
Traceback (most recent call last):

  File "<ipython-input-16-e4c06ab91976>", line 1, in <module>
    print(isochrone_polys[1].crs)

AttributeError: 'Polygon' object has no attribute 'crs'

The polygon itself seems to be in a projected coordinate system (not sure which one):
isochrone_polys[0].bounds
Out[7]:
(316180.5323058479,
 -4182505.539783961,
 317463.60173865134,
 -4181214.9721103134)

How would I export this properly with the correct CRS?


texts: Forcing choice for default value during data entry

texts:
Let's assume you have to perform different field surveys for different projects. For example, you have to log all sightings of birds for different projects.
During data entry of the bird sightings I would like to link the recorded sighting to a single projectnumber. But I would only like to enter this number once and not for each bird sighting. Once I leave the data entry mode all sightings should have been  linked to the project choosen. When I perform another field survey I need to enter the project number again once I start recording new sightings. So this default value varies depending on the moment you perform a field survey.
I can define a variable and use a formula to set a default value based on the variable value. But if you forget to change the variable then all sightings are linked to the wrong project. So in this case I would like to be forced to set a default value prior to data entry. Something like a pop-up menu before data entry. Is there a way to achieve this in QGIS?


texts:
I'm adding a vector tile source to my Mapbox GL js map like this:

    this.map.on('load', () => {
        this.map.addSource('userSource', {
            type: 'vector',
            url: 'mapbox://<my user source>',
        });

        this.map.addLayer({
            id: 'userDataLayer',
            type: 'fill',
            source: 'userSource',
            'source-layer': 'foobar_areas',
            paint: {
                'fill-outline-color': 'rgba(50,50,150,.4)',
                'fill-color': 'rgba(10,190,20,.2)',
            },
        });
    });

I want to initialize some other modules once userDataLayer is ready to go, but I don't know what event to listen for. I tried this:

this.map.on('data', (e) => {
    const { dataType, sourceId, isSourceLoaded } = e;
        if (dataType === 'source' && sourceId === 'userSource' && isSourceLoaded) {
        // ...

Except that fires many times... and then fires again when you apply filters, etc.

Is there an event that fires just when the source is loaded?


texts: ArcGIS Pro Field Calculator Python IF statement

texts:
I'm attempting to populate a newly created field with values dependent on an existing field.

The new field has text data type. The existing field is double data type. This is the python code I've been trying. It runs, but the values remain

def Reclass(Crime):
    if (Hierarchy == 1):
        return "Murder-Manslaughter"
    elif (Hierarchy == 2):
        return "Forcible Rape"
    elif (Hierarchy == 3):
        return "Robbery"
    elif (Hierarchy == 4):
        return "Aggravated Assault"


texts: Layers left off when running python via Windows Task Scheduler

texts:
My python script generates a number of PDFs from different mxds. If I run the script from Pythonwin everything works great. When I run the script via windows task scheduler it leaves off layers that are turned on and available in the mxd such as street labels. The layers left off the PDF are random, sometimes it even leaves out all but one layer. Has anyone had this issue? Any ideas?

The script I'm running is in my C:\python folder and I have set it to "run when user is logged on or not" with the password saved.


texts: Getting the workspace from IGxDialog:DoModalSave

texts:
I'm writing an application that allows a user to save data into a table in a variety of formats: dBase, File or Personal Geodatabase, or SDE. I'm trying to see if there's a way to determine what type of workspace was chosen in the IGxDialog that is language independent. In a previous version, I was using the IGxDialog.ObjectFilter.Name property, but this varies with localization. On an English language machine, it will return 'dBASE tables', but on a German language machine, it returns 'dBASE-Tabelle'.

I've tried working with the objectfilter, but the following code will give me both messages.

        If TypeOf pObjectFilter Is ESRI.ArcGIS.Catalog.GxFilterdBASEFiles Then MsgBox("Dbase")
        If TypeOf pObjectFilter Is ESRI.ArcGIS.Catalog.GxFilterPGDBTables Then MsgBox("geodatabase")

How can I get a workspace from that dialog and determine what it is using IWorkspace:WorkspaceFactory:ClassID?


texts: Graphing attributes if they fulfill a condition

texts:
I have a dataset with schools, school coordenates, if the school is private or public and a variable containing the decile of attainment of the school in a test.

I am trying to map schools in a city and colour them by their performance level (I have a variable that looks at decile), but I would like to have different colours for the scales of public schools and private schools.

I tried doing this using the same variable for both types of schools and then using an if (I could not achieve graphing using conditionals in QGIS)

I created a separate variable in my dataset for each type of school and the decile in which they perform. I just multiplied the indicator variable for public and for private by their decile level, so I have a variable with the deciles for private schools in which all public schools have 0. This did not work because when I tried to graph private schools, all the public schools appeared in the graph, but as zeroes.

I tried constructing the dataset with missing values instead of zeroes. And when I try to import it QGIS (2.10) imports it as something that looks like an attribute table (even if I specified the coordinates).


texts: How do you move the earth to the left side of the screen in Google Earth Pro?

texts:
I've looked at the mouse and keyboard shortcuts to navigate in Google Earth Pro. Perhaps I'm missing something really simple. I'm creating an animation and want the entire earth to be on the left third side of the screen instead of the middle.

I saw a video that had the earth on the left side. So this must be possible.


texts: QGIS 3 Madeira Move Point Features Button

texts: In QGIS 3 "Madeira" and "Bonn" I miss the button that allows you to move point features. Any ideas?


texts: Layer selection changed connect signal none type issue

texts:
How propery use the layer selection changed method?
I am using following method. It shows error

  "NoneType" object is not callable

def test():
    print "selection changed"

layer.selectionChanged.connect(test)


texts: Python FeatureClass To Geodatabase conversion Issue

texts:
When I run this part of my code, I get an error that says the parameters of the MakeFeatureLayer are not valid.  However, when I run the first half of this script (the first try/except) and then run only the second part of the script, the code works, but errors if I run it all together. I'm guessing it is a workspace issue, but I can't figure it out.

import arcpy
import math

arcpy.env.overwriteOutput = True

pth = "C:/Users/Dane/Desktop/Everything/PSU/GEOG_596A/"
outname = "Family_" + arcpy.GetParameterAsText(0) + ".gdb"

arcpy.GetParameterAsText(0) + ".gdb"

arcpy.CreateFileGDB_management(pth, outname, "CURRENT")

wkspce = "C:/Users/Dane/Desktop/Everything/PSU/GEOG_596A/master_data"

arcpy.env.workspace = wkspce

try:

    fcs = arcpy.ListFeatureClasses()
    for fc in fcs:
        arcpy.FeatureClassToGeodatabase_conversion(fc, pth + outname)
except:
    print arcpy.GetMessages()

pth1 = "C:/Users/Dane/Desktop/Everything/PSU/GEOG_596A/"
outname1 = "Family_" + arcpy.GetParameterAsText(0) + ".gdb"
param1 = arcpy.GetParameterAsText(0)
famloc = "family_location_"
family = "Featured_Family_Location_updated"

arcpy.env.workspace = pth1 + outname1

try:
    defquery = '"Family_ID" = ' + "'" + param1 + "'"
    featurein = pth1 + outname1 + "/" + family
    layer = "family_lyr"
    copyname = pth1 + outname1 + "/" + famloc + param1

    arcpy.MakeFeatureLayer_management(featurein,layer,defquery)
    arcpy.CopyFeatures_management(layer, copyname)

except:
    print arcpy.GetMessages()
##

This is the error :

ERROR 000732: Workspace or Feature Dataset: Dataset C:/Users/Dane/Desktop/Everything/PSU/GEOG_596A/Family_C:/Users/Dane/Desktop/Everything/PSU/GEOG_596A/master_data\tracts.shp.gdb does not exist or is not supported Failed to execute (MakeFeatureLayer).


texts: How to request WFS propertyName containing parentheses

texts:
I'm trying to call getFeature with a list of property names, not including the geometry column. I'm getting this frustrating error message for a property that includes a parenthesis:

Requested property: abstudy_(living_allowance) is not available for dss_payments_sa2_q4_2017.  The possible propertyName values are: [sa2_code, sa2_name, abstudy_(living_allowance), ....

The URL in question looks like this

.../wfs?service=WFS&version=1.1.0&outputFormat=JSON&request=GetFeature&typeName=dss_payments_sa2_q4_2017&maxFeatures=5&propertyName=abstudy_%28living_allowance%29

WFS 1.1.0 from GeoServer.


texts:
I am trying to convert a CSV with fields in one projection system (EPSG:27700) to fields in another (EPSG:4326).

I have made a VRT file called landfill.vrt, in the same directory as my CSV file, landfill.csv:

<OGRVRTDataSource>
  <OGRVRTLayer name="landfill">
    <SrcDataSource>/Users/me/Downloads/landfill.csv</SrcDataSource>
    <GeometryType>wkbPoint</GeometryType>
    <LayerSRS>EPSG:27700</LayerSRS>
    <GeometryField encoding="PointFromColumns" x="ctroid_x" y="ctroid_y"/>
  </OGRVRTLayer>
</OGRVRTDataSource>

ogrinfo seems to think it's OK:

$ ogrinfo -ro -al landfill.vrt
...
OGRFeature(landfill):2010
  ctroid_x (String) = 567600
  ctroid_y (String) = 314500
  region (String) = Anglian
  area (String) = Central
  date_issue (String) = 21/10/10
  POINT (567600 314500)

But when I run ogr2ogr:

 $ ogr2ogr -s_srs EPSG:27700 -t_srs EPSG:4326
  -f CSV -lco "GEOMETRY=AS_WKT" ./output/output.csv landfill.csv

it runs cleanly, but just outputs a copy of the original file to output/output.csv, without any new fields. What am I doing wrong?


texts: Is it possible to show preview extent box for PrintTask in ArcGIS 3.16 JavaScript API?

texts: I have set up a map application using ArcGIS JavaScript API v3.16 and included functionality for exporting a map to PDF using the PrintTask.  Is there a way that I can use a button/checkbox to turn on an extent box to show on the map application of what portion of the map will show up on the export map output?  I have the PrintTask set up to preserve map scale - so extent is not preserved.  Usually the output of the PrintTask is less of an extent than that of the map application so I would like to let users be able to know what will be printed.


texts: How to specify a map units line wider than 100000 units

texts:
Sorry if this is a very beginner question, but I can't seem to find an answer online by searching.

Is there a way to increase the size of the "map units"?

I'm trying to draw lines attached to my map so that when I scale it, the lines change size relative to the underlying map. In the styles dialogue I'm selecting map units, but the line doesn't even show up until I set it to 10000—and even then it's too thin for what I need.

Is there a way to change the scale of these "units" so that I can make them be more useful for the map I'm trying to make? I've tried changing Project Properties > General > Canvas Units to nautical miles, but that didn't make any difference. I've also tried changing my CRS (to no effect), but I'd like to stay with EPSG:3857 if possible.

Edit:

It appears that if I use EPSG:4326 the the line works exactly as expected, but because I have several more complicated elements such as georeferenced rasters and 47 other layers, I need the to use the Google Coordinate system (also so OpenLayers works. Is there no way to draw lines on an OpenLayers map?

Here's a few screenshots of my settings:

Changing the CRS here in the style settings just makes the line disappear completely:


texts: Converting between KML and shapefile (SHP) format

texts:
My users are sending me point data that were digitized using Google Earth.
How can I convert their KML to a shapefile and vice versa?


texts:
I'm looking for any libraries to work with GeoSMS standard on Android.
In the standard says that geosms is just:

geo:lat,lon[,alt][;u=accuracy],

So maybe everyone work with it without any libs?


texts:
Does anyone know if it's possible to run ArcGIS Engine 10.2 in Java 7 ?

Currently in Java 6, I need to use both ArcGIS Engine 10.2 and Java 7 functions in the same standalone program. (I don't talk about AddIn or Geoprocessing Tools).


texts: Duplicating polygons in Layer using ArcPy cursors gives AttributeError: 'tuple' object has no attribute 'getValue'?

texts:
I am trying to Duplicate some polygons in the same layer with the same attributes, But it will duplicated them with Null Geometry, i have tried getValue() method, but i got error

import arcpy

polygons_shape="C:\\temp\\FinalLayers.gdb\\FinalLayers\\Polygons"
fields=['ID','Comment','owner']
Insert = arcpy.InsertCursor(polygons_shape)
ID= arcpy.da.SearchCursor(polygons_shape,'*')
for row in ID:
        if row[0]>1:
         dupCount=row[0]
         myShape = row.getValue(shapeName)
         insert_row.setValue('ID', row[0])
         insert_row.setValue('Comment', row[1])
         insert_row.setValue('owner', row[2])

         while dupCount>1:
                    Insert.insertRow(insert_row)
                    dupCount-=1

The Error:

  myShape = row.getValue(shapeName)

  AttributeError: 'tuple' object has no attribute 'getValue'


texts: Python script has execution error first time through on a JoinField, but not the second time

texts:
I have some Python code that takes a shapefile, creates its centroids via FeatureToPoint, joins an auxillary field from the shapefile to the centroid via JoinField, and then goes on to do some more work with the centroids.

The relevant code is:

centroids = arcpy.FeatureToPoint_management(shapefile, "centroids", "CENTROID")
arcpy.JoinField_management(centroids, "ORIG_FID", shapefile, "FID", "EXTRA_FIELD")

When I execute this script the first time, I get an error for the JoinField line:

arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Table: Dataset centroids does not exist or is not supported
Failed to execute (JoinField).

However, checking for the generated centroids shows that it has been created and exists on disk.

When I then execute the script a second time around there is no error and the script proceeds as normal.

While I'm glad to continue executing it twice as far as getting results I need, I'd really like to debug this and figure out why it fails the first time through.

Update

I believe I am running into problems because of how I try to assign the results of FeatureToPoint to the variable centroids and then use centroids in the rest of the code. I added some sanity checks to the above snippet like so:

print(shapefile)
centroids = arcpy.FeatureToPoint_management(shapefile, "centroids", "CENTROID")
print(centroids)
arcpy.JoinField_management(centroids, "ORIG_FID", shapefile, "FID", "EXTRA_FIELD")

The first time through it reads (before failing on the JoinField of course):

D:/temp/boundary.shp
centroids

The second time through it reads (and continues on with rest of the script):

D:/temp/boundary.shp
D:/temp/centroids.shp


texts: Looping Through Multiple Shapefiles - GDAL/OGR - Possible Performance Issues

texts:
I am trying to filter data from shapefile1 based on specific attributes in shapefile2. Specifically, I would like to determine if numbered ranges within shapefile1 have been reversed in shapefile2, given that both records share the same parcel identifier.

My initial solution is to iterate over the two tables like so...

def get_reversed(shp_1, shp_2):
    shapefile1 = shp_1
    shapefile2 = shp_2
    driver = ogr.GetDriverByName("ESRI Shapefile")
    dataSource1 = driver.Open(Shapefile1, 0)
    dataSource2 = driver.Open(Shapefile2, 0)
    layer1 = dataSource1.GetLayer()
    layer2 = dataSource2.GetLayer()

    for feature2 in layer2:
        range2 = '-'.join(feature2.GetField("RANGE").split('-')[::-1])
        pid2 = feature.GetField("PARCEL_ID")
        layer1.SetAttributeFilter("RANGE = '{}' AND PARCEL_ID = '{}'".format(range2, pid2))

        for feature1 in layer1:
            print('2000 range: {}: Parcel ID: {}'.format(feature1.GetField("RANGE"), feature1.GetField("PARCEL_ID")))
            print('2010 range: {}: Parcel ID: {}'.format(feature2.GetField("RANGE"), feature2.GetField("PARCEL_ID")))
            print('----------------------------')

I have no reason to believe that this technique doesn't work, but the program just seems to run forever. In this case, the parcel tables have over 40,000 columns each, and my 0(n^2) algorithm appears too slow to handle the size.

Am I right to think that this code is "too slow" for the data size, or am I completely off path? Can someone show me a better solution to this problem?


texts: How to reduce the dbf size in shapefile in QGIS?

texts:
Edit of post: I decided to edit the post to answer the comments below / and to change the example of shapefile that I used originally.
I am working with QGIS and I have a shapefile with points (that represent coordinates on the map). The shp size is not that big but the dbf size is bigger! The dbf contains all the labels of the coordinates.
For example these are the sizes of shapefile. :

There is one field which has labels of the coordinates. And there are 958876 points/attributes in total.

The dbf is 233 MB & the shp is 33 MB.
Is there any way to reduce the dbf size without ruining the data?
Do I need to change the labels from string to integer? Maybe the issue is the something to do with formatting?


texts: Accurate way to show values of each classification range in the legend in QGIS?

texts:
What is the best and most scientific way to represent data in the legend?

For example, in the picture below (my data), picture 1 is the actual data (too long in my idea), picture 2 is a rounded figure made by allocating precision 0 in QGIS to graduated style's classification (in my opinion, it shows the maximum and minimum of my data because I'm not going to report it directly into my report), and finally, picture 3, which is a precision -1 in QGIS that looks clean!!

So, my question is that which of these three legends demonstrates the most accurate way of displaying figures on the map?


texts: How to exclude missing values from raster layer?

texts:
In my raster layers the value -999 means "missing". Those points completely mess up any colormap in qgis because qgis treats them as normal values and includes them in the classification.

I would like to ask

1) is there any raster format that allows for missing values ? (I mostly use geotiff)

2) how can I replace -999 with for example 0 in every raster-cell? QGIS  raster-calculator does not seem to do this. I did not find anything like an inline if-function like if(val=-999,0,val)


texts: Why are tool outputs disappearing from the mxd at the end of a python script tool?

texts:
The script below works fine and produces the correct output, but after my output is being added to ArcMap, which is what I want it to do, it then disappears as the script is finishing up. I'd like for my data to stay visible on the map once the script is finished and not disappear.

Here is what's happening:

Buffer output "TestFC_buf" gets added to the map.
"Script Finished." and "Completed script TestAddToMap..." prints to the script dialog window.
"TestFC_buf" disappears from the map.
"Succeeded at Thu Aug 06..." prints to the script dialog window.

Here is the script dialog:

And here is the code:

import arcpy, os

arcpy.env.overwriteOutput = True
arcpy.env.addOutputsToMap = True

arcpy.env.workspace = r"C:\Users\kgrady\Desktop\Temp\AddOutputToMap_Test\Test.gdb"
workspace = arcpy.env.workspace

fc = "TestFC"
output = os.path.join(workspace, "TestFC_buf")
arcpy.Buffer_analysis(fc, output, "1 Mile")

arcpy.AddMessage("Script Finished.")

Any ideas as to why the output is disappearing from the map?


texts: Custom Model should be used with ArcMap or ArcCatalog?

texts:
I have one basic question , when you create custom model using model builder in ArcGIS. It should be used with ArcMap or ArcCatalog? Reason I am asking this question is I have created a model and I am setting it "Store relative path names" and I have defined a directory structure for the same. Now the problem is in ArcMap when you right click on "ToolBox" it will allow you to add toolbox and  you can select your tool from the specific location whereas in ArcCatalog it creates Tool (.tbx) at C:\Users\\AppData\Roaming\ESRI\Desktop10.0\ArcToolbox\My Toolboxes folder. Where I am not able to access the relative scripts because I will not have any absolute path and it should not be absolute.

Also can someone share the difference between ArcMap and ArcCatalog?

Any idea or suggestions on this?


texts: QGIS raster no data value changed to -inf when viewing at smaller scale

texts:
I have a raster with some no-data cells.

I want to visualise raster values using a colour map and set the no data values to transparent.  I am attempting to do this using the transparency tab in the layer properties dialogue.

This all went well when I am viewing a small section of the raster:

However, when I zoom out the no data pixels become visible and the identify tool says the value is now -inf.

There seems to be a trigger point at which this happens, for all larger scales the no data values are left transparent and for all smaller scales I get this strange -inf thing.

Why does this happen and how can I stop it?

This is only the 3rd time I have used QGIS so apologies if this is a well known thing that is easily solvable - I couldn't seem to find a similar question.

Due to workplace limitations I am forced to use QGIS 2.2.0-Valmiera.

The raster is a .tif


texts: Store Lon,Lat in generated column - PostgreSQL 12

texts:
I would like to store lon, lat as varchar in an PostgreSQL generated column that uses the_geom as data source.
alter table poi add column
lonlat varchar generated always as (
st_x(the_geom)|| ', '|| st_y(the_geom)
)
stored;

The problem is, that I get the following error:

ERROR: generation expression is not immutable

Is there another way to archieve this?


texts: Error when creating a new mapset with GRASS in QGIS

texts:
When I try to create a New Mapset with the GRASS plugin in QGIS I get an error or the program crashes.

QGIS 2.6.1 (32-bit install, Win7). QGIS crashes completely when clicking "Finish" in the New Mapset window .
QGIS 2.8.1 (64-bit install, Win8.1). I get an error message "Cannot activate grass", when I click "Finish" in the New Mapset window .

I have tried on two different computers running Windows 7 and Windows 8.1.
I have checked that the GRASS plug-in is activated in "Manage and install plugins...".


texts: ArcGIS: Selecting features from a grid layer which are on the edge of another feature by location

texts:
I have two layers which come from the same data source. The first one is a vector grid layer which contains 1km x 1km features and looks like this:

The second one is the grid layer dissolved into Sub-Bains, which i.e. looks like this:

I need to select all the features from layer one which touch the borderline of each Sub-Basin of layer two from within the Sub-Basin. For example of this Sub-Basin:

This has to be done for multiple (1000) Sub-Basins, so selecting them manually would be too time consuming.
To include some context: I need to identify the feature with the biggest water outflow into another Sub-Basin and for that I need to export all the features which are on the inner edge of the basin.
Is there a tool or a way this can be done?


texts: Which type in entities for PostGIS/Hibernate Spatial

texts:
I already manage to store, read and update PostGIS rows with Hibernate Spatial with a Point and a MLineString in a very simple case : a MLineString defining a road, display a point along this road function on the time (the M dimension).

However, I'm still confused about which type to use.

There is the model packages from PostgreSQL driver, PostGIS plugin (PGxx), Hibernate, HibernateSpatial, JTS ... What type set from which library should I use in my entities.


texts: Animating polygon style over time in QGIS?

texts:
I have a shapefile, consisting of polygons. I can join a layer to a database file, and use an attribute (database value) to "style" (color in) the polygons to give me a visual representation of the data.

But the data is different for every day, so I can look at the representation for various days but I'd like to animate the progression.

I'm using QGIS and Microsoft Access.


texts: Unsupervised classification in ERDAS imagine

texts: I am trying to make a classification to run some index ( like NDVI) to see the change over time using the image difference function. Is it possible to do an unsupervised classification on one image and apply this classification scheme for the rest of the images in the time series? If there is a way, how?


texts: Rasterizing multiple ogr vectors from different files using the GDAL python module?

texts:
I'm trying to create a single raster from several shapefiles. I think what I need to do is to merge many layers into a single 'MEM' object. Then re-project this object to a different coordinate system. The create a raster GeoTIFF with set coordinates and resolutions that will be populated from the 'MEM' object built from my shapefiles.
The problem is that the merging of OGR layers isn't documented very well for the Python module. Do I get the features or layers themselves?
Also this re-projection documentation assumes I want to physically write new shapefiles to disk. I don't see how I would use that for a single merged vector layer.
In my script I have come so far that I populate a list of layers. I have no clue how to merge them together and how to rasterize them. I may have to create an ogr geometry object and rasterize that but I don't know what the "proper" workflow for this is.
UPDATE:
I have made some progress. I have successfully converted shapefiles to new coordinates and outputted them. But when I attempt to rasterize I get this error:
TypeError: in method 'RasterizeLayer', argument 1 of type 'GDALDatasetShadow *'
EDIT: I have updated the save location to be a dataset but the same error persists.
Updated script below:
#Get all files in folder
inputFolderPath = "C:\\input\\"
outputFolderPath = "C:\\output\\"

src_files = glob.glob(inputFolderPath+"\\*.shp")

#Traverse files to export and rasterize
for file in src_files:
    #Convert srs
    unconvertedSHP = gdal.OpenEx(file) # path to input .shp file
    convertedSHP = outputFolderPath+os.path.basename(file)  # path to output .shp file

    ds = gdal.VectorTranslate(convertedSHP, unconvertedSHP, format='ESRI Shapefile', dstSRS='EPSG:3879')

    unconvertedSHP = None
    ds = None

    #Open converted shp files to rasterize
    shape_datasource = ogr.Open(convertedSHP)
    shape_layer = shape_datasource.GetLayer()

    writeTIF = outputFolderPath+ os.path.splitext(os.path.basename(file))[0]+'.tif' #filename with new tif extension

    tiff_ds = gdal.GetDriverByName('GTiff')
    tiff_ds.Create(writeTIF,1024,1024,1,gdal.GDT_UInt16,options = ['PROFILE=GeoTIFF'])

    #Rasterize
    ds = gdal.RasterizeLayer(tiff_ds,[1],shape_layer,burn_values=[200], options = ["ALL_TOUCHED=TRUE"]) #The error occurs here

    shape_datasource = None
    ds = None
    unconvertedSHP = None
    convertedSHP = None


texts:
I have a county level shapefile for South Carolina. I generated random points using Vector->Research Tools-> Random Points. The attribute tables for the random points layer has only the ID included.

I would like to export the latitude, longitude and corresponding county for all the generated points (there is a COUNTYFP10 variable in the attributes table of the original state layer).

I managed to export the latitude and longitude using "Save as", choosing "Comma Separated Value".  Then, in the "Layers" part of the "OGR creation options" I typed "GEOMETRY=AS_XY".

I am not sure how to add the corresponding county to the saved CSV file.


texts: What's the most promising application (use) of OpenStreetMap data?

texts:
In some areas OSM data is very complete and has a level of detail not seen in closed data sources. Another distinguishing factor is that it contains the knowledge of the people who live in that areas. For example, commonly, colleges are mapped with many details, because students spend special care mapping the place they study.

Taking into account these characteristics and others and the OSM licence, What's the most promising application of OpenStreetMap data?

-Car GPS may have OSM data?
-Government could make use of OSM data?
-Companies could make use of OSM data?
-Education?
-Other possibilities?
-How?