Make shapefiles easier to use

Description

In 1.0.* shapefiles were very easy to add and configure, just used a filename tag in the same directory. The new datastore configurations do not support this as easily, for now the full url file path must be specified. We should be able to reference the shapefile location relatively, so that it can be portable with the war. The best might be to just have a 'data' folder that gets copied in to the war, we could put styles there as well.

Environment

None

Activity

Show:
codehaus
April 10, 2015, 4:34 PM

CodeHaus Comment From: cholmes - Time: Sat, 17 Jan 2004 21:31:21 -0600
---------------------
<p>I actually squeezed a local reference into 1.1.0. But it still can be improved a bit, so I'm going to leave this open. I think the change probably has not yet rolled into 1.2 yet, so that needs to happen as well. It was a hacky fix, since I knew the configuration would take care of it anyways. So I'm going to leave this comment and move to 1.2, as all releases really should have a shapefile that works out of the box (referencing it relatively instead of absolutely is essential to this)</p>

codehaus
April 10, 2015, 4:34 PM

CodeHaus Comment From: cholmes - Time: Mon, 19 Jan 2004 15:14:31 -0600
---------------------
<p>Linked to issue with shapefiles in particular. I did fix this for 1.1.0, basically what needs to happen is the xml readers need to know the location they are reading from and prepend that onto shapefiles that are referenced locally. From a user perspective we do this with a filename parameter instead of a url parameter, and then turn it into a url parameter in the code, so the datastore reads it right.</p>

codehaus
April 10, 2015, 4:34 PM

CodeHaus Comment From: jgarnett - Time: Mon, 2 Feb 2004 04:14:33 -0600
---------------------
<p>coudl not do you suggestion of having the load process mangle the relative paths, the user will want to enter relative paths using the ui.</p>

<p>What I did do is stick a baseDir in as part of the geoServer.load( ... ) method. This baseDir ends up in Data, where DataStoreInfo can get a hold of it.</p>

<p>The method getParams() has been added to DataStoreInfo.

Currently:</p>
<ul class="alternate" type="square">
<li>detects key="url", value starts with "file:" and applies baseDir from Data if needed.</li>
</ul>

<p>What should be done:</p>
<ul class="alternate" type="square">
<li>detect value instanceof URL &amp;&amp; ((URL)value).getProtocol().equals("file") so all DataStores

can benifit</li>
</ul>

<p>For this to work we will need to ask Shapefile to take a param URL.class rather than String.class. Since Param class already mangles strings as required, we may be able to talk IanS into it.</p>

codehaus
April 10, 2015, 4:34 PM

CodeHaus Comment From: aaime - Time: Thu, 29 Mar 2007 02:05:58 -0500
---------------------
<p>These issue has been in resolved state for at least one month (quite a bit, a lot more than one month). Batch transitioning them to closed state</p>

Fixed

Assignee

Unassigned

Reporter

codehaus

Triage

None

Fix versions

Affects versions

Components

Priority

Low