Skip to main content

Questions tagged [data-source]

Use for questions about how data is used as the source of a layer. For questions about the data itself use the [data] tag and/or ask at the Open Data Stack Exchange instead.

Filter by
Sorted by
Tagged with
2 votes
2 answers
127 views

Update aprx data sources using arcpy

I have multiple aprx's in a folder where I would like to update the data sources. I have written out the code below in arcpy, but it gets stuck looping on the first aprx and doesn't move onto the next ...
ynxblx's user avatar
  • 368
0 votes
0 answers
40 views

Unable to move Project Folder in QGIS

I have a project folder containing the project .qgz and all the associated datasources. QGIS 3.34.4. Have ProjectProperties>SavePaths set to 'relative.' Would like to move that project folder to a ...
Pete's user avatar
  • 1
0 votes
1 answer
148 views

Import Map Package (mpk) into ArcGIS Pro: How to create sources independent from the user's profile

After importing an ArcMap Map Package file (*.mpk) into ArcGIS Pro, the layers show Data Source starting with C:\Users\<current user>\Documents\ArcGIS\Packages\. This is useless for other users ...
stonebe's user avatar
  • 487
1 vote
2 answers
288 views

Updating data sources in .aprx files

I am about to break a lot of data sources in our team's .aprx files because we are overhauling the places we are storing our data. Our data is stored in shapefile and file geodatabase formats. Is ...
Joshua Chan's user avatar
0 votes
0 answers
36 views

Meaning of sde.DEFAULT in data source path: sde.DEFAULT (user@server_name:database_name)

I've pulled some MXDs into ArcGIS Pro that are using data from a very old PostgreSQL (9.3) server. The database looks to be set up with an sde schema. I don't think it was actually implemented ...
MKF's user avatar
  • 669
3 votes
1 answer
148 views

Saving workspaces with dynamic filepaths

We have a large amount of background mapping data saved in a OneDrive folder that is then synced to each user's laptop on their C drive. If one user saves a QGIS workspace on the company's shared &...
davehughes87's user avatar
0 votes
0 answers
19 views

Dynamic WHERE clause in setDataSource in PyQGIS

In PyQGIS, I want to create a layer according to the value of two variables (not hardcode values). This is a piece of my code, but the layer is not valid. var_a = "Miami" #hardcode var_b = &...
gpo's user avatar
  • 1
4 votes
1 answer
66 views

How to change the port-number of a PostGIS layer's data source outside QGIS?

I have several QGIS project files (qgz) I didn't touch in quite some time that contain several layers heavily depending on a PostGIS connection and meanwhile its port number was changed (everything ...
maxwhere's user avatar
  • 1,158
0 votes
1 answer
338 views

QGIS and remote PostgreSQL/PostGIS (in cloud) slow performance

I am using QGIS 3.28.11 version and in backend I am using PostgreSQL 15.0 with PostGIS 3.3.3. I have total 36 layers which contained in 3 groups: A, B, C. Now X user has read only access on all layers ...
Rajesh Kumar's user avatar
3 votes
1 answer
441 views

QGIS instantly crashes on opening Data Source Manager

Whenever I click on the icon or the context menu for managing data sources QGIS crashes instantaneously without any error message. The problem occurs in all the latest versions of QGIS, both LTR and ...
Ivan's user avatar
  • 55
2 votes
1 answer
121 views

Making template project in ArcGIS Pro that has broken data links on purpose

I am trying to take a project file and save it as a template project file so users can not accidentally save their changes to the template file when they start a new project without a "save-as&...
forestGIS's user avatar
  • 313
0 votes
0 answers
57 views

QGIS Grass Raster import using r.in.gdal.qgis: 'Layer data source could not be found'

I'm a QGIS learner following the official QGIS Training Manual. I'm on Module 12.1. My problem is that when I try to add a raster layer to GRASS using r.in.gdal.qgis, the resulting layer shows a red ...
JnomiddlenameHoward's user avatar
3 votes
1 answer
78 views

Changing layer provider (datasource) from shapefile to PostgreSQL with PyQGIS

I have a QGIS project with several layers using shapefiles. I want to change the datasource of each layer using a PostgreSQL table to replace the shapefile source. I tried this code, but nothing ...
Etienne's user avatar
  • 597
0 votes
1 answer
212 views

How to use Python to update enterpise geodatabase user connections for layers within an ArcGIS Pro Project map

I tried to use the following code to update the connected database user for layers within an ArcGIS Pro project map. The code runs but it does not change the data sources from one enterprise ...
Nicole's user avatar
  • 19
0 votes
1 answer
73 views

Updating the source geodatabase for select layers in ArcGIS Pro (multiple geodatabases used in one map)

I have a map that uses shapefiles from several geodatabases. I need to re-source several layers from one specific geodatabase to another. They are the exact same geodatabase; Geodatabase X was copied ...
Sarah's user avatar
  • 1
0 votes
1 answer
637 views

Cannot fix broken link to .lyrx file in ArcGIS pro

