texts: POSTGIS Raster - Merge polygon onto raster

texts:
I have two tables, SCHEDULE contains polygon geometries and RASTER contains raster tiles

I want to take a polygon from the SCHEDULE table and overlay it on top of a set of RASTER tiles that intersect its bounding box.

I have got this far:-

WITH schedule AS (
        -- SELECT A SCHEDULE GEOMETRY AND CREATE A buffer around it
        SELECT ST_SetSrid(ST_Boundary(ST_Expand(wkb_geometry, 500)),27700) as buffer, wkb_geometry as wkb_geometry, streetward from schedule where schedule_id = 1532952
    ),
    --MERGE THE SCHEDULE GEOMETRY WITH THE BUFFER
    expanded_schedule AS (

        SELECT ST_Union(wkb_geometry, buffer) as wkb_geometry FROM schedule
    ),
    raster_map as (
        --UNION ALL OF THE RASTERS IN RASTER TO COVER BUFFER
        SELECT ST_Union(rast) as rast from RASTER,schedule where ST_Boundary(wkb_geometry)::BOX2d  && rast

    ),
    raster_geom AS (
        --MAKE A RASTER FROM THE GEOMETRY
         SELECT ST_SetBandNoDAtaVAlue(

                ST_ColorMap(
                    ST_AsRaster(wkb_geometry, --SCHEDULE GEOMETRY
                            rast,            --reference raster
                            ARRAY['8BUI','8BUI','8BUI'],         --pixeltype
                            ARRAY[118,118,118],          --data value
                            ARRAY[100,100,100]           --no data value
                            ),
                    1, '118 1 1 1 1
                        100 254 254 254 254')
            ,100)
         --SELECT ST_AsRaster(ST_Buffer(wkb_geometry, 50), rast,ARRAY['8BUI'], ARRAY[118])
         as rast FROM  expanded_schedule,raster_map

    ) ,
    raster_union AS (
        SELECT rast FROM raster_geom
        UNION
        SELECT rast FROM raster_map
    )
    SELECT ST_AsPng(ST_Union(rast)) FROM raster_union

My problem is that this creates an image that looks like the following:-

The SCHEDULE geometry area has worked fine, but the bounding box area has masked out the map tiles below. I do not really understand why? I suspect that the buffer geometry is "filled in" as far as postgis is concerned. What am I doing wrong, or should I follow another strategy.


texts: Using Variable Distance Buffer in ArcGIS Desktop?

texts:
I am new to ArcGIS.

I have a point shape (Location of a wind power plant) and I want to create a buffer dependend on the diameter of the rotor.

Can someone give me a hint how to do that?


texts: I just updated QGIS to version 3.2. And noticed that the XYZ Tiles is missing. Are they removing it from QGIS 3, because I couldn't find any information about it? Does anyone know where I can find it or do I have to go back to QGIS 2 to get XYZ Tiles? Here is the screenshot for the current map source screen in QGIS 3.2.


texts: Will Flex Viewer work after Arc upgrade?

texts: My organization is in the process of upgrading our ArcGIS server to 10.4.1 along with Arc Desktop, Catalog, etc.  We use ArcGIS viewer for Flex for all internal applications.  I read the list of deprecated features for Arc 10.3 and 10.4 and saw that the Flex Viewer was one of them.  I understand that Flex hasn't received support or an update since 2014/15.  My question is, if we upgrade our software to 10.4.1, will the Flex viewer simply not work anymore?  These applications are crucial to daily tasks and I do not want them to stop working once we upgrade to 10.4.1.  I am in the process of putting our GIS applications in the Javascript API but with all of the different applications we use, it will take a long time.


texts: Leaflet: performant handling of POIs all over the world

texts:
When you have a leaflet.js application, such as my experimental toy for xkcd GeoHashing (look at geohashing.cgi plus mirkarte.js), you have to draw points all over the world. In the GeoHashing case, their coordinates can easily be calculated (the links and information I put into the popups isn’t, though); for e.g. a map of geocaches, each individual marker needs to be processed somehow.

What is the usual approach to do this on a world-wide scale?

I thought to register an event handler on moveend… and zoomend… and who knows which else, that take into account the left-, right-, top- and bottom-most parts that have already been prepared (initially all empty), and, if the map extends beyond that, add markers for the new areas to the layer then cache the new boundaries, and limit marker display to beyond a certain zoomlevel. The problem with this is, possibly, response time, and that a rectangular approach will mean generating extra data (say I start at N 0° E 0°, then move northwards to N 50° E 0°, then eastwards towards N 50° E 1°, then I will have to calculate everything down to N 0° E 1° as well. Merely annoying in the GeoHashing case, but possibly network intensive if I have to request additional data (popups for geohashing, marker positions too for geocaching, etc).

Storing a list of map bounds that have already been used gets slow very fast if the user pans the map around a lot, e.g. manually/visually following a route. So, if I were to do this, some kind of merging would be needed, which I cannot yet imagine.

I have not studied other maps, because they are not usually Open Source or well-written/well-commented… I’ve seen a bit of use of Google Maps API v1 and v2, and Leaflet, e.g. in the Opencaching Network, but that’s not well-structured or -commented source code. I don’t have any real grounding in GIS (slowly pushing myself in from the side, as techie and cacher, but getting interested), so I lack a good example how this could best be done (just as other things I may post questions on if I get over my shyness to do so). I do intend my map (linked above) to eventually be such well-readable source code (not the current draft though, I also learned practical JavaScript while writing it, and realise it’s a throw-away prototype, albeit a working one).

So, what are the “standard” ways (there’s probably more than one, depending on the scenario even) to handle this without massive network, CPU and RAM cost due to choice of stupid algorithms?


texts:
because v.segment measures all offsets in map units, i have to change it. (I want to put all of 50 meters a point)

So I checked g.proj -p:
-PROJ_UNITS------------------------------------------------

unit       : degree
units      : degrees
meters     : 1.0

Now I dont know how to change and how that affects my previous work. Can I open the PROJ_UNITS in my Databasefolder and change it manual (e.g. unit: meterunits: metersmeters: 1.0)?


texts: Rectangular bounding box curved in D3.js

texts:
I am trying to project polygons to a map with a static background image using D3.js. The polygons looked slightly off in relation to the background so I drew the bounding box of the image, and sure enough, it's not matching.

I've uploaded the code as a gist and the result is live here. As you can see, the bounding box does not have the same proportions as the background, and also it's curved even though the geojson file clearly contains a rectangle.

In order to get the background image and the bounding box I took the following steps:

Downloaded raster data from Natural Earth.
Cropped the raster image in QGIS using Raster->Extraction->Clipper.
Saved the bounding box of the cropped image with gdaltindex bounds.shp cropped.tif, and converted the shapefile to GeoJSON in QGIS.
Used the technique described in this SO post to scale the projection to the bounding box.


texts: Raster layer not clipping to polygon boundary and yielding block extent in ArcMap?

texts:
I am using ArcMap.

I want to graphically display my NDVI distribution, but I had to convert my NDVI raster layer from continuous values to integer in order to view the attribute table (I used the Int() in raster calculator). The output was correct, except that is included extraneous 0 values in a block around my original boundaries (the multi-colour forest area).

I was able to successfully clip this out with one layer (clipped to polygon boundaries of the forest area, and yes I had the "input features" box selected), but now the clipping isn't working anymore and still yielding this large block extent (see screenshot below) despite nothing in my procedure having changed from the initial successful clip.

I tried again and switched it up by using different features in the clip tool and alternatively using extract by mask, but still no success.

Where did I go wrong?


texts: Why does DotSpatial return NaN for point reprojection?

texts:
From the master branch and examples @ https://github.com/DotSpatial/DotSpatial the following fills the xy array with NaN but we expect 1755668,5922511

Dim x As Double() = {2666109}
Dim y As Double() = {6484213}
Dim z(x.Length - 1) As Double

Dim xy(2 * x.Length - 1) As Double
Dim ixy As Integer = 0
For i As Integer = 0 To x.Length - 1
    xy(ixy) = x(i)
    xy(ixy + 1) = y(i)
    z(i) = 0
    ixy += 2
Next

Dim srcsys As ProjectionInfo = ProjectionInfo.FromEpsgCode(27200)
Dim destsys As ProjectionInfo = ProjectionInfo.FromEpsgCode(2193)

Reproject.ReprojectPoints(xy:=xy,
                          z:=z,
                          source:=srcsys,
                          dest:=destsys,
                          startIndex:=0,
                          numPoints:=x.Length)


texts: How can I show excel file with addresses inside in Google Earth?

texts:
I have excel file with 1 column of address , city and country.
I want to "import" it into Google Earth and get placemarks of the addresses (2800 POI).
How can I do it ?


texts: How to calculate perimeter of polygons in Quantum GIS?

texts: Is there a way to calculate perimeter of polygons with the field calculator of qgis, like there is for area calculation?


texts: Create a raster with fixed 10meter pixel scale in PostGIS

texts:
I have a series of points that I would like to convert to a raster, and then calculate the area of the raster as a proxy for "amount of area covered". I'm trying to do this using PostGIS rather than another language so that I can share my query easily with collaborators.

One annoyance is that my points are stored as json (not geojson).

id | points
---+--------
 0 | [{'lat': 33.18424, 'lon': -100.0428, 'property': 'Group A'}, {'lat': 33.18424, 'lon': -100.0428, 'property': 'Group A'}, ...
 1 | [{'lat': 33.18424, 'lon': -100.0423, 'property': 'Group A'}, {'lat': 33.18424, 'lon': -100.0458, 'property': 'Group A'}, ...
 2 | [{'lat': 33.18436, 'lon': -100.0422, 'property': 'Group B'}, {'lat': 33.18420, 'lon': -100.0428, 'property': 'Group B'}, ...

So I have to do a little bit of work to get my points in a workable format.

SELECT ST_SetSRID(ST_Point((latlon->'lon')::text::numeric, (latlon->'lat')::text::numeric), 4326)::geometry as geom
FROM (SELECT JSON_ARRAY_ELEMENTS(points::json) as latlon
    FROM my_table) as my_table

This works fine, but now I am having some trouble getting ST_AsRaster to work for me. I want the pixels to represent a 10mx10m area however there are so many variants of ST_AsRaster I am not sure how to specify this correctly. Here is my full query:

WITH my_geom AS (SELECT ST_SetSRID(ST_Point((latlon->'lon')::text::numeric, (latlon->'lat')::text::numeric), 4326)::geometry as geom
    FROM (SELECT JSON_ARRAY_ELEMENTS(points::json) as latlon
        FROM my_table) as my_table)
SELECT ST_AsRaster(geom, scalex=10.0, scaley=10.0) as my_raster
FROM my_geom

I think I may need to transform the point geometry SRID or otherwise somehow specify units (meters) for ST_AsRaster but I am not sure this is possible.


texts: How can I find number of Licences in ArcGIS Administrator from arcobjects or any files?


texts: gdal_translate outfile without nodata_values

texts:
I want to use gdal_translate to convert a ASCII grid file onto a xyz file. But the ASCII grid is about 5.7Go and the xyz outfile is really bigger (approximately 30Go). To reduce the memory I would like to didn't store no data values but when I use -a no_data -9999 there is still lines into the xyz files like X Y -9999. It's a real problem for me, because they are useless and took too much place on my files.
Also, I saw that my decimals values (Z) are quite big ! Something like 10 decimal's numbers (350.1498736541). Is that possible to ask it to troncate after 2 decimals (350.14 or better : 350.15) ?

For now, I use gdal_translate like that :

  gdal_translate -of xyz -a_nodata -9999 Mosaic.asc  Mosaic.xyz


texts: i ordered MOD13Q1 images (2008 -2012) from NASA and there came in hdf format, now i want to extract only NDVI images but the hdf made up of all vegetation indices data.Please how can i solve this?


texts: Versioned to unversioned: How to undo edits in an edit session on an unregistered table

texts:
I'm considering switching some of my tables in an Oracle enterprise geodatabase from versioned to unversioned.

The pros of having unversioned tables would be:

Simpler, traditional database design
Database-level foreign keys and primary keys
Triggers, without having to deal with versioned views
Unique indexes
Not having to constantly compress tables
Grant and revoke update, insert, and delete privileges individually

But of course, there are a few cons:

Users can't create and edit named versions. This isn't a huge problem for me, because my organization ultimately doesn't use versioning technology  properly anyway. We don't really do long-transaction editing, which is what versioning is intended for. Instead, we just do short transactions on the default version (without creating separate versions).
It's only possible to edit either registered or unregistered tables in an edit session. Not both. So users have to stop editing and switch between edit modes to edit one kind of data or the other.
It's not possible to undo or redo edits in an edit session on unregistered tables.

This last one is a potential deal breaker. It's really quite infuriating to not be able to undo an edit in an edit session. Sure, the user can stop editing, and not save the changes, but then they lose all the unsaved edits in that edit session.

Is there a way to undo/redo edits on unregistered tables in ArcGIS Desktop?


texts: Error while installing PostGIS on ubuntu 12.04

texts:
This is my first practice on Ubuntu machine. Here i am trying to install PostGIS 2.1 on postgresql server 9.3.2. When i am following the procedure mentioned here

Help

I am getting the following error messages on the terminal window.

You might want to run 'apt-get -f install' to correct these:

The following packages have unmet dependencies:
 pgagent : Depends: libkrb53 (>= 1.4.2) but it is not going to be installed
           Depends: libssl0.9.8 (>= 0.9.8a-1) but it is not going to be installed
 postgis : Depends: libgdal1 (>= 1.9.0) but it is not going to be installed
           Depends: libgeos-c1 (>= 3.3.3) but it is not going to be installed
           Depends: liblwgeom-2.1.1 (>= 2.0.0) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Expecting some hints from anybody to resolve the issue.


texts: Unable to save selected layer by attribute for ArcGIS Geoprocessing

texts:
I am troubles using the SelectLayerByAttribute() function for arcgis geoprocessing.

I have a layer and I want to select everything that matches on a particular attribute.  I call MakeFeatureLayer() to create a layer, I run SelectLayerByAttribute() to select what I want, and then I run CopyFeatures() to save that layer into the database.

However, after the copyfeatures() call, nothing is saved and I have empty layers.

Is there something I'm missing?

I'm using python and arcgisscripting module for geoprocessing.
My code below:

 gp.MakeFeatureLayer_management(target_layer, "lyr")
 gp.SelectLayerByAttribute_management("lyr", "NEW_SELECTION", "\"my_attribute\" = 5 " )

 # Write the selected features to a new featureclass
 gp.CopyFeatures_management("lyr", output)


texts: Why does this SQL syntax produce empty feature class with ArcGIS Select_analysis?

texts:
I'm working on a script that involves an arcpy.select_analysis function. The problem I have is that when I run the script it produces an empty file. I've verified that the whole thing works when in the Select GUI, and produces the correct output, and then have even exported the SQL expression and copy/pasted it into the arcgis python window, but no dice.

]

I've zoomed the extent both way out and way in to see if that makes a difference, but it doesn't. Any advice would be much appreciated!


texts: Adding a tooltip overlay /eventListener to OL map when / for scrolling

texts:
I would like to fully implement Google Map API-s solution in Openlayers. I activated the ctrl+scroll zoom, but the poor user cannot know how to zoom now, and the nicest solution would be this:
https://developers.google.com/maps/documentation/javascript/interaction
I tought i could add an Overlay to the Map when scrolling and ctrl button is not pressed.
But Ol doesn't have this kind of event listener.
Any idea?
document.getElementById("map").addEventListener("scroll",function(){console.log("scroll")})
this.map.addEventListener("scroll",function(){console.log("scroll")})


texts: Use data driven pages to display certain data in each page

texts:
In ArcMap, is it possible to use data driven pages to display certain data based on an attribute. I want the extent to remain unchanged across pages, and just have certain data be symbolized differently so it stands out.

I would like to have my first page highlight points where DEPTH is 0-5, 2nd page 5-10, etc...

I know how to use data driven pages to move the extent based on a layer, but this is different.


texts: Consolidate stream segments into stream network using ArcGIS Desktop?

texts:
I have a large stream layer that is split into a series of segments. The segments do not have any stream ID or similar that I can dissolve by to consolidate back to streams. Can anyone point me in the right direction for a tool or method I could use to achieve this? I am using ArcGIS 10.0.

The screenshot below illustrates the stream layer and how it is split into segments. I have found other solutions elsewhere on the site like here:How to Unsplit/Dissolve multiple touching lines in Stream Network?

but it doesn't seem to work in this instance...

If I use the dissolve function, it dissolves all of the segments back to 3 FIDs. Similarly, unsplit tool does not work on this layer - segments remain separate.


texts:
Has someone written Google Closure Externs file for OpenLayers that I can use freely ?

Externs file similar to those for jQuery, GoogleMaps, Underscore  ?

Have to ask this before I create my own if none is available.


texts: Why can´t Geowebcache communicate with geoserver?

texts: I have installed geoserver 2.5 with integrated GWC on a windows server 2008 R2 in tomcat6. I am not able to create map caches with GWC. GWC gives me "404: cannot communicate with server. I have a reverse proxy set up and a url rewrite in IIS to provide internet access. What do I have to do to establish communication again between Geoserver and GWC?


texts: Lookup Projection Name from EPSG with ArcPy

texts:
Using ArcPy, how can I return the name of the projection based on an EPSG code, not a shapefile?
There are many questions/answers out there for doing something similar from a specific shapefile using .Describe(shp), but I haven't been able to get describe to work with an EPSG code.
For example, this:
info = arcpy.SpatialReference(4326).exportToString()
print info

Returns this: GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984', ...
But I just want it to return 'GCS_WGS_1984'
Using arcpy.SpatialReference(4326), returns a class, but I don't know how to unpack/access the info. print(info.__dict__) returns {'_arc_object': <geoprocessing spatial reference object object at 0x02F2B1D0>}. Since it's an object, I tried print arcpy.Describe(info) but that returned an I/O error.
I have read through the SpatialReference Class Documentation but it is still not clear to me how to extract this info (which I think is "projectionName") from an EPSG code rather than a shapefile.


texts: ArcGIS automatically converting Z units when no Vertical CRS is defined

texts:
I have seen this on several tools, but it was most obvious to me when using calculate geometry in the attribute table.
I have a point dataset that has Z values, but no VCS defined.  I then used calculate geometry to add those values to the attribute table.  In one sample point the calculate geometry in the attribute table was -4.279431.  When I pull the z value directly from the SHAPE geometry, I get -14.04009.  So it is obvious it is applying a feet to meters conversion.  I know Esri has been integrating VCS into the software for a few versions and I realize if I define my VCS I shouldn't have this problem (confirmed, I don't).
My question is, why the feet to meters conversion?  Can this be defined or turned off somewhere?
ArcGIS 10.7.1


texts:
I have two hillshading geotifs that I created using gdaldem hillshade. One covers a huge area with an OK resolution and the other has a much higher resolution for a smaller part within the huge area. It looks something like that:

+------------------+ big
|                  |
|                  |
|     +----+ small |
|     |    |       |
|     |    |       |
|     +----+       |
|                  |
|                  |
+------------------+

So now I'd like to know how to set the part inside the big tif to nodata (or any other value...). It's only shades of gray, so no RGB (only one byte per pixel).

Is there a way to first get the exact extent of the small tiff? And with that extent I'd like to set all pixel within this extend in the other tif to a given value...
Is this possible?
Would be great if someone could tell me the command I have to use in probably gdal?!?


texts:
Tried really much to correct these errors, but v.clean can't detect them as errors.

I have a big ring polygon which is connected by bridges with 0 width

Is there a possibility to split this ring polygon automatically and delete this "lines"?
I can't delete them manually because my file has over 80,000 polygons with everyone more than 10,000 points (It's a huge file). This file comes from a calculation programme, so I can't change really much. Also there is next to this polygon another polygon which shouldn't overlap

Maybe its possible to split the polygon in triangles and delete all with no area. Then merge it again?

I could fix this through the original Programm i exported it. But i am still interested if there is a possibilty to fix this in QGIS. If there is an option to split the polygon into triangles it could be fixed easily


texts: Dynamically displaying mouse position (coordinates) while drawing polygon?

texts:
I would like to dynamically display coordinates of the point, using label for example, while drawing polygon. I did so far:

var fromProjection = new OpenLayers.Projection("EPSG:4326");
var toProjection = new OpenLayers.Projection("EPSG:900913");
...
map.events.register("mousemove", map, function(evt){
    if (polygon.active) {
        var position = map.getLonLatFromPixel(this.events.getMousePosition(evt));
        var g = position.transform(toProjection, fromProjection);
        var f = formatLonlats(g);//my owny function which displays coordinates as: x1 deg y1 min z1 sec N, x2 deg y2 min z2 sec E (and here its decimal values)
        console.log(">> coordinates = " + f);
    }
});

It's working for console, but how can I display a label with "f" value while drawing polygon?


texts: Negate the shapely intersection predicate

texts:
I have two Shapely geometries:

1 MultiPoint instance named multipoints
1 Polygon instance named polygon

I can compute their intersection by: multipoints.intersection(polyon) which results in all points that fall inside the polygon.
I'd like to compute their 'non intersection' to get the points which doesn't fall inside the polygon but there is no such: multipoints.notintersection(polyon) method:

I can use the symmetric_difference as: multipoints.symmetric_difference(polyon) but this gives a geometry collection with the points I'm searching for + the whole initial polygon (for which I don't care).
I need to have that done in either one line, or a function that can be plugged into a lambda function for applying it all over the rows of a GeoDataFrame containing MultiPoint geometry instances in each row.
Notice; I can use the boolean result of an intersects inside my lambda but it doesn't seem to work when I apply it on a GeoDataFrame:
gdf['nonintersectingpoints'] = gdf['my_multipoint_column'].apply(
    lambda multipoints: multipoints if not multipoints.intersects(polygon) \
    else None
)

(result is None every where).


texts:
This is really a question of how to better understand QGIS API documentation (C++ or Python) but I'll use this example:

How do I use QgsRasterInterface.histogram? I was told in this thread I can use QgsRasterInterface.histogram to calculate a list of unique values and their counts in a raster layer.

My best attempt so far:

layer = iface.activeLayer()        #the active layer is a raster layer
provider = layer.dataProvider()

print(provider.hasHistogram(1, 127))   #returns false, no histogram yet

provider.histogram(1)    #for band 1

and QGIS crashes. No errors or other information, just a crash. I see that QgsRasterInterface has a method .initHistogram. Maybe I need to initialize the histogram first?:

The first argument of .initHistogram is a QgsRasterHistogram. I am unsure how to make this QgsRasterHistogram object. The documentation for this class lists no methods. Though it does have some attributes which are inherited from QgsRasterInterface, and none of the attributes have an description. The QgsRasterHistogram has a short description which makes me think I am on the right path:

By doing a quick test I can see I have not constructed the QgsRasterHistogram properly.

histogram = QgsRasterHistogram()
print(histogram.extent)     #prints empty extent

The documentation is mostly empty for QgsRasterHistogram and when I try to use it in the PyQGIS console, I am not prompted to add any arguments or anything.

Do I need to use .initHistogram to construct a histogram for this raster layer?  Or is there another reason QGIS crashes when I use provider.histogram?


texts: QGIS combined heatmap (point density transparency) and interpolation (attribute values)

texts:
I am analysing borehole water supply in rural communities. I have CSV data which includes the GPS location for each water point and a flag as to whether the water point is currently functioning (Yes/No).

I want to create a "heatmap-style" output with areas where there are functioning waterpoints to be coloured in green, areas where there are non-functioning water points covered in red but areas with no water points to be left untouched (ie white).

I can convert yes/no to boolean and interpolate but then areas where there are no water points - mountains etc - will be coloured depending on how the surrounding water points, which might be 10km away, are performing.

Do I need to somehow create both an interpolated layer and a heatmap and then group them together, such that transparency levels are set by point density (heatmap) and the actual colour is set by interpolation?


texts: How to define title, description and color in leaflet Draw

texts:
I am trying to create a participatory mapping site where users can draw polygons using Leaflet draw.

Just to know how can i create a pop window where users can define a title, description and color of the polygon which they draw or after they draw, click on the feature and add a label,description and color?


texts:
I am using QGIS 2.18.13.

I have a polygon layer with building footprints, and a point layer with a given number of points. I would like to draw lines (randomly) between two points and see how many buildings the line crosses. How I can do that with QGIS?


texts: Exporting an image from QGIS for use in Autocad

texts:
I am using QGIS to open mrsid files from NAIP, clipping the part of the county that I need and using the "save as" option to export as a geotiff in state plane coordinates for use in Autocad.  I am having a few issues with this method:
First, the resolution on the image is not great.
Second, the insertion point comes into Autocad correctly but when I close the image correlation dialogue box the image rescales for some reason.

I can rescale the image, but am wondering what I'm doing wrong?


texts: Finding & correcting missing layer in MXD using ArcPy?

texts:
Am struggling with ArcPy.

Can someone help with a script to identify missing layers (red arrow in TOC) and then to search for the correct file locations & then update the mxd.


texts: Change the projection at runtime (OpenLayers)

texts: How do I change the projection on an existing Map object? I'd like to allow a user to switch between cylindrical (EPSG:4326) and custom-declared projections with the click of a button.


texts: How to make the data in the list add up in Google Earth Engine

texts:
I am new in Earth Engine. Here is an image collection [img1,img2,img3,img4,img5]. I want to get List or image collection [img1+img2 , img2+img3, img3+img4, img4+img5]. I tried to complete the following code  https://code.earthengine.google.com/1256826da91886b9242f29f20339d604  But the result is incorrect, I don't know where the error is. I try not to use for loops because I will have a lot of data to calculate.

var img1 = ee.Image(1);//3
var img2 = ee.Image(2);//5
var img3 = ee.Image(3);//7
var img4 = ee.Image(4);//9
var img5 = ee.Image(5);
var image=ee.ImageCollection([img1,img2,img3,img4,img5]);

var list = image.toList(image.size());

var newList = list.slice(1);
print(list.size());
newList = newList.map(function(data) {
  data = ee.Image(data);
  var l = data.add(ee.Image(list.get(list.size().subtract(1))));
  return l;
})
print(newList)


texts: Merging two data sets (multiple satellite images) based on their names using ArcPy

texts:
I have two folders containing 1800 files each. I need to merge or combine them based on their names, e.g. file MOD10A2.A2017177.h24v05.006.2017187224801.tif in folder A should combine/merge with the file MYD10A2.A2017177.h24v05.006.2017191190921.tif in folder B and file MOD10A2.A2017188.h24v05.006.2017183445431.tif in folder A should combine/merge with the file MYD10A2.A2017188.h24v05.006.2017134567541.tif in folder B and so on. And I want the resulted images in folder C.
The following code actually executes successfully but it doesn't write or save the resulted images or files in folder C.
Here is the code (courtesy BERA)
import os, arcpy
from collections import defaultdict as dd

baseFolder = r'D:\data' # containing two sub-folders
d = dd(list)

for root, folders, files in os.walk(baseFolder):
    for file in files:
        d[file.split('.')[1]].append(os.path.join(root, file))

for partname, pathlist in d.items():
    if len(pathlist)==2:
        fullPaths = [os.path.join(root, f) for f in pathlist]
        if all(os.path.isfile(p) and p.endswith('.tif') for p in fullPaths):
            arcpy.MosaicToNewRaster_management(input_rasters=';'.join(fullPaths), output_location='D\combined_data', raster_dataset_name_with_extension=partname+'.tif', number_of_bands=1)


texts: Clustering points and summing up attributes per cluster in QGIS

texts:
We want to find out the ideal location for sheds and the required dimensions of each shed. As input, we have a point layer with locations (each representing one arable field) and the estimated yield per point (per arable field).

What we now try to do is first to create four clusters for these fields. This should serve as an approximation of the ideal location for a new shed. We've done this by simply using the "point cluster" option in the "symbology" section and adjusting the distance until only four cluster points remained. These cluster points were then saved as new point shapefile.

How do we determine what points are actually clustered in each of the cluster points?

With this information, we can then sum up the estimated yields for all the single points per cluster. This would allow us to calculate whether the shed has to be designed for 10 tons or 100 tons of grain.


texts: ArcGIS online: Job aborted, approached out-of-memory threshold

texts:
I'm attempting to download the Output Areas dataset for England. I'm trying to download the the shapefile for all of the Output Areas in the dataset.

When I press 'Download,' then 'Shapefile,' the downloading animation never finishes. If I look at the 'Network' tab of Chrome developer tools, then look at the response of the request for https://opendata.arcgis.com/datasets/09b8a48426e3482ebbc0b0c49985c0fb_1.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D&url_only=true I see this:

{"status":"Failed","error":{"message":"Export job failed: error: Job aborted, approached out-of-memory threshold","code":500}}

So I think the server is running out of memory, but I'm not sure how to fix that.

Can I avoid this out-of-memory error somehow, (e.g. by only downloading a tenth of the data at a time)?


texts: Creating polygon grid using fixed extent

texts: I have a Shapefile of a town. I would like to divide the whole area into grids such that each grid has a scale of 1:2000. I have set my map to fixed scale (1:2000) in Layout View.


texts: What is causing ogr2ogr to fail to merge shapefiles without a reprojection?

texts:
Update 23-04-2018

The main issue has been solved, I (incorrectly) assumed all the files would share the same crs. This isn't the case and zones UTM 13N to 16N are used. So with no target crs for ogr2ogr to reproject to the layers which don't have the same projection as the first one to be written get drawn with the wrong projection. Since the parameter that varies between those UTM projections in the central meridian the features are shifted east or west. This can be seen when looking at Baja California for example.

The sight mis-registration described in the question only seems to affect Baja California Sur, and is present in the source data. This suggests it is something to do with how that data has been prepared. I'll leave the question open to see if anyone can crack that...

Original Question

I have two simple shell scripts to download and merge some shapefiles from the Mexican electoral boundary commission. One version of the script includes -t_srs ESPG:4326 flag and on version doesn't dictate any re-projection.

The version which doesn't re-project overlays the districts of Mexico:

The version with the t_srs flag is almost correct:

But on closer inspection there are the sort of issues I would associate with projection problems as can be seen on comparison with OSM:

I would like help understanding why the version which doesn't re-project basically fails, and what the slight error in the second version is caused by.

I feel like the answer is probably in here but I haven't been able to figure it out!
I also wondered if there's another bug that might be causing this, or if I'm mis-using ogr2ogr in some way.

The source CRS is defined in the .prj file as follows:

PROJCS["WGS_1984_UTM_Zone_13N",
    GEOGCS["GCS_WGS_1984",
        DATUM["D_WGS_1984",
            SPHEROID["WGS_1984",6378137,298.257223563]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-105],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]


texts: Listing every street name per postal code

texts:
I would like to export a list of all street names per postal code for Germany.
More specificly, I have looked at OpenStreetMap/the Overpass API.

With

[out:json];
(
    area[postal_code="31061"];
);
way(area)[highway][name];
out;

i can get a list containing information about every street in the postal code "31061 - Alfeld".

Now, I could just use a public API, but I don't think they'd be happy with me firing 30k requests against their API.

I could host my own version of the Overpass API, altough that requires very large amounts of resources (HDD and RAM). I tried importing the dataset for germany, but had limited success due to the large file sizes.

There has to be a better solution to get the data I would like to have.

Is there maybe a commandline-tool available, that can extract all streets for a specific postal code from a http://download.geofabrik.de/europe/germany.html dump?


texts: Creating and Rotating Raster Dataset using ArcObjects

texts:
I'm following the "How to create a raster dataset" tutorial: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//000100000464000000

The questions are:

1) How can I create the raster in a file geodatabase? (The example given is incomplete.)

2) How can I rotate the newly created raster? (Standalone TIFF or a geodatabase raster.)

