Re: [Geoserver-users] Mapping Multiple Tables in One Mapping File

2017-08-10 Thread Gavin Medley
Thank you! That answers my question. We need to work on the database.

On Tue, Aug 8, 2017 at 3:32 PM, Ben Caradoc-Davies  wrote:

> On 09/08/17 04:52, Gavin Medley wrote:
>
>> I have the data for siteName and iersDOMESNumber in Table1 and the data
>> for
>> monumentDescription and heightOfTheMonument in Table2. Can I use a single
>> XML mapping file to map those two tables to the elements of
>> siteIdentification?
>>
>
> No, there is a one-to-one relationship between a feature type and the
> database relation that provides its identity.
>
> The two workarounds that I have considered are 1) Making a new
>> feature-chained mapping file for each element that needs to be mapped
>> (ugh!) or 2) making a new view or table to bring in any data that needs to
>> be mapped to the same level of the XML schema.
>> What would you suggest?
>>
>
> If the attributes are single-valued, then a database view or table is an
> excellent solution: fast and simple. This is also an opportunity to use
> fast database-side string concatenation to construct identifiers such as
> gml:id or HTTP URIs. You can even index them for performance.
>
> Kind regards,
>
> --
> Ben Caradoc-Davies 
> Director
> Transient Software Limited 
> New Zealand
>



-- 
Gavin Medley
Software Engineer I
*UNAVCO*
6350 Nautilus Drive
Boulder, CO 80301-5394
med...@unavco.org
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Mapping Multiple Tables in One Mapping File

2017-08-08 Thread Ben Caradoc-Davies

On 09/08/17 04:52, Gavin Medley wrote:

I have the data for siteName and iersDOMESNumber in Table1 and the data for
monumentDescription and heightOfTheMonument in Table2. Can I use a single
XML mapping file to map those two tables to the elements of
siteIdentification?


No, there is a one-to-one relationship between a feature type and the 
database relation that provides its identity.



The two workarounds that I have considered are 1) Making a new
feature-chained mapping file for each element that needs to be mapped
(ugh!) or 2) making a new view or table to bring in any data that needs to
be mapped to the same level of the XML schema.
What would you suggest?


If the attributes are single-valued, then a database view or table is an 
excellent solution: fast and simple. This is also an opportunity to use 
fast database-side string concatenation to construct identifiers such as 
gml:id or HTTP URIs. You can even index them for performance.


Kind regards,

--
Ben Caradoc-Davies 
Director
Transient Software Limited 
New Zealand

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


[Geoserver-users] Mapping Multiple Tables in One Mapping File

2017-08-08 Thread Gavin Medley
Hi all,

I am faced with a problem. I am mapping a database of site logs to
GeodesyML through Geoserver App Schema. I am trying to minimize the number
of new views and tables I need to make in the database so I was wondering
if it is possible to use a single mapping file to map multiple views or
tables to fields contained in a single XML element.

e.g. the XML schema is of the form

The Site
42
This is a monument...
1m


I have the data for siteName and iersDOMESNumber in Table1 and the data for
monumentDescription and heightOfTheMonument in Table2. Can I use a single
XML mapping file to map those two tables to the elements of
siteIdentification?

The two workarounds that I have considered are 1) Making a new
feature-chained mapping file for each element that needs to be mapped
(ugh!) or 2) making a new view or table to bring in any data that needs to
be mapped to the same level of the XML schema.

What would you suggest?

Many thanks!

-- 
Gavin Medley
Software Engineer I
*UNAVCO*
6350 Nautilus Drive
Boulder, CO 80301-5394
med...@unavco.org
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users