Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm new to GeoServer so if I miss any information please let me know.

We're running GeoServer v2.2 with FeatureGrid. When a query is run it returns all the rows correctly, but when we try to sort what should be numeric fields by clicking in the column header it does an alpha sort, i.e. in the sales volume column 985 will appear after 9340. The columns are correctly typed in the DB (postgres).

I fired up my trusty javascript console and was able to get a handle to the feature store and when I drill down to an object it looks like this:

data: Object
ABI: "650607021"
ACTUAL_SALES_VOLUME_x1000: "128"
ADDRESS: "PO BOX 105"
CITY: "METAIRIE"
COMPANY_NAME: "OBSCURED FOR PRIVACY"
HEADQUARTERS_OR_BRANCH: "STAND-ALONE"
LATITUDE: "29.975909"
LONGITUDE: "-90.16079"
NAICS: "81112201"
NUMBER_OF_EMPLOYEES: "1-4"
PHONE: "NPA-NXX-NNNN"
SIC: "753602"
STATE: "LA"
ZIP: "70004"
feature: OpenLayers.Feature.Vector.OpenLayers.Class.initialize
fid: "business_data_2012.112788"
state: null
__proto__: Object
id: "OpenLayers_Feature_Vector_348"
store: gxp.data.WFSFeatureStore.Ext.extend.constructor
__proto__: H

So, it appears to me that the feature store is storing the numeric properties as strings. I'm sure there's a simple fix for it, but I can't seem to puzzle it out.

share|improve this question
    
GeoServer does't have a feature grid, so how do you get the data from GeoServer to your program? If it is WFS you can use describefeature to get the datatypes and then "advise" the parser as to the output types. –  iant Jul 11 '13 at 7:41
    
featuregrid is an add-on to the geoserver package, it's loaded via gxp/script/plugins. Being new to the entire package ecosystem I suppose this may be more of a gxp question. Would that be correct? –  Phil Peterman Jul 11 '13 at 15:04
    
sounds like it - I've updated your tags –  iant Jul 11 '13 at 15:08
    
Thanks iant - I'm beginning to understand the structure and it's more finding the entry points for customization than anything else that I need to familiarize myself with. –  Phil Peterman Jul 11 '13 at 17:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.