I know there is IRasterGeometryProc3, but I can't make it work.


texts: I was looking for some plugin in QGIS which would help me tracking smartphone (for vehicle tracking system). I could find posiview in qgis. It has very sketch help file and therefore could not configure the application.


texts: Google Earth Engine plotting Image from ImageCollection

texts:
This is a simple operation I've done with other data sets on GEE but for some reason I can't get it to work with MODIS AOD.

Working off the example on Google's developer website...

var collection = ee.ImageCollection('MODIS/006/MCD19A2_GRANULES')
              .select('Optical_Depth_047')
              .filterDate('2019-01-01', '2019-01-15');
var band_viz = {
  min: 0,
  max: 500,
  palette: ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red']
};

Map.addLayer(collection.mean(), band_viz, 'Optical Depth 047');
Map.setCenter(76, 13, 6);

We get a raster of mean AOD values

Next I want to plot the first raster from the collection.

var image = collection.first()
print(image)
Map.addLayer(image, band_viz, 'Optical Depth 047');

The image appears in the console and in the map legend, but is not visible on the map.

Here's the link to the script. Thanks!


texts: In QGIS can I show just the lines in a Postgis query? How can I do that?

texts:
I have three tables in Postgresql, each table with one layer of lines.
I want to show the path of an initial line to another final. Is it possible executing a SQL query?
Thanks

