I'm new to layers based on sql statements and the rest api, and may have
likely missed something obvious. Any thoughts our suggestions would be
greatly appreciated. Two part question:

1) I'm trying to create a layer based on a sql view using mysql, but the
geometry type is responding as a byte[]. I'm testing with a simple select
statement as "select * from `counties`" Adding the layer by selecting the
table directly works fine. Here is my table description. Odd that it works
directly, but doing so based on a sql statement produces different results.


CREATE TABLE `counties` (
  `id` int(10) unsigned NOT NULL,
  `county_name` varchar(32) NOT NULL DEFAULT '',
  `state_name` varchar(25) NOT NULL DEFAULT '',
  `state_initials` char(2) DEFAULT NULL,
  `member_count` mediumint(9) DEFAULT '0',
  `percentage` int(11) DEFAULT '0',
  `state_fips` char(2) NOT NULL DEFAULT '',
  `county_fips` char(3) NOT NULL DEFAULT '',
  `fips` varchar(10) NOT NULL DEFAULT '0',
  `nces_fips` varchar(10) DEFAULT NULL,
  `county_shape` geometry NOT NULL DEFAULT '',
  `county_center` point NOT NULL DEFAULT '',
  UNIQUE KEY `fips` (`fips`),
  SPATIAL KEY `geo` (`county_shape`),
  KEY `state_initials` (`state_initials`),
  KEY `county_fips` (`county_fips`)
) ENGINE=MyISAM AUTO_INCREMENT=3142 DEFAULT CHARSET=latin1;

2) Eventually I'd like to create this layer using a more complex sql
statement using the REST api. Still digging into that, but would I just need
to wrap the sql statement in a xml string?

Also looking forward to trying out the wms pass-thru to the GeoWebCache. The
improvements there look awesome. Thanks for the help!

Brian
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to