[Geoserver-users] Newbie Question: What is a namespace and why?

Hi,

After testing Geoserver for a couple of months now, I would like to ask a newbie
question. When I set up a workspace, what is the relevance of having a
namespace?

I have scanned the docs and have read that it is a unique resource identifier
for data served from geoserver, but what does this mean really?

It is then part of the metadata for the layers?
From where is the namespace accessible?
Who reads the namespace and how?
How should I use the namespace to organize my data?

If I am presenting my data on a site from the url
http://www.mycompany.com/maps/ should this be my namespace?

Up until now I have just written fake URIs but I assume when my data is
officially published, the namespace will lets people know the origin of the
data, correct?

Thanks for any help in clearing the matter up,

Yours,

Robert Buckley
www.zgb.de

On Sun, Jul 25, 2010 at 12:08 AM, Robert Buckley <robertdbuckley@anonymised.com> wrote:

Hi,

After testing Geoserver for a couple of months now, I would like to ask a newbie
question. When I set up a workspace, what is the relevance of having a
namespace?

I have scanned the docs and have read that it is a unique resource identifier
for data served from geoserver, but what does this mean really?

GeoServer is built around the idea of interoperability which means any client can access and WMS and WFS service because the interface is standard across all services. The problem arises when different servers have layers with the same name, and it becomes impossible to disambiguate between two services. Take the example of county ABC and county DEF, both counties have a “streets” layer and you want to use your own style rather than the default style on county ABC on your map (which has both counties). To send the SLD to the correct streets layer, you would specify the namespace prefix for county ABC in your GetMap request, i.e. ABC:streets. The same thing goes for WFS requests, if you want to only return street features that are major arterials from county DEF, you would specify the namespace prefix from county DEF to make sure that your request goes to the correct server.

It is then part of the metadata for the layers?

Think of namespaces as a container that keeps names unique to a specific context.

From where is the namespace accessible?
Who reads the namespace and how?

Client software reads the namespace when it requests the Capabilities document .

How should I use the namespace to organize my data?

If I am presenting my data on a site from the url
http://www.mycompany.com/maps/ should this be my namespace?

Up until now I have just written fake URIs but I assume when my data is
officially published, the namespace will lets people know the origin of the
data, correct?

I think that using a http://www.example.com/example form is more of a convention than a requirement. That being said, using http://www.mycompany.com/maps/ is an accepted practice and if helps source the origin of the data that’s also helpful.

HTH,

sophia

Thanks for any help in clearing the matter up,

Yours,

Robert Buckley
www.zgb.de


This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/firsthttp://p.sf.net/sfu/sprint-com-first


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

There is another possible form for the namespace: the urn. So far I have only seen this used, in Geoserver examples, in the app-schema tutorial, where the namespace urn:cgi:xmlns:CGI:GeoSciML:2.0 is used .

As I understand it, URIs can be either URNs, as above, or URLs. URNs provide a unique name for disambiguation purposes, and make it clear that the location of the resource is not being specified. URLs disambiguate and also provide an internet location, although often there is nothing at the address. Sometimes an informational webpage is provided at the address when the resource itself is not published there. For example, the namespace for the topp workspace, in the demo data directory, leads to the home page of the organization which provided the original data.

There is also a convention on relating namespace URLs to paths, which is used routinely by Java programmers, and is exploited in the app-schema extension

http://docs.geoserver.org/stable/en/user/data/app-schema/app-schema-resolution.html#classpath

Possibly more than you wanted to hear about namespaces.

Tara

sophia parafina wrote:

···
-- 
Tara Athan
Owner, Athan Ecological Reconciliation Services
tara_athan at alt2is.com
707-272-2115 (cell, preferred)
707-485-1198 (office)
249 W. Gobbi St. #A
Ukiah, CA 95482