My three tables are connected:

Table cables - gid, id, the_geom

Table tubes - gid, id, cable_id, the_geom

Table fibers - gid, id, tube_id, the_geom

If I select the fiber id=1 I want to know (and see in map) the way starting in fiber 1 until the beginning (fiber - tube - cable)


texts: How to join data in postgis tables to form layer with subset of attributes

texts:
In QGIS I am trying to join data from two postgis tables.  I can not figure out how to do this at sql because add layer tools seem to allow one to select just one table to filter on.   Instead I loaded all tables as separate layers and then used the join layers in the properties of one of the layers.

That worked but I end up with a lot of attributes that I don't need or want.

How do people handle this?  One solution that occurs to me is to construct a view in postgres.


texts: Examples of GIS or Remote Sensing in movies

texts:
Looking for examples where GIS or RS has been a part of a movie plot. I'm trying to put together a "GIS & RS and the Cinema" class, in which examples of GIS & RS are shown. Those examples will then be used a jumping off point for discussion around either the truth or utter wrongness of the GIS technique or RS data being shown.

My best example right now is VOLCANO, where Anne Heche drives a jeep around LA (without any traffic!!!) monitoring lava flows - in 1997! Clearly there are a few issues here which would be a great start to a discussion about GIS and emergency management and other technical aspects.