When I drag and drop a .lyrx file into ArcGIS, the red exclamation mark indicating a broken data link appears. When I click on the red exclamation mark and try to fix the file link within ArcGIS, the ....
Molly's user avatar
  • 1
2 votes
1 answer
69 views

Make the aggregation function in the form menu more versatile for different projects?

I have expressions for a table field that has a map layer named as a data source file (building_ex.shp). I plan to save this setting as a style and use it in other projects, but in other projects the ...
Ivan M's user avatar
  • 303
1 vote
1 answer
437 views

QGIS - Change data source location

I am currently working on a model allowing me to extract and save the entities extracted from different sources. So far, with the graphical modeler, i managed to perform the extraction and the save ...
Florian Marlière's user avatar
1 vote
1 answer
31 views

QGIS 3.10 last point features created are not recognized by snapping - update source?

I am created a plugin that creates point features and line features from a SpatiaLite database. The lines must be snapped to a point at least in one end. Then problem is that the last created point ...
nanunga's user avatar
  • 533
2 votes
0 answers
7k views

Invalid Data Source in QGIS [closed]

I bought a new laptop recently. However, when I tried to load shapefiles or geopackage, it will always return an error message: Invalid Data Source: world-administrative-boundaries.zip is not a valid ...
Sherry's user avatar
  • 49
0 votes
1 answer
63 views

Using ReplaceDataSource with group layers and ArcPy with ArcMap

I have a script to replace the data source on layer files in an mxd based on a geodatabase input from the user and a feature class with a matching name to the layer. This script works as intended as ...
serena's user avatar
  • 13
0 votes
1 answer
532 views

Sharing ArcGIS Pro Python Script as Web Tool gives Analyze error 00068 Script ... contains broken project data source

I am using this test script as the source for a Python Script Tool that works in ArcGIS Pro 3.0.2 and that I wish to share as a Web Tool to ArcGIS Enterprise 11. import arcpy arcpy.env....
PolyGeo's user avatar
  • 65.4k
0 votes
0 answers
106 views

QGIS import data source mbtiles error as raster layer

I imported a mbtiles that I created last time. But when I import it as the Raster Layer, it show the error like this, Error: Unsupported Data Source: C:\ ... LTI2.mbtiles is not a supported raster ...
user212324's user avatar
0 votes
1 answer
166 views

Broken Links even though features haven't moved

I've been running into an issue on all of my workspaces as of late where the links to random features are broken. I check the source through the layer properties and connect to the EXACT same path ...
Karyssa's user avatar
  • 21
1 vote
1 answer
1k views

Can't repair data source after location of layer source changed

I switched platforms that I was running QGIS on, and as a result, the path to the source file for a couple layers in my project changed. However, I do not seem to be able to repair the data source. ...
Michael's user avatar
  • 171
0 votes
1 answer
345 views

Change network data source for single layer from local network dataset to ArcGIS Online

I'm working on a project in ArcGIS Pro using the Service Area feature of the Network Analyst extension. Initially, I created a service area layer with a local network data set, StreetMap Premium, but ...
RyanSnead's user avatar
3 votes
0 answers
231 views

Unavailable layer saved on computer as .txt file in my all projects (.qgz)