My other example is any, ANY, movie where a grainy satellite image is shown, and person in charge demands that it be "ENHANCED!". Magically, the satellite is capable of zooming in and staying in one spot to see some new detail or event happen.

What other examples of movies that involve some plot around Satellite Imagery, GPS, Aerial Photos, or GIS are there?


texts: Can Network Analyst consider multiple cost attributes?

texts:
I'm trying to do a basic service area network analysis in ArcGIS 10.0.  But I have two cost attributes I want to act as the network impedance-- one apportioned along the edges of each line feature, the other a constant.

To be specific, I'm trying to model transit travel.  I have travel time (in minutes) as the primary cost attribute (which is apportioned along the line), but I also want to be able to factor in a constant wait time which is expended at the facility.  The wait time will vary depending on the transit line's frequency.

Because the wait time varies from line to line, I can't just subtract the wait time from the default break values I put into the analysis settings.  For instance, if I want to find out the extent of travel in 20 min and 30 min, and I had only one transit line (with a wait time of 5 min), I could just specify 15/25 as my break values.  But I have multiple transit lines, so I can't specify break values for every line.

Is there any way around this?


texts: How to change ruler units in print composer to inches?

texts: I am using the latest version of QGIS, 2.16.1 and am having trouble changing the units displayed on the ruler in print composer from mm to inches. I can change the units of the page size no problem but that is about it.


texts: Text File MultiPolygon/Polygon to PostgreSQL using Python/Psycopg2

texts:
I am writing a python script attempting to insert GeoJSON Polygon coordinates into a Postgres table. I am writing a basic insertion code since I am new to GIS domain.

The code look like this:

createTableMain = "create table "+ tablename +" (id TEXT PRIMARY KEY DEFAULT NULL,Name TEXT DEFAULT NULL,type TEXT DEFAULT NULL ,wkt_geom GEOMETRY DEFAULT NULL)";
print(createTableMain)

cursor.execute(createTableMain)
    with open(datapath, 'r') as f:
        next(f)
        cursor.copy_from(f, tablename, sep='|')

conn.commit()
conn.commit()
cursor.close()
conn.close()

The data insert properly but the wkt_geom column does not contain data with multi-polygon and polygon format. It looks like this (seems like it as text).

I am reading the data from a text file, so I seek a solution with respect to that.


texts: Export classifier from SCP Plugin for use in other image classification

texts:
I have run a classification using the SCP plugin in QGIS.

I want to recreate these results in a neighboring area and I am looking for help to see if it is possible to save the classification algorithm from my first raster to use in the neighboring area.

I know this is possible with SNAP and I'm hoping there is a comprabale way to do this with SCP in QGIS.

Anyone have any expereince with this or suggestions on how to make it work?


texts: Unable to locate PostGIS in OpenGeo Suite using command line

texts:
I am working on this new ubuntu 12.04 server and I need to work on the Postgres database which is PostGIS enabled. The problem is I am not sure how to locate the database using command line. The server already has OpenGeo suite installed on it and so it definitely has PostGIS.

It is already installed on the server. I just need to locate it. How do I locate it?


texts: Wanting to build Web Mapping Application

texts:
I am wanting to build a web mapping application and am trying to gather all the pieces that I'll need. Is it possible to build REST services with opensource Geoserver from an ArcMap document and tools built in ESRI like I would using Arc Server Manager?

Basically what I would like to do is build a website with a Flex Mapping application with geoprocessing widgets from my Arc Map document, build the rest services for it with Geoserver, and host it on something like Amazon Ec2. Is this possible?

-Thanks
Adam


texts: How Do I share a complicated style from one Mapbox Account to another?

texts:
I was looking at the scenic style, and I ended up copying it and modifying it in MapBox Studio.

What happened is that I edited it in my personal Account, and not my Organization's account.

How do I move or copy this modified style from my Account to another Account?


texts: ArcGIS Server 10.0 - error publishing map service - 'wait timeout interval has elapsed'

texts:
I am trying to publish a map service from an .mxd on ArcGIS Server 10.0, and I am getting this error in the Server Manager log:

'Configuration service.MapServer can not be added. A request to obtain a free ServerContext has failed because the Wait Timeout Interval has elapsed.'

I do not understand this error, as I have not yet set the parameters for a map service instance?  Is there some other setting I should modify in Server Manager?


texts: Does the ArcGIS Javascript API support multiple map service urls per layer?

texts:
I've called tilecache from OpenLayers in the same manner as the example below. Is it possible to do something similar with the ArcGIS WMS map layer?

var urlArray = ["http://tilecache.osgeo.org/wms-c/Basic.py",
    "http://tilecache.osgeo.org/wms-c/Basic.py"];
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
    urlArray,
    {layers: 'basic'} );


texts: What is the difference between these coordinate systems for New Brunswick

texts:
AutoCAD Civil 3D has two coordinate reference systems that I've identified for use in New Brunswick, Canada: CANST-NB83-CSRS and CANST-NB-ATS

How do they differ?


texts: QGIS calculates main soil type of polygons from another polygon layer

texts:
I've been working with qgis for a while but somehow I never fiured this out, so I thought it's time to ask.

I have 2 shapefiles.