I have a problem with all my saved .qgz projects. I always worked with layers in projects only as .txt files, not saving them as shapefile, because I can make changes in .txt files (eg. add more ...
Michaela Uhrová's user avatar
1 vote
0 answers
136 views

In QGIS how do the providers 'spatialite' and 'ogr' influence loading, editing and processing sqlite/spatialite layers?

Referencing this older post it seems to me, that indeed the provider is dependent on how the file was loaded: -> ogr: Loading via Vector (Data Source Manager) or drag & drop -> spatialite: ...
Malik Al-Maut's user avatar
1 vote
1 answer
116 views

Replacing data source only if feature exists using ArcPy

What would I need to add to my code to check that a data source exists first before running layer.replacedatasource? I have been supplied with an example that uses the os.path.isfile to check if a ...
Tom Piggott's user avatar
0 votes
1 answer
238 views

Replacing data source in MXD to file geodatabase

I am currently updating a script we use at work. The script was designed to loop through the layers in an mxd and go through and replace the data sources so that when someone opened up the final setup ...
Tom Piggott's user avatar
0 votes
1 answer
389 views

ArcGIS Pro: dragging lyr-file from folder in project creates 20 missing data sources

I dragged "Fastighetskartan.lyr" into the map. It now shows up missing 20 data sources - even though the data source is the bs_get.shp in the same folder as the lyr-file. How come this ...
gremol's user avatar
  • 107
1 vote
0 answers
625 views

PyQGIS -"invalid data source" when trying to open several .shp files

I have a folder with almost 3000 subfolders, each containing several ESRI shapefiles. I tried to write a script to read each of these files, do some basic analysis on them and store new files in those ...
Morteza Yaqubkhani's user avatar
1 vote
1 answer
197 views

Adding vector shapefile with all elements to QGIS V 3.16 not recognized data source

I am trying to add a vector shapefile to QGIS V 3.16 and am receiving an error message "Not a valid or recognized data source". There is nothing wrong with the file connection on my end as ...
Maggie Creamer's user avatar
0 votes
1 answer
497 views

Unable to replace data source from a layer in an ArcGIS MapDocument

I'm trying to write a code for automating changing the source for some layers of a mxd document. I have three layers that should point to the same shapefile, they are only displayed with different ...
Karol Duarte's user avatar
1 vote
0 answers
262 views

Updating dataSource of layer in APRX map object

I have the code below that updates the connectionProperties of a layer inside of a APRX Map should it meet certain criteria. All of this works fine, the connection properties are updated for all ...
dave_does_not_understand's user avatar
2 votes
1 answer
55 views

Retrieving PostGIS selected table in PyQGIS

I would like to use the layer selected into the explorer's windows. My aim is to launch script using the name of the PostGIS layer selecter in this windows. Is it possible to retrieve the table ...
zlikotp's user avatar
  • 34
2 votes
1 answer
88 views

Renaming multiple feature layers for multiple MXDs using ArcPy

I have recently renamed 20 feature layers that are currently saved in approximately 100 MXDs. To fix the broken data source as a result of changing the name, I am using the following code: import ...
ynxblx's user avatar
  • 368
3 votes
2 answers
267 views

Changing raster source using QGIS

I am using QGIS 1.8.0. I have two raster image files that I want to see interchangeably, so I duplicated the first layer that's already been georeferenced properly to ensure that all the location data ...
johnsankey's user avatar
3 votes
3 answers
3k views

Use updateConnectionProperties to change to new data source which is not in dataset

I am using updateConnectionProperties() method to change data sources for layer files. The layer is "C:/gis/layer.lyrx". The old path is "C:/gis/oldGDB.gdb/oldDS/FC". The new path ...
Boyang Wang's user avatar
9 votes
3 answers
2k views

Getting provider name of layer using PyQGIS

In QGIS 3.16.5-Hannover, with PyQGIS I want to get the provider name of a selected layer. I need to know if it's an ESRI Shapefile layer or a PostGIS layer for example. I don't see how to get this ...
GeoGyro's user avatar
  • 1,656
2 votes
2 answers
1k views

Setting data source for certain layers in .mxd using ArcPy

I have an .mxd that I use as a template in ArcMap 10.8. I currently manually update the data source for certain layers in the MXD. I am trying to create an arcpy script to do this for me but am stuck ...
BCGeoGirl's user avatar
4 votes
2 answers
1k views

Why are my layers after sharing and re-downloading a QGIS map almost all unavailable?

I have made a map on QGIS and when I save it and send it to myself and re-open it, the layers are unavailable. The only layer that shows up is the one I got through ArcGIS Feature Layer service. It ...
Jillian Gordner's user avatar
0 votes
3 answers
894 views

PyQGIS script to add multiple delimited text layers from folder to project

I have a folder of ~120 csv files. I would like to add them all to my QGIS project. I know this is accomplished with the 'Data Source Manager' and 'Delimited Text' option. However, instead of adding ...
Trevor's user avatar
  • 11
1 vote
0 answers
53 views

QGIS: How to set up a datasource connection to pull locally sourced layers when the name changes

I am setting up a template QGIS project which pulls layers from the folder the template is in. The template needs to connect to a raster layer that has a name that slightly changes each time. The name ...
joseph's user avatar
  • 21
0 votes
1 answer
451 views

ArcPy replacing network mapped drive with UNC

I am writing a script in Python to look in the current MXD for paths which are on a mapped network drive instead of the UNC path to the network. However I am getting a syntax error. I am not very ...
Meg0's user avatar
  • 21
1 vote
2 answers
921 views

Set Data Source Option in ArcGIS Pro - Similar to set data source for mxd

Where can I find following option to change data source of all layers in map in ArcGIS Pro? This is how I access data source in ArcMap
user4906240's user avatar
  • 1,108
1 vote
0 answers
148 views

Altering PostGIS query in layer data source using ArcPy with ArcGIS Pro

I've loaded several layers from a PostgreSQL database with the PostGIS extension installed into an ArcGIS Pro 2.4 project. I'd like to make the same map a few times for the data in several different ...
Hugh_Kelley's user avatar
0 votes
1 answer
3k views

Red exclamation mark next to layer

I had a raster layer in my map document that suddenly became invisible in the map even though it is still in my table of contents. There is now a red exclamation mark next to it in the table of ...
mfigura's user avatar
  • 35
1 vote
1 answer
512 views

Can I select a datasource for all layers in QGIS?

I received a zip file with a QGZ map and all the layers that go into the map. When I open the map, it is not recognizing the sources for any of the layers, so I have to go through and individually ...
Rosy's user avatar
  • 11
2 votes
2 answers
2k views

Backed up shapefile is no longer a "valid or recognized data source"

I'm working on a project regarding the coastline of Tampa Bay and over a long period I've edited a 2004 snapshot of the coastline from a line shapefile into a polygon shapefile representing the ...
qu4ntumrush's user avatar