a polygon layer from nearby fields (SHAPE1 (the red outlines))
a polygon layer, with different polygons than SHAPE1, that has soiltypes as an attribute (sand, clay etc.) (SOIL (the funky disco colors, each color represents a different soil type)

What I want to find out is what the main soiltype for each polygon in SHAPE1 is. (preferably by adding a field to SHAPE1 with the attribute from SOIL)

Is this possible?


texts: create relationship class with stand alone python script

texts:
I have created a relationship class in arc catalog using the same arguments I'm using below, however if I try and create it using the script below I get:

  arcgisscripting.ExecuteError: ERROR 000622: Failed to execute (Create
  Relationship Class). Parameters are not valid. ERROR 000628: Cannot
  set input into parameter attributed.

Following is the script I'm using:

import arcpy
from arcpy import env

env.workspace = "C:\a.gdb"

origin_table = "a.gdb\Trail_meta"
destination_table = "a.gdb\trails_mfg"
out_relationship_class = "a.gdb\t3meta"
relationship_type = "SIMPLE"
forward_label = "Attributes from meta"
backward_label = "Attributes from trail"
message_direction = "NONE"
cardinality = "ONE_TO_MANY"
attributed = "NONE"
origin_primary_key = "OBJECTID"
origin_foreign_key = "TRAIL_NAME"

arcpy.CreateRelationshipClass_management(origin_table,destination_table,out_relationship_class,forward_label,backward_label,message_direction,cardinality,attributed,origin_primary_key,origin_foreign_key)


texts: FME : How can I use multiple Workspacerunners in one Workspace?

texts:
I created two Workspaces, the first one does a clipping process and the second has to run it. It contains a "Creator" and 4 Workspace-runners.
I have 4 different Inputs and outputs paths, how can I launch my main workspace and only specify in each workspacerunner the INPUTS and the OUTPUTS?

Thanks !

I'm sorry I wasn't very explicit. What you said describes what I wanted to do. I have a Dataset that I use each time "communal areas" and 4 others "pipelines" that I change each time. What I want is that I don't have to change my INPUTS/OUTPUTS directories each time. This is why I used Workspace-runners but it didn't work. I think I have a problem in my main workbench because I had this Error Message :

2013-09-13 17:04:31|   0.4|  0.0|INFORM|WorkspaceRunner_2: Running FME Workspace W:\LAB\...decoupage_canalisations.fmw with command line:
2013-09-13 17:04:31|   0.4|  0.0|INFORM|WorkspaceRunner_2: {C:/Program Files/FME_2013/fme} W:/LAB/.../Decoupage_cana_dep/decoupage_canalisations.fmw --SourceDataset_SHAPE {W:\LAB\...\INPUTS\DIFF_MPC\*.shp} --SourceDataset_SHAPE_3 {W:\LAB\..._REGION\*.shp} --DestDataset_SHAPE {W:\LAB\...OUTPUTS\DIFF_MPC} --LOG_FILE {W:\LAB\...\LOGS\DIFF_MPC} 2>@1
2013-09-13 17:04:35|   0.4|  0.0|WARN  |WorkspaceRunner_2: Failed to run workspace W:/LAB.../decoupage_canalisations.fmw -- Trace was:

                 FME 2013 SP2 (20130605 - Build 13499 - WIN32)
                  FME Desktop Professional Edition (floating)
                               Permanent License.
                        Machine host name is: L50026151
                Copyright (c) 1994 - 2013 by Safe Software Inc.
                               Safe Software Inc.

Unable to open log file `W:\LAB\...\LOGS\DIFF_MPC'
Program Terminating

Translation FAILED.
I Put another screenshot of the main workbench.!


texts: Historical aerial imagery GoogleEarth (2014) use in ArcGIS for Central Europe?

texts:
I run the supervised classification of Landsat scene from 2014 to identify forest disturbances.

I would like to assess the accuracy of my classification through visual identification of stratified random samplings: however, I do not have aerial photography from this year. I wanted to use historical GoogleEarth (GE) imagery (from 2014) to assess my accuracy.

Is there a way to open the Historical GE imagery in ArcGIS 10.1? I have found that no, but maybe there are some updates.


texts: Aligning or integrating features from two feature classes using ArcGIS Desktop?

texts:
I am trying to align two line feature classes (street networks) that have been digitalized differently - see picture. One is more spatially accurate and has the attributes I need (A) and the other one has more detail in terms of small streets (B) - and I want both ;-)

They don't share any fields like ID or name.

The problem I have is that two or more features of the two feature classes can represent the same "street". If that is the case, I need to get rid of the said features of one of the feature classes. And since I dont want to lose the attributes of feature class A, I need to somehow get rid of the features of class B. My approaches so far:

Using the integrate tool to integrate features from class B into class A, to then delete them using "delete identicals" or topology rules. However, the tool miraculously changes the geometry of almost all features from class B even if the next feature from class A is much further away than the XY-tolerance defined.

I tried it anyway because I didn't know any other method. But:

Using the integrate tool and then delete identicals does not work,
since the features are not identical, even though they overlap. E.g.
one feature class is digitalized using three short line features to
represent one street, while the other feature class uses one long
feature.)
Using the integrate tool to make the features overlap and then use repair topology to subtract one from the other. However, I have 4400 errors and can only fix them one by one. It seems there is no way to batch fix them.

Is there any way to get rid of these redundant features?

I am using ArcGIS Desktop 10.5 and I m new here so pls tell me if the question needs editing or additional information.


texts: Writing label expression with ArcMap and If then Statement?

texts:
I am having problems with label expression in ArcMap 10.2.1.

I want to show two labels per polygon, but only when there are two labels to show.
Every polygon has at least one label (Veg_Dominant), but some polygons also have a second (Veg_codominant). I want polygons with only one label to show this one label, and polygons with two labels to show both with a '+' sign in between.

This is how I entered it in the label expression:

This is how it looks in the map:

is there a way to only show the '+' sign when there is more than one label to show?


texts: Can ArcGIS Export Web Map task print labels from a Feature Layer?

texts:
I'm creating json to create a custom printout using the Export Web Map task on an ArcGIS server (v10.2).

Everything works as expected apart from labels are not showing in the generated printout. The layer is a feature layer and the shapes in the layer appear fine but the labels don't.

The labels do appear in our web map application so it looks like there's no problem with the labels themselves. The values and styles are all as expected.

I've tried to find another feature layer on the web and use it to see if the issue is with our MXD but the labels don't appear in the output from the "export web map" either.

To demonstrate, I've used the Hurricance layer from this ArcGIS web map application:

I've used this json to demonstrate that the layer is rendered but the labels are missing in the printout:

{
  "mapOptions": {
    "showAttribution": true,
    "extent": {
      "xmin": 9407172,
      "ymin": 2006620,
      "xmax": 11117172,
      "ymax": 3596620,
      "spatialReference": {
        "wkid": 3857,
        "latestWkid": 3857
      }
    },
    "spatialReference": {
      "wkid": 3857,
      "latestWkid": 3857
    },
    "scale": 4000000
  },
  "operationalLayers": [
    {
      "url": "http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",
      "title": "Base Map",
      "opacity": 1
    },
    {
      "url": "https://tmservices1.esri.com/arcgis/rest/services/LiveFeeds/Hurricane_Active/MapServer/0",
      "title": "Active Hurricanes",
      "opacity": 1
    }
    ,
    {
      "opacity": 1
    }
  ],
  "baseMap": [
      ],
  "exportOptions": {
    "dpi": 96
  }
}

(It may be necessary to update the extent to locate an active hurricane)

My question is why do the labels not appear when printing?

In the ExportWebMap specification there isn't the option to define labelingInfo for Feature Layers so is this something that's just not supported or is it a bug with the task?

The other thing I noticed is that there is no labeling info defined for the layer when you look at the DrawingInfo in the Hurricane sample layer but that does not seem to make a difference as I can define styles in the MXD and when published I can see the labels appear in the web map with the correct style. - Just printing fails to show them.


texts: ArcMap fails to convert all records from CSV file using Table to Table geoprocessing tool

texts:
I am using the table to table geoprocessing tool to convert a CSV file with nearly 5 million records into an GDB table in a file geodatabase. The tool succeeds each time, but only 603 records are converted in the output file. ArcMap provides no error message, yet only converts a fraction of the original data. The record in the break-off point shows no particular oddities.
I am running ArcGIS 10.5.1


texts: Could not locate /WEB-INF/lib/ directory to install Geoserver extensions in OSGEOLIVE 12

texts:
I am not able to locate  in /var/lib/Tomcat8/webapps, the geoserver directory where i could paste my extensions file.
The above picture is the directory where i reached and i could find nothing.


texts: How to clip raster inside of circle (python gdal)

texts:
I have a source raster and an ERSI shape file, want to crop the raster into the circle.

raster = gdal.Open("raster.tif", gdal.GA_ReadOnly) #read raster
projection=raster.GetProjectionRef()
VectorDriver = ogr.GetDriverByName('ESRI Shapefile') #intialize vector
VectorDataset = VectorDriver.Open("boxes.shp", 1)
layer = VectorDataset.GetLayer()
feature=layer[0] #select the first polygon (the circle shown in image)
geom = feature.GetGeometryRef()
minX, maxX, minY, maxY = geom.GetEnvelope()
OutTile = gdal.Warp("cut", raster, format='GTiff', outputBounds=[minX, minY, maxX, maxY],xRes=0.05,yRes=0.05,dstSRS=projection)

But when I plot the OutTile, it shows only the corners of the polygon. I also tried the "cutline" argument, but then it croped the whole raster.


texts:
Is there a way to get to the query condition, which is executed under the querytask ?

I have an example, which is actually a copy of this ArcGIS example http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/fl_popup.html, but like my other examples, I can't get it working with my examples.

There is something like this:

    dojo.connect(map,"onClick",function(evt){
      var query = new esri.tasks.Query();
      query.geometry = pointToExtent(map,evt.mapPoint,10);
      var deferred = featureLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);
      map.infoWindow.setFeatures([deferred]);
      map.infoWindow.show(evt.mapPoint);
    });

    var template = new esri.InfoTemplate();
    template.setContent(getTextContent);

    var featureLayer = new esri.layers.FeatureLayer("http://servicesbeta.esri.com/arcgis/rest/services/SanFrancisco/SFStreetTreesRendered/MapServer/0",{
      mode: esri.layers.FeatureLayer.MODE_SELECTION,
      outFields: ["*"],
      infoTemplate:template
    });

    map.addLayer(featureLayer);

 function pointToExtent(map, point, toleranceInPixel) {
   var pixelWidth = map.extent.getWidth() / map.width;
   var toleraceInMapCoords = toleranceInPixel * pixelWidth;
   return new esri.geometry.Extent( point.x - toleraceInMapCoords,
                point.y - toleraceInMapCoords,
                point.x + toleraceInMapCoords,
                point.y + toleraceInMapCoords,
                map.spatialReference );
  }

If I'm reading the code correctly, then when I click the map, it gets the coordinates (query.geometry) of the clicked map part (in my case is it a region), which should get highlighted by a line and then a popup should show with whatever info I got from the query.
But all I get is the default message "No information available".

When I tried to change the where condition for the query by myself like this:

query.where = "Chripka.CISOKRES = 503 AND Chripka.STARTAGE = 6 AND Chripka.RANGEAGE = 8 AND Chripka.PERIODSTART >= date '10/13/2006' AND Chripka.PERIODSTART < date '10/20/2006'";

it did the job, because the query returned only one record, but that's the catch, I never know which region is selected, so this condition (Chripka.CISOKRES = 503) is unknown for me. So I tried this condition

query.where = "Chripka.STARTAGE = 6 AND Chripka.RANGEAGE = 8 AND Chripka.PERIODSTART >= date '10/13/2006' AND Chripka.PERIODSTART < date '10/20/2006'";

instead, but the query returns more than 30 records, nothing gets highlighted and the popup ends with "No information available".

So I thought, that maybe I could look into the query condition which is used for the data
retrieval. Is it possible ?

One thing to mention is, that my web service is running on a very slow server with no possibility to get a better one. I have to wait for 4 seconds, till I get the result, when a timeSlider changes its TimeExtent.
I'm using IE9 and there's no way that I can change it for another web browser, because our customer is using IE9.

Thank you
g

P.S.Actually, the same question goes to TimeSlider. Is there a way to see, what query is executed behind the TimeSlider when its TimeExtent changes ?


texts: NASSCO PACP Schema Standard and CCTV Processor from ArcGIS for Utilities?

texts:
I'm using the ESRI CCTV processor from ArcGIS for Utilities.

I received data from the contractors and when trying to use the ESRI PACP_schema.xml sample there were some issues with field name differences and data types (See image below).

Is anyone familiar with the NASSCO standards or know where to find the current NASSCO schema standard?


texts: Add attributes to vector layer with pyqgis (QGIS 2.0 API)

texts:
i am trying to make a QGIS plugin ready for the new QGIS API in the current development branch (for the upcoming QGIS 2.0 release).
http://hub.qgis.org/wiki/quantum-gis/Python_plugin_API_changes_from_18_to_20

However i struggle a bit on how to add new attributes to the attribute table.
Up to now i have added new attributes like this:

# Working in QGIS Lisboa
layer = ... # QGsVectorLayer object
name = "newAttribute"
provider = layer.dataProvider()
caps = provider.capabilities()
# Check if attribute is already there, return "-1" if not
ind = provider.fieldNameIndex(name)
try:
    if ind == -1:
      if caps & QgsVectorDataProvider.AddAttributes:
        res = provider.addAttributes( [ QgsField(name,double) ] )
except:
    return False

In the recent QGIS dev. version these steps aren't working anymore (the attribute column isn't added) and i was not able to find the solution in the above mentioned wiki-page.
Can someone give me hint?


texts:
I am using QGIS 3.4.8.

I'm working on a project and the projection is in EPSG:2772-NAD83(HARN)/Colorado North and the Ellipsoid is GRS 1980(IUGG,1980). I received a some new shapefiles for the project that are in EPSG:2231-NAD83/Colorado North (ftUS). When I add the layer to the project, it drops it about 1000 ft to the northeast of where it should be. So, I run the Reproject tool to change it to the project's projection but it doesn't move the feature - it just creates a new layer that is in the same exact spot.

I tried right-clicking on the layer to Set CRS and choose the projection I want, it feature moves to somewhere north of Ottawa, Canada (my project is in Colorado).

There is also this projection that was in the dropdown for choosing a CRS,
 * Generated CRS (+proj=lcc +lat_1=39.71666666666667 +lat_2=40.78333333333333 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8288999998 +y_0=304800.6096000001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs)
somehow associated with the shapefile that puts the layer in the same place as the EPSG:2231-NAD83/Colorado North (ftUS) projection.

Any thoughts on what's going on here?


texts: write z-value from polygon layer to point layer in QGIS

texts:
I have two layers:
1 polygon layer where the depth of an area is written in the database (as DRVAL1) and and where the depth is exported as a Z-value to the geometry.
1 point layer that I use to plan Aids-to-Navigation.

In the screenshot to test objects are placed in the point layer. I want to write the depth from the polygonlayer (that is displayed under the pointlayer) that is true for the position of the point, to the poinlayer.

I've tried to make a virtual field in the pointlayer with:

 CASE
 (WHEN intersects($geometry,geometry(get_features('layer_id',"DRVAL1",
 '50')))) = true THEN '50'
 END

I've repeated the WHEN->THEN for all the values in the polygonlager.
but I get a reply with (can't convert to double) or (can't find DRVAL1)

what do I need to change or are there better ways to tackle this issue?


texts: I want to create polygons which contain the hatch in this picture. Diagonals must intersect in the middle of squares. But when I change scale, the intersection moves. How can I fix the intersection? If you know any other possibilities, please advise me.


texts:
I've got another problem with QGIS, I'm using the latest Version Essen, as well as teh latest LTS Wien.
I'am not able to change the size of my print Composer page.
In the menue I can choose all options, but this options are not taken in the composer. There the sheet is always in DIN A4 landscape.

Does somebody have an idea what I'm making wrong?
A colegue, installed QGIS and during me teaching him how to use it I told him, that this was a bug, and he told me it would on his computer.

Yours
Riker


texts: ArcMap 10.4 Model Builder Geoprocessing tool gets broken

texts:
I created a model and added "Iterator Feature Classes" and "Clip". I run the tool and everything works.

But when I save the model and restart ArcMap the tool gets broken. I can't open the "Clip" tool inside the model any more. Look at this image, it's a visual representation of how the tool looks like when I restarted ArcMap.


texts: extracting pixel value from a table in postgresql

texts: I have a table in postgresql that contains ID, row number, column number, pixel value and centroid of the pixel in WGS84 lat-lon system(4326). How could I extract the pixel value by giving a point in 4326 reference system?


texts: Finding easiest path to walk on topographic map?

texts:
I want to make the shortest path between two points, but the thing is that there's a hill in the middle. I used Naismith's rule to calculate how the slope interfers in the walking time and I did the math for this work. I have the DTM, grid and points.

It's something like the shortest path problem I want to solve:

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

I don't know how to get the lines "height" (tallest vertex height minus lowest vertex height).


texts: arcpy FeatureClassToFeatureClass fails with "Could not write value to output field"

texts:
I have a Python script using arcpy for ArcGIS 10.7.1 that is failing on the FeatureClassToFeatureClass line, below.

These three lines are quite straightforward:  Add a TEXT field, give the literal text value DN to that text field for every feature, then copy the feature class to a new feature class.

        tmpSchemeFC = "in_memory/tmpSchemeFC"
        tmpWEPCFC = "in_memory/tmpWEPCFC"

        #  Lots of other stuff happens here, but it's difficult to see how any of it might be relevant to the problem

        arcpy.AddField_management(tmpSchemeFC, "Scheme", "TEXT")
        arcpy.CalculateField_management(tmpSchemeFC, "Scheme", "'DN'", "PYTHON")
        arcpy.FeatureClassToFeatureClass_conversion(tmpSchemeFC, os.path.dirname(tmpWEPCFC), os.path.basename(tmpWEPCFC))

However, the copying of the feature class fails, because it reckons that the value in the new TEXT field is not valid for the destination feature class, despite having no problems in using the same value in the source feature class and the fact that both feature classes should be identical.  Full error trace is below:

Traceback (most recent call last):
  File "R:\Admin\Scripts\BuildWEPCPoints.py", line 203, in <module>
    main()
  File "R:\Admin\Scripts\BuildWEPCPoints.py", line 183, in main
    arcpy.FeatureClassToFeatureClass_conversion(tmpSchemeFC, os.path.dirname(tmpWEPCFC), os.path.basename(tmpWEPCFC))
  File "C:\Program Files (x86)\ArcGIS\Desktop10.7\ArcPy\arcpy\conversion.py", line 1915, in FeatureClassToFeatureClass
    raise e
ExecuteError: ERROR 001156: Failed on input OID 1, could not write value 'DN' to output field Scheme
Failed to execute (FeatureClassToFeatureClass).

I have tried specifying a field_length=50 in the AddField but that didn't help.  I have also double-checked that there is not already an existing field with the same name (eg, already existing as a Double) by doing a print [f.name for f in arcpy.ListFields(tmpSchemeFC)] both before and after adding the new field, so I can clearly see that the new field is created successfully and did not exist before.

Why does this error occur?


texts: Missing holes after exporting GeoJSON in QGIS

texts:
I don't know if this is QGIS related. I am trying to export a GeoJSON from a vector layer in QGIS.
The problem is visualising the vector in Bing map. The shape is missing
some holes, as it should be.


texts:
I have this map in ArcMap (you can download my map document from here), and I don't know why, but if I set the scale to 1:1, I can see my whole city.

When I used the measure tool, I found out that whats 1 cm in my map, should be 1 km.

I want to make buffers, but when I set the buffer to, like, 8 meters, the circles are covering the whole map, because they are 8000 kilometers.

I am an absolute noob in GIS software and I just started using ArcMap some days ago.

I'm using ArcMap 10.2.2.


texts: PyCharm 2019 is not working with QGIS anymore

texts:
Since the update to PyCharm 2019 I am unable to load the QGIS Python modules.
I can not use auto completion either.
I already deleted the cache (by invalidating the cache in PyCharm and also by deleting the "system" folder in the user settings directory), nothing seems to work.

When starting the Python console inside of PyCharm and typing "import qgis.core", I get the following error:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\OSGEO4~1\apps\qgis-ltr\python\qgis\core\__init__.py", line 27, in <module>
    from qgis._core import *
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.

Something seems to be broken, in PyCharm 2018.3 everything was ok. The sys.path environments and interpreter settings seem to be correct:

['C:\\Program Files\\JetBrains\\PyCharm Community Edition '
 '2018.2.2\\helpers\\pydev',
 'C:\\OSGEO4~1\\apps\\qgis-ltr\\python',
 'C:\\OSGEO4~1\\apps\\qgis-ltr\\python\\plugins',
 'C:\\Program Files\\JetBrains\\PyCharm Community Edition '
 '2018.2.2\\helpers\\third_party\\thriftpy',
 'C:\\Program Files\\JetBrains\\PyCharm Community Edition '
 '2018.2.2\\helpers\\pydev',
 'C:\\OSGeo4W64\\apps\\Python37\\python37.zip',
 'C:\\OSGEO4~1\\apps\\Python37\\DLLs',
 'C:\\OSGEO4~1\\apps\\Python37\\lib',
 'C:\\OSGeo4W64\\apps\\Python37',
 'C:\\OSGEO4~1\\apps\\Python37',
 'C:\\OSGEO4~1\\apps\\Python37\\lib\\site-packages',
 'C:\\OSGEO4~1\\apps\\Python37\\lib\\site-packages\\win32',
 'C:\\OSGEO4~1\\apps\\Python37\\lib\\site-packages\\win32\\lib',
 'C:\\OSGEO4~1\\apps\\Python37\\lib\\site-packages\\Pythonwin']

Has anyone updated PyCharm to 2019 and can confirm this?
I also reinstalled the whole QGIS installation, but nothing seems to work.

It looks like the DLLs containing the stubs are incompatible now?

My bat for starting PyCharm looks like this:

@echo off
SET OSGEO4W_ROOT=C:\OSGeo4W64
call "%OSGEO4W_ROOT%"\bin\o4w_env.bat
call "%OSGEO4W_ROOT%"\apps\grass\grass-7.4.2\etc\env.bat
@echo off
path %PATH%;%OSGEO4W_ROOT%\apps\qgis\bin
path %PATH%;%OSGEO4W_ROOT%\apps\grass\grass-7.4.2\lib
path %PATH%;%OSGEO4W_ROOT%\apps\Qt5\bin
path %PATH%;%OSGEO4W_ROOT%\apps\Python37\Scripts
path %PATH%;C:\Program Files\Docker\Docker\Resources\bin
path %PATH%;C:\Program Files\7-Zip

set QT_PLUGIN_PATH=C:\OSGeo4W64\apps\Qt5\plugins

set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis-ltr\python
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis-ltr\python\plugins
set PYTHONHOME=%OSGEO4W_ROOT%\apps\Python37

start "PyCharm aware of Quantum GIS" /B "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.2\bin\pycharm64.exe" %*


texts: Is it possible to vary the sql query based on Zoom level?

texts:
I am trying to create a map where I have added a layer with place names. There are thousands of those in the database, and I am looking for a way to show only the most important ones on the lower zoom levels.

The CartoDB introduction has a good example of the problem with my map (notice that there are so many dots that the map can't be used for anything but seeing where people have given names to geographic features or where they live)
http://docs.cartodb.com/tutorials/create_map_cartodbjs.html

In my database there is a column for place types, and I have added a min_zoom and a max_zoom column which I would like to use for filtering. The more you zoom in, the more place names are shown - based on the min and max zoom levels defined in the database.

Ideally I would be able to get zoom level as a variable to send to the database query.


texts:
I am trying to export my ESRI add-in to ArcCatalog.
I have access to ArcGIS for Desktop. I do not use Arc Runtime.

I have created a java small program, and I'd like to kick it off with a button.
Here is what I used to create my button

My eclipse setup is correct.

Everything works within my IDE. If I just export this program as an .exe, it works great that way.

I'm able to export to ArcCatalog, over & over, constantly updating my version number. My add-in appears in the Add-in Manager, as per instructions found here

My program utilizes some JavaFX pop-up Vboxes. These will not open when I deploy my add-in to ArcCatalog.
I see here and here that I should be able to run this program via an add-in button that I've created.

I would like to ask the author of the GitHub example code (see link above) about the code in their repository. It doesn't have a main method and the JavaFX class doesn't extend Application.

Is anyone able to make this code work? What am I missing, in that I am unable to make this code run?
The example code is offered as a public resource in GitHub.


texts:
I'm using QGIS 3.10.0 A Coruna.

I have a polygon layer (buildings) where I would like to measure each side depending on its geographic direction (north, east,...).

I'm using the tool "Measure Line", but I have to manually write the value in my attribute table. Is there a way to automatically calculate/have it saved in my attribute table?


texts: Creating a layer in arcmap by dragging a table from an OracleDB

texts:
I am working on a project for a client, they gave us some data from their oracleDB, and when I connect to it in arc map I can just drag and drop the tables from the catalog window into arcmap and they are drawn.

Now we have a bunch of legal deeds that I then extract the data from using OCR, then from the text I programmatically create a shape file and insert it into a table in the same database.  However when I drag that table(which is in the same DB with the data they gave me, which I can just drag and drop to draw) I get the warning that says "Could not add the specified data object to the map", and it is not drawn.  However when I right click on the table from the arc catalog window and hit create layer, then save the layer, then add the layer from that file that was just created, everything works fine and it is drawn.

Am I missing something? Or is something not set up properly.  I would like to have the ability to drag and drop for the client as their data does that they already have.

I admit I am very new to acrGIS and the esri suite, this is the first gig I have been exposed to it, and I feel like I'm missing something simple and dumb.  I've tried googling but haven't found a solution that works.


texts: Align calloutlines in the centre of a label for line-objects in QGIS 3.10

texts:
I would like to align a calloutline for a label in the centre of the text and with a vertical line to a line object in QGIS 3.10.
At the moment my callout line follows the nearest vertex of the line when I manually move it and is always anchored to the bottom right of the text label (See label on the right in the picture).
It should look like the label on the left in the picture, but the label on the left is based on a point object and not a line object.

Is there a way to achieve this in QGIS 3.10?


texts: Selecting segments from segmented layer using ArcMap?

texts:
Is there a way to select the segments from a segmented layer in ArcMap?

I've created a segmented layer by running Segment Mean Shift, but I can't seem to find a way to select or isolate the segments. I was hoping for a way to, e.g., create a shapefile from a collection of segments. I see that Training Samples Manager offers manual picking, but I'm not trying to create training samples for classification. Also, manual picking would be laborious in my case.

Is there a way to select/isolate segments by applying a mask?


texts: SSL certificate problem when trying to open GeoJSON file

texts:
I'm getting the following error when trying to open a GeoJSON file in QGIS:

  Data source is invalid (SSL certificate problem: self signed
  certificate in certificate chain)

Is this related to the page being https?  Is there a workaround to get the file downloaded locally?  I found a couple mentions of it possibly being a bug but no solution was given.  Normally I remove the 's' to make it unsecured and it works but in this instance it won't allow me.

Query page

Query result


texts: Selecting Polygons of one layer with information from table using ArcGIS Desktop?

texts:
I have two 2 datasets:

A shapefile with many polygons. They all have an ID.
A table (.csv) that has one column with IDs.

I need to select all Polygons in 1) that are mentioned in the column of table (2)).

Unfortunately, I don't know how to do it. Select by location does not work, because I cannot display the table (because its just a table).


texts:
I am trying to setup meta-tiling in Geoserver 2.8.0 (I can version up if necessary) in order to prevent multiple labels on polygons which span across tiles.

I am using Leaflet (1.0 RC) on the client.

L.tileLayer.wms("http://178.62.114.162:8080/geoserver/geolytix/wms", {
  layers: 'seamless_locales',
  format: 'image/png',
  transparent: true,
  styles: 'seamless_locales',
  tiled: true,
  tilesorigin: [-180, 90]
})

I was initially confused about the tiles origin. Turns out that it doesn't matter whether I use [-180, 90] or [-180, -90]. The result is the same. See screenshot. Left without meta-tiling, right with meta-tiling.

There are still some duplicate labels in the meta-tiled example. As suggested in the comments this might is probably due to the meta-tile size which is 3*3.

I am trying to change the meta-tile size but have yet been unable to do so.

Edit:

I changed the labels to a point layer of the polygon centroids but labels are not rendered across the tile boundaries and I don't like the idea of having a separate layer for labels.

I am having a workaround with a non-tiled layer leaflet plugin which works well. It's neither the prettiest or quickest solution but it works.


texts: Combining orthophoto and DEM to export xyz-CSV

texts:
I have a georeferenced orthophoto and a DEM as tiff-file. For my further workflow I want to export x,y,z (x,y from the orthophoto and z from the DEM).
I already managed to create a point layer and click a couple of points, which I want to use as control points. After clicking I exported the new layer as CSV & turned GEOMETRY on AS_XYZ.
It already works fine for X & Y, but not for the Z-Coordinate. I guess, because the height is saved as an attribute in the DEM.
Does anybody have an idea how to connect x,y and z?
(the DEM and orthophoto aren't snapped).


texts: Is there an Postgis equivalent of ArcGis Update tool?

texts:
I have two large sets of polygons that overlap. I am looking to combine them with removing the overlapping areas. One dataset carries higher importance and needs to be on top of the other.

Normally I would use Update tool from Analysis Tools in ArcMap that does exactly what I need, however, I am building a bigger model in Postgres and so far I was unable to find an equivalent of the Update tool.

Is there a function or a workflow that can update one polygon with another?


texts: GeoJSON source to other vector source OL 3

texts:
I have a vector layer with markers. I have another vector layer with a route from geoJSON, but the route should be together with the marker to switch the layer and to fill a sidebar.

Is there any idea for me as a newbie?

My code:

var RSource = new ol.source.Vector({features: RFeature});
var RLayer = new ol.layer.Vector({source: RSource});

/*var R170 = new ol.layer.Vector({
    source: new ol.source.Vector({
      url: '/gpx/bonar.geojson',
      format: new ol.format.GeoJSON()
}),
style: function(feature) {
      return style[feature.getGeometry().getType()];
}
});
*/
R170S =  new ol.source.Vector({
      url: '/gpx/bonar.geojson',
      format: new ol.format.GeoJSON()
});

var RLayer = new ol.layer.Vector({
source: [R170S, RSource]
});
}

....

Also I have no idea with the styling.


texts: How to install qgis WMTS client in windows

texts: I want to get QGIS WMTS client installed in windows? I need to know the steps. I also want source code if possible in C/C++.


texts: I have a large number of GeoTIFFs for which I would like to add and store symbology as Color table. What is the easiest way for doing that? I would like to use Python, maybe with GDAL.


texts: Vector Grid, Graphical Modeler & Input Extent

texts:
I created my process in QGIS graphic interface with treatments. In my process I need to create a vector grid. This algorithm allows a vector layer to define my extent.

But in the graphical modeler I can't do it, I have to enter an extent like this:

-0.793282323236,-0.792284809119,45.2490964215,45.2499104167

How can I use a vector layer as extent in the graphical modeler?


texts:
I usually work my batches in Excel and then copy/paste it into ArcGIS batch UI.

Is it possible to do the same in QGIS?

The tutorials I've seen show how to fill the interface line by line, only.  I'm using QGIS 2.8.2.


texts: Creating osm2pgsql tables in PostGIS database

texts:
I managed to partially setup osm2psql to work with my PostGIS DB.

My DB contains now the following tables:

 Schema |       Name        | Type  | Owner
--------+-------------------+-------+-------
 public | geography_columns | view  | user
 public | geometry_columns  | view  | user
 public | spatial_ref_sys   | table | user

Now I get the following error when I try to import osm data into it.
I'm using the following command:

osm2pgsql england.osm -d mydb -U user  -S default.style

The error I got :

sm2pgsql SVN version 0.70.5

Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
NOTICE:  table "planet_osm_point" does not exist, skipping
NOTICE:  table "planet_osm_point_tmp" does not exist, skipping
PREPARE get_way (int4) AS SELECT AsText(way) FROM planet_osm_point WHERE osm_id = $1;
 failed: ERROR:  function astext(geometry) does not exist
LINE 1: PREPARE get_way (int4) AS SELECT AsText(way) FROM planet_osm...
                                         ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

Error occurred, cleaning up

Does anyone know what could be the problem?


texts:
import arcpy
sourceWorkspace = "C:\\Users\\tx8p90\\Desktop\\Lesson2"
targetProjection = "C:\\Users\\tx8p90\\Desktop\\python excercise data\\Lesson1\\contourlines.shp"
listDataSet = arcpy.ListDatasets(sourceWorkspace)
try:
    for x in listDataSet:
        outputDataset = sourceWorkspace + "\\projected_" + x
        arcpy.Project_management(x, outputDataset, targetProjection)
        print "Reprojection successful"
except:
    print arcpy.GetMessages()
    print "failed"

I have started learning Python for ArcGIS last week and have a simple script to reproject all the datasets in a folder. The script says "syntax error- invalid syntax" but I can't find anything. Can someone please have a look? It seems something very basic but I'm pretty new so I don't see it at the moment. Also running this in ArcGIS prints "failed" right away. And the files are in place in the right folders. I have already checked.

Edit:

Ok just at least the syntax error has disappeared by just writing the code again by removing those 3 dots at the beginning of each line. But still I get "Failed" as output.


texts: Getting accurate distance measurements using EPSG:3857 in QGIS

texts:
I'm still a beginner at QGIS and am currently using it to plan trap placement for an upcoming fieldwork session in Central Europe. Traps should be placed along a transect 100m apart. So far when I place them, the Cartesian reading says they are 100m apart and the ellipsoidal reading says they are 65m apart. This is over only a 1km radius so I don't believe the curve of the Earth is having a significant enough impact to cause this difference between the two readings. And when I double check these distances on Google Maps it is clear that the ellipsoidal reading is the accurate one.
Could it be a problem with my CRS?
I chose EPSG:3857 because I'm using a Google satellite base layer which stretches crazily when I used EPSG:4326 but not when I used EPSG:3857.


texts:
My GeoServer 2.15.0 doesn't create mosaic storage using rasters created in ArcGIS (GeoTIFF, jpg). Everything is fine, when rasters created in QGIS or GlobalMapper. When I'm trying to create mosaic storage, I have an error message:

  Could not list layers for this store, an error occurred retrieving them: Failed to create reader from file://D:\las\rer and hints Hints: REPOSITORY = org.geoserver.catalog.CatalogRepository@7fed1e EXECUTOR_SERVICE = java.util.concurrent.ThreadPoolExecutor@4886fdb4[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] System defaults: FORCE_LONGITUDE_FIRST_AXIS_ORDER = true LENIENT_DATUM_SHIFT = true STYLE_FACTORY = StyleFactoryImpl FEATURE_FACTORY = org.geotools.feature.LenientFeatureFactoryImpl@2a20c96e FILTER_FACTORY = FilterFactoryImpl FORCE_AXIS_ORDER_HONORING = http COMPARISON_TOLERANCE = 1.0E-8 GRID_COVERAGE_FACTORY = GridCoverageFactory TILE_ENCODING = null

I'm trying to use different formats of rasters with different compression types and error still remains.

Here is GDALInfo:

  Name
  tile0
  Path
  tile0.TIF
  CRS
  USER:100027
  Extent
  3414942.1961099999025464,934141.3837400000775233 : 3418396.8961100000888109,936541.8837400000775233
  Unit
  meters
  Width
  34547
  Height
  24005
  Data type
  UInt16 - Sixteen bit unsigned integer
  GDAL Driver Description
  GTiff
  GDAL Driver Metadata
  GeoTIFF
  Dataset Description
  tile0.TIF
  Compression
  LZW
  Band 1
  STATISTICS_COVARIANCES=1080,18154592972,988,766881503097,845,487802548778
  STATISTICS_MAXIMUM=255
  STATISTICS_MEAN=52,635279037621
  STATISTICS_MINIMUM=0
  STATISTICS_SKIPFACTORX=1
  STATISTICS_SKIPFACTORY=1
  STATISTICS_STDDEV=32,866115467602
  Band 2
  STATISTICS_COVARIANCES=988,766881503097,949,88993433988,798,406154932079
  STATISTICS_MAXIMUM=255
  STATISTICS_MEAN=57,845627022763
  STATISTICS_MINIMUM=0
  STATISTICS_SKIPFACTORX=1
  STATISTICS_SKIPFACTORY=1
  STATISTICS_STDDEV=30,820284462345
  Band 3
  STATISTICS_COVARIANCES=845,487802548778,798,406154932079,709,687473905154
  STATISTICS_MAXIMUM=255
  STATISTICS_MEAN=43,050365482897
  STATISTICS_MINIMUM=0
  STATISTICS_SKIPFACTORX=1
  STATISTICS_SKIPFACTORY=1
  STATISTICS_STDDEV=26,639960095788
  More information
  DataType=Generic
  Dimensions
  X: 34547 Y: 24005 Bands: 3
  Origin
  3.41494e+06,936542
  Pixel Size
  0.1000000000000053901,-0.1000000000000000056


texts: How do I reduce the number of drawn polygons on an Android Map?

texts:
We're using spatialite-android and Nutiteq to render Archaeological datasets. One of our sample data sets has 7000 polygons that turn into 400,000 objects in our renderer.

Is there a common GIS method that deals with this problem? Unfortunately, our team hasn't done much GIS development and we don't know the right question to ask.


texts: Geokettle transformation for FileGDB to SHP

texts: I want to transform FileGDB layer to Shapefile on Geokettle. Firstly i added OGR Input and than i added a Shapefile Output. And i entered parameters shown on the screenshot but i got errors for reading from FileGDB. What must i do for this transformation.


texts: Changing Computer, Update file roots. QGIS

texts:
I am due to finish work with my current employer, and leave all my QGIS work behind.  I have about 100 different project files set up, each for a different client. Some pull from a common GIS database, other have client specific files.

What I want to do is to remove the hard drive from this computer, create it as a shared drive on another computer, but unfortunately this will change the file paths on ALL projects...insted of c:/ etc. it will now be g:/

all the rest should remain the same....is there an easy way to do this?


texts: Is there an open source tool to planarize graphs?

texts:
I read about the planarize function in ArcGIS, which seem to do exactly what I want. Is there a similar feature in QGIS or another free tool?

I have a shapefile with various shapes intersecting each other and I want each intersection to become a node and between every two nodes to have a simple line.

The goal is to easily convert my .shp in .osm and use it with Graphserver. As it is, Graphserver says I don't have edges, and I deduced the above is my problem.

Thanks a lot


texts: I have 2 tiffs to mosaic which overlap and there is a order to display them right,  When using Mosaic to New Raster the first file I input will be overlapped by the second input file?


texts: No images in the timelapse video using google earth engine and landsat-7 image collections

texts:
I am trying to make a timelapse video of images captured by USGS Landsat 7 Collection 1 Tier 1 and Real-Time data Raw Scenes using google earth engine. Somehow all the video results are just white images lasting 30 secs. The code I used is this:

*var collection = ee.ImageCollection("LANDSAT/LE07/C01/T1_RT")
// Philippines
//Manila 120.645, 14.794, 121.3761, 14.1345
//Tight Manila 120.8652, 14.7144, 121.1372, 14.5017
.filter(ee.Filter.eq('WRS_PATH', 116))
.filter(ee.Filter.eq('WRS_ROW', 50))
.filter(ee.Filter.lt('CLOUD_COVER', 40))
.filterDate('2001-01-01','2008-12-30')
.select(['B1', 'B2', 'B3'])
.map(function(image) {
return image.multiply(512).uint8();
});
var polygon = geometry2;
// Export (change dimensions or scale for higher quality).
Export.video.toDrive({
collection: collection,
description: 'PhilTimeLapse',
dimensions: 720,
framesPerSecond: 2,
region: polygon
});*

I don't know how to trace my mistakes as I am very new to coding and google earth engine. Can you explain where and why am I not getting the images? Thank you!


texts: "Wrapper" script or "wrapper" web app for MapServer?

texts:
So I have been reading up on http://mapserver.org/cgi/wrapper.html and was wondering if there are any more substantial examples of creating a full-fledge web application (using Python and, if appropriate a Python web framework) to handle incoming GET and POST requests for a dedicated "mapserver.mydomain.com" WMS application.

Does such an approach make sense or will the "simple shell script" given in the example in http://mapserver.org/cgi/wrapper.html suffice?

Though frankly, I am not sure how the shell script is going to interface with the httpd server to handle GET/POST requests.

In particular, it may make sense to implement something like a Python tilecache for the MapServer instance so the shell script might not be sufficient?


texts:
Is there any instructions to download OSM in postgres database? I use geosuite (geoserver, postgres, postgis). I'd like to download USA and Russia (1-12 levels). I also want to download sld styles. (Is there any standard way).

So, there is intranet. We use geosuite. And I'd like to download OSM with sld styles.


texts: Reference meridian of longitude in UTM conversion

texts:
I'm not a GIS professional.

I'm trying to write a code to convert from lat/long to UTM coordinates using this truncated method given in Wikipedia:

https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system#Simplified_formulae

What values I should use for lambda_0 (reference meridian of longitude)?


texts: QGIS 2.99 "qgis._core import error: DLL load failed"

texts:
I am trying to run a standalone application. However, it does not run the program because of mentioned error in title. Here is my code:

from qgis.core import *
from qgis.gui import *
from qgis.utils import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *

app = QgsApplication([], True)
path = "C:/OSGeo4W64/apps/qgis-dev"
app.setPrefixPath(path, True)
app.initQgis()

canvas = QgsMapCanvas()
title = "PyQGIS Standalone Application Example"
canvas.setWindowTitle(title)
canvas.setCanvasColor(Qt.white)

layer_info = 'LineString?crs=epsg:4326'
layer = QgsVectorLayer(layer_info, 'MyLine', "memory")
pr = layer.dataProvider()
linstr = QgsFeature()
wkt = "LINESTRING (1 1, 10 15, 40 35)"
geom = QgsGeometry.fromWkt(wkt)
linstr.setGeometry(geom)
pr.addFeatures([linstr])
layer.updateExtents()
QgsProject.instance().addMapLayer(layer)

canvas.setExtent(layer.extent())
canvas.setLayers([layer])
canvas.zoomToFullExtent()
exitcode = app.exec_()
QgsApplication.exitQgis()
sys.exit(exitcode)

When I run it, I get this error:

Traceback (most recent call last):
  File "C:/Users/DELL/Desktop/MyMap/myMap.py", line 1, in <module>
    from qgis.core import *
  File "C:\OSGeo4W64\apps\qgis-dev\python\qgis\__init__.py", line 72, in <module>
    from qgis.core import QgsFeature, QgsGeometry
  File "C:\OSGeo4W64\apps\qgis-dev\python\qgis\core\__init__.py", line 34, in <module>
    from qgis._core import *

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

Python version is: 3.6
PyQt   version is: PyQt5.9
Windows 10 - 64bit

I also add many path:

%SystemRoot%\system32
%SystemRoot%
%SystemRoot%\System32\Wbem
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
C:\OSGeo4W64
C:\OSGeo4W64\apps
C:\OSGeo4W64\apps\gdal-dev
C:\OSGeo4W64\apps\gdal-dev\bin
C:\OSGeo4W64\apps\gdal-dev\pymod3\Lib\site-packages
C:\OSGeo4W64\apps\grass\grass-7.2.2\bin
C:\OSGeo4W64\apps\Python36
C:\OSGeo4W64\apps\Python36\Scripts
C:\OSGeo4W64\apps\Python36\DLLs
C:\OSGeo4W64\apps\Python36\lib\site-packages
C:\OSGeo4W64\apps\qgis-dev
C:\OSGeo4W64\apps\qgis-dev\bin
C:\OSGeo4W64\apps\qgis-dev\lib
C:\OSGeo4W64\apps\qgis-dev\python
C:\OSGeo4W64\apps\qgis-dev\python\qgis
C:\OSGeo4W64\apps\Qt5
C:\OSGeo4W64\apps\Qt5\lib
C:\OSGeo4W64\bin
C:\OSGeo4W64\apps\qgis-dev\python
C:\OSGeo4W64\apps\Python36\lib
C:\OSGeo4W64\include
C:\Users\Mustafa Uçar\AppData\Roaming\QGIS\QGIS3\profiles\default
C:\Users\Mustafa Uçar\AppData\Roaming\QGIS\QGIS3\profiles\default\QGIS

How can I fix this error?


texts:
I have an area polygon with rocks on it i want to use difference to map the soft (ground, not rocks) cover.
to do that i try using the (ftools)  vector>geoprocessing>difference getting an empty difference layer. I tried performing this analysis both on windows and linux using shapefiles and sqlite.

a zipfile containing the data can be downloaded at:https://www.dropbox.com/s/s1lrepa95lwdm9e/stackexchange.zip

I have a few questions:
1. Can anyone tell me why?
2. Where can i find the qgis log so i might be able to figure this out
3. Is there an alternative to ftools to perform such analysis?
4. it seems to me that some of the ftools function dont work for me, does anyone know of a solution for that?
5. might this be somehow encoding related (some of the layers were produced in windows some linux)

OS: windows xp, linux ubuntu 12.04
qgis: 1.8


texts: How to clip or erase a csv file with a non-rectangular shapefile?

texts: I can clip a csv file with a ogr2ogr having 4 extents of a rectangular polygon. Is it possible to clip a csv file with a non rectangular shapefile?


texts: ArcGIS 10 Add-In Does not Work on Other computers

texts:
I developed a user form that allows user to edit feature attributes in visual basic 2008. vb.net. The add-in's that I built work great on my computer, but when I tried it on another, it crashes ArcMap.

is this because the DeveloperKit is not installed on the other computer?

I manually add-in the tool (i.e., Customize, Add from file, etc) and it looks like it installs. ArcMap crashes when I click on the button though.  On my computer it work correctly using the same method.

I have uploaded the file to here: http://wfurl.com/3611b10


texts: How to import GEBCO bathymetry into QGIS?

texts:
I'm experiencing problems with the import of bathymetry data in QGIS, which I downloaded freely from GEBCO or NOAA. The problem is that if I import the grid (either with .nc or .asc extension, or if I extract it as geotiff), I simply get a grey map with very faint or no differentiation in depth.

Does anybody know what the problem is? Are there are other free sources to get bathymetry data from?

Thanks!

ellen


texts: How do osm2pgrouting and osm2po differ in their ways creation?

texts:
How do osm2po and osm2pgrouting differ in their algorithms for creating their ways table ?  I've seen significant differences between their processing of the same osm extract.

Processing the same file (us-midwest-latest.osm) from geofabrik using both osm2po and osm2pgrouting (and using config for cars only with both) resulted in nearly 400K more entries in the ways table from osm2pgrouting than in the corresponding *_2po_4pgr table.

Does osm2pgrouting just create more nodes/vertices?


texts: Extracting partial data from one field to another using Python Parser of ArcGIS Field Calculator?

texts:
I am attempting to extract a date stamp that is contained in one field and insert it into another field.  The issue is that the date (in bold below) is not in the same location in each line of the data.  I am able to find the location of the first "-", using python !fieldName!.find(-).  Any ideas on how to complete the next step?  I have thought about using a Mid function, but haven't been able to figure it out so far.

Data:
ABCDE.ABCD-111611-43141 and
ABCDEFG.ABCD-062914-95642

Here is what we came up with in the end:

Pre-Logic Script Code:

def ExtractDate(inValue):
 import string
 x= inValue.find('-')
 return inValue[x+1:x+7]

Field_Name =

ExtractDate( !MyFieldName! )


texts: Can you expand the label blocking area for points?

texts:
Using QGIS 3.10, is it possible to "expand" the label blocking footprint of a point feature to match it's icon size?  I am trying to design a reliable data-driven workflow for generating maps that will work across a large geographic area, as well as a range of maps scales.  Therefore, placing individual labels on a "project basis" is not a viable option for me.

I'm USGS "badge" symbols for points like campgrounds, ranger stations, waterfalls, etc.  However, in some cases, like when I have a campground on a small lake, the lake labels will "over-post" the icon.  In the sample image below, I'd like the extent of the campground icon to "block" the blue "Poia Lake" label from overposting it.

Is it possible to give the "campground" point a "label blocking footprint" the size of the icon, forcing QGIS to either hide the lake label or move it to an uncluttered location?


texts: SpatiaLite: Creating to, from nodes from a normal road layer (LINE)

texts:
Following this tutorial but using my own data. How do I create the from_node and to_node columns?

I am using Spatialite and Sqlite3. I'd prefer to not use a gui as I'm working remotely via ssh on a server.

The network is currently held in a spatialite database with a geometry column e.g:

id  |  road_name   |  geometry
1   |  Phil Street |

I wish to, using sql,  add column to and from node e.g.:

id  |  road_name   |  from_node  |  to_node  |  geometry
1   |  Phil Street |  1          |  2        |


texts: Is it possible to do spatial interpolation using points in a field?

texts: I would like to use Quantum instead of ArcGIS to make field map but before, I need to know if its possible to do spatial interpolation with definited points in a field (ex. pH points). Is there a manual to learn